:root {
  --bg-a: #014976;
  --bg-b: #027cc9;
  --card: rgba(255, 255, 255, 0.96);
  --text: #16232e;
  --muted: #5b6b78;
  --accent: #014976;
  --accent-hover: #027cc9;
  --chip: #eef3f7;
  --chip-hover: #dde8f0;
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 16px 24px;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg-a) linear-gradient(135deg, var(--bg-a) 0%, var(--bg-a) 30%, var(--bg-b) 100%) fixed;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 560px;
  padding: 40px 60px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 20, 40, 0.35);
  text-align: center;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: -100px auto 16px;
  display: block;
  border: 5px solid var(--card);
  box-shadow: 0 8px 24px rgba(0, 20, 40, 0.3);
}

h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tagline {
  margin: 6px 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
}

.sep {
  margin: 0 0.4em;
}

.bio {
  text-align: justify;
}

.bio p {
  margin: 0 0 12px;
}

.work {
  margin: 24px 0;
  padding-top: 20px;
  border-top: 1px solid #e3e9ee;
}

.work p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 24px;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease;
}

.links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.links a:hover,
.links a:focus-visible {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.contact {
  display: inline-block;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}


.contact:hover,
.contact:focus-visible {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.contact:disabled,
.contact:disabled:hover {
  background: #a9c5db;
  cursor: not-allowed;
}

footer {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

footer p {
  margin: 0;
}

/* Contact modal */

.modal {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 40px 20px 20px;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 20, 40, 0.45);
  text-align: center;
  overflow: visible;
}

.modal::backdrop {
  background: rgba(0, 20, 40, 0.55);
}

.modal-icon {
  width: 44px;
  height: 44px;
  margin: -62px auto 12px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
}

.modal-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.modal h2 {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal .row {
  display: flex;
  gap: 12px;
}

.modal .row input {
  flex: 1;
  min-width: 0;
}

.modal input,
.modal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd8e0;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.modal input:focus,
.modal textarea:focus {
  outline: 2px solid var(--accent-hover);
  outline-offset: -1px;
}

.modal textarea {
  resize: vertical;
  min-height: 160px;
}

.modal .counter {
  margin-top: -8px;
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
}

.modal .hint {
  margin: -8px 0 0;
  text-align: left;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
}

.modal .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.modal .cf-turnstile {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

.modal .form-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--muted);
}

.modal .form-status.error {
  color: #b42318;
}

.modal .send {
  width: 100%;
}

.modal .cancel {
  padding: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.modal .cancel:hover,
.modal .cancel:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.modal .sent p {
  margin: 0 0 20px;
}

@media (max-width: 480px) {
  .modal {
    max-width: calc(100% - 32px);
    max-height: calc(100dvh - 32px);
    padding-top: 20px;
    overflow-y: auto;
  }
  .modal-icon {
    margin-top: 0;
  }
  .modal textarea {
    min-height: 120px;
  }
  .modal .row {
    flex-direction: column;
  }
  body {
    padding-top: 100px;
  }
  .card {
    padding: 32px 28px;
  }
  .links {
    gap: 6px;
  }
  .links a {
    width: 42px;
    height: 42px;
  }
  .avatar {
    width: 128px;
    height: 128px;
    margin-top: -88px;
  }
  h1 {
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
