:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --fg: #1a2332;
  --muted: #5b6b7c;
  --border: #d8e2ee;
  --accent: #4a7fb5;
  --accent-soft: #e8f1f8;
  --accent-deep: #3a6896;
  --shape: #c5d9ec;
  --shape-soft: #dceaf6;

  --font-display: "Segoe UI", "Helvetica Neue", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;
  --max: 1180px;
  --nav-h: 4.25rem;
  --radius: 1.25rem;
  --radius-pill: 999px;
  --shadow: 0 18px 50px rgba(58, 104, 150, 0.12);
  --shadow-soft: 0 10px 30px rgba(58, 104, 150, 0.08);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-deep);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker-accent {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

/* Header — solid soft-blue pill nav (reference style) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
  pointer-events: none;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem var(--space-5) 0.5rem;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-4);
  pointer-events: none;
}

.header-inner > * {
  pointer-events: auto;
}

.logo {
  display: none;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
  margin-right: auto;
}

.logo:hover {
  color: var(--accent-deep);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 0.35rem;
  background: #8eb4d4;
  border-radius: var(--radius-pill);
  border: none;
  box-shadow: 0 8px 24px rgba(74, 127, 181, 0.18);
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #ffffff;
  padding: 0.72rem 1.15rem;
  border-radius: 0;
  border: none;
  white-space: nowrap;
  opacity: 0.95;
  background: transparent;
  box-shadow: none;
}

.nav a:hover {
  color: #ffffff;
  opacity: 1;
  background: color-mix(in srgb, #ffffff 14%, transparent);
}

.nav a[aria-current="page"] {
  color: #ffffff;
  opacity: 1;
  font-weight: 600;
  background: color-mix(in srgb, #ffffff 16%, transparent);
  box-shadow: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: #8eb4d4;
  border-radius: var(--radius-pill);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 8px 24px rgba(74, 127, 181, 0.18);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #ffffff;
}

.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-5) var(--space-5) var(--space-9);
}

.page-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--accent-deep);
  margin: var(--space-3) 0 var(--space-5);
}

.page-lead {
  max-width: 58ch;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: var(--space-7);
}

.section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.section-title {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--accent-deep);
}

.section-head a {
  font-size: 0.92rem;
  font-weight: 550;
  color: var(--accent);
  text-decoration: none;
}

.section-head a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

/* Hero — doctor portfolio style */
.hero-stage {
  position: relative;
  background: var(--surface);
  border-radius: 28px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, white);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  min-height: min(72vh, 640px);
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  display: grid;
  place-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg .grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--shape) 35%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--shape) 35%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 75%);
  opacity: 0.55;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.blob-1 {
  width: 280px;
  height: 180px;
  background: var(--shape-soft);
  top: 12%;
  right: 8%;
  border-radius: 60% 40% 50% 50%;
  opacity: 0.85;
}

.blob-2 {
  width: 200px;
  height: 140px;
  background: var(--accent-soft);
  bottom: 18%;
  left: 6%;
  border-radius: 50% 60% 40% 50%;
}

.blob-3 {
  width: 120px;
  height: 120px;
  background: color-mix(in srgb, var(--shape) 55%, white);
  top: 22%;
  left: 18%;
  opacity: 0.7;
}

.hero-composition {
  position: relative;
  z-index: 2;
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem 1rem;
  min-height: 420px;
}

.hero-name-left,
.hero-name-right {
  font-size: clamp(2.6rem, 7.5vw, 5.25rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.hero-name-left {
  text-align: right;
  padding-right: 0.15em;
}

.hero-name-right {
  text-align: left;
  padding-left: 0.1em;
}

.hero-portrait-wrap {
  position: relative;
  width: clamp(200px, 28vw, 300px);
  z-index: 3;
}

.hero-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--accent-soft), var(--shape));
  box-shadow: var(--shadow);
  border: 6px solid var(--surface);
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.float-badge {
  position: absolute;
  z-index: 4;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--border) 70%, white);
}

.float-badge svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.float-badge-plus {
  left: -12%;
  bottom: 18%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--accent);
}

.float-badge-book {
  right: -14%;
  top: 12%;
}

.hero-sub {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 0.25rem;
  z-index: 2;
}

.hero-sub .role {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.35rem;
}

.hero-sub .place {
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
  z-index: 2;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--fg);
  color: var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  background: var(--accent-deep);
  color: var(--surface);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: color-mix(in srgb, var(--accent) 25%, white);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.card {
  background: var(--surface);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--fg);
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 48ch;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: auto;
  padding-top: var(--space-2);
}

/* Media opinion cards */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.media-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  min-height: 180px;
}

.media-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  color: inherit;
}

.media-card .outlet {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 550;
}

.media-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--fg);
}

.media-card p {
  font-size: 0.92rem;
  color: var(--muted);
  flex: 1;
}

.media-card .read-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Stack lists */
.stack-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stack-item {
  display: grid;
  grid-template-columns: minmax(120px, 150px) 1fr;
  gap: var(--space-4) var(--space-5);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.stack-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.2rem;
}

.stack-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.stack-body p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 62ch;
}

.stack-body .org {
  color: var(--fg);
  font-weight: 550;
  margin-bottom: var(--space-2);
}

.research-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: var(--space-1);
  color: var(--accent-deep);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.research-link:hover,
.research-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg);
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.interest {
  background: var(--surface);
  padding: var(--space-5);
  min-height: 120px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.interest h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
  color: var(--accent-deep);
}

.interest p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-6);
  align-items: start;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact-list li {
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: var(--space-1);
}

.contact-list .label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-list a {
  text-decoration: none;
  font-weight: 600;
}

.contact-list a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

.form {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-4);
  box-shadow: var(--shadow-soft);
}

.field {
  display: grid;
  gap: var(--space-2);
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0.75rem 0.9rem;
  min-height: 44px;
  outline: none;
  border-radius: 12px;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.form-success {
  display: none;
  padding: var(--space-4);
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 12px;
  font-size: 0.95rem;
}

.form.is-sent .form-fields {
  display: none;
}

.form.is-sent .form-success {
  display: block;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner a {
  text-decoration: none;
  color: var(--muted);
}

.footer-inner a:hover {
  color: var(--accent-deep);
}

.filter-btn {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-pill);
}

.filter-btn.is-active,
.filter-btn:hover {
  border-color: transparent;
  color: var(--surface);
  background: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-composition {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: var(--space-3);
  }

  .hero-name-left,
  .hero-name-right {
    text-align: center;
    padding: 0;
    font-size: clamp(2.4rem, 12vw, 3.5rem);
  }

  .hero-name-left {
    order: 1;
  }

  .hero-portrait-wrap {
    order: 2;
    width: min(240px, 58vw);
  }

  .hero-name-right {
    order: 3;
  }

  .hero-sub,
  .hero-actions {
    order: 4;
  }

  .float-badge-plus {
    left: -6%;
  }

  .float-badge-book {
    right: -6%;
  }

  .card-grid,
  .media-grid,
  .interest-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .stack-item {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

/* Final overrides for the compact navigation and cutout hero portrait */
.header-inner {
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.05;
}

.logo strong {
  display: block;
  color: var(--accent-deep);
  font-weight: 800;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #287eb5, #75b8dc);
  box-shadow: 0 7px 18px rgba(40, 126, 181, 0.22);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.nav {
  width: auto;
  min-height: auto;
  justify-content: center;
  padding: 0 0.35rem;
  background: #8eb4d4;
  border-radius: var(--radius-pill);
}

.nav a {
  padding: 0.72rem 1.15rem;
}

.hero-stage {
  --pointer-x: 0px;
  --pointer-y: 0px;
}

.hero-portrait-wrap {
  transform: translate(var(--pointer-x), var(--pointer-y));
  transition: transform 0.32s ease-out;
}

.hero-portrait {
  overflow: visible;
  aspect-ratio: 0.72;
  border-radius: 0;
  box-shadow: none;
}

.hero-portrait img {
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 22px 18px rgba(30, 75, 108, 0.18));
}

@media (max-width: 900px) {
  .hero-portrait {
    aspect-ratio: 1;
    border-radius: 0;
  }

  .hero-name-left,
  .hero-name-right {
    animation: none;
  }
}

@media (max-width: 820px) {
  .logo {
    display: inline-flex;
  }

  .nav {
    width: auto;
    border-radius: 1.1rem;
  }
}

/* Branded navigation, portrait cutout, and motion */
.header-inner {
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.05;
}

.logo strong {
  display: block;
  color: var(--accent-deep);
  font-weight: 800;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #287eb5, #75b8dc);
  box-shadow: 0 7px 18px rgba(40, 126, 181, 0.22);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.nav {
  width: auto;
  min-height: auto;
  justify-content: center;
  padding: 0 0.35rem;
  background: #8eb4d4;
  border-radius: var(--radius-pill);
}

.nav a {
  padding: 0.72rem 1.15rem;
}

.hero-stage {
  --pointer-x: 0px;
  --pointer-y: 0px;
}

.hero-portrait-wrap {
  transform: translate(var(--pointer-x), var(--pointer-y));
  transition: transform 0.32s ease-out;
}

.hero-portrait {
  overflow: visible;
  aspect-ratio: 0.72;
  border-radius: 0;
  box-shadow: none;
}

.hero-portrait img {
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 22px 18px rgba(30, 75, 108, 0.18));
}

.float-badge {
  animation: badge-float 4.8s ease-in-out infinite;
}

.float-badge-book {
  animation-delay: -2.2s;
}

.hero-name-left {
  animation: name-in-left 0.9s cubic-bezier(.2,.8,.2,1) both;
}

.hero-name-right {
  animation: name-in-right 0.9s cubic-bezier(.2,.8,.2,1) 0.12s both;
}

.hero-sub,
.hero-actions {
  animation: fade-up 0.7s ease-out 0.45s both;
}

.has-motion .section {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.has-motion .section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes badge-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes name-in-left {
  from { opacity: 0; transform: translate(-28px, 10px); }
  to { opacity: 1; transform: translateX(0.12em); }
}

@keyframes name-in-right {
  from { opacity: 0; transform: translate(28px, 10px); }
  to { opacity: 1; transform: translateX(-0.12em); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 820px) {
  .logo {
    display: inline-flex;
  }

  .nav {
    width: auto;
    border-radius: 1.1rem;
  }
}

@media (max-width: 820px) {
  .header-inner {
    justify-content: space-between;
    padding-top: 0.85rem;
  }

  .logo {
    display: block;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 3.6rem;
    right: var(--space-4);
    left: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem;
    border-radius: 18px;
    min-width: 200px;
    box-shadow: 0 12px 32px rgba(74, 127, 181, 0.22);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    text-align: left;
    border-radius: 12px;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .main {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* Reference-inspired portfolio stage */
body {
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.95) 0 14%, transparent 42%),
    linear-gradient(135deg, #eef3f8 0%, #f8fafc 52%, #edf4f9 100%);
}

.header-inner {
  max-width: 1440px;
  padding: 1.65rem clamp(1rem, 3vw, 2.5rem) 0.75rem;
}

.nav {
  width: min(62vw, 760px);
  min-height: 4rem;
  justify-content: space-around;
  padding: 0 1rem;
  background: linear-gradient(100deg, #5ea9d5, #7dbce0);
  border-radius: 2rem 0 0 2rem;
}

.nav a {
  padding: 0.78rem 0.65rem;
  font-size: 0.94rem;
}

.main {
  max-width: 1440px;
  padding: clamp(1rem, 2vw, 1.6rem) clamp(1rem, 3vw, 2.5rem) var(--space-9);
}

.hero-stage {
  min-height: clamp(600px, 70vh, 760px);
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: 1.6rem;
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 24px 60px rgba(42, 84, 120, 0.13);
}

.hero-bg .grid-lines {
  background-size: 62px 62px;
  opacity: 0.46;
  mask-image: linear-gradient(90deg, black 0%, transparent 38%, transparent 70%, black 100%);
}

.blob-1 {
  width: clamp(250px, 24vw, 420px);
  height: clamp(130px, 13vw, 210px);
  top: 16%;
  right: -8%;
  border-radius: 100px 0 0 100px;
}

.blob-2 {
  width: clamp(220px, 27vw, 430px);
  height: clamp(105px, 11vw, 165px);
  bottom: 14%;
  left: 14%;
  border-radius: 0 100px 100px 0;
}

.blob-3 {
  width: clamp(240px, 30vw, 470px);
  height: clamp(150px, 17vw, 250px);
  top: 42%;
  left: 15%;
  border-radius: 1.8rem;
  background: #dcecf7;
}

.hero-composition {
  width: min(100%, 1200px);
  min-height: 490px;
  grid-template-columns: minmax(0, 1fr) clamp(230px, 24vw, 340px) minmax(0, 1.3fr);
  gap: 0;
}

.hero-name-left,
.hero-name-right {
  position: relative;
  z-index: 1;
  font-size: clamp(3.75rem, 8vw, 8rem);
  line-height: 0.84;
  color: #287eb5;
}

.hero-name-left {
  transform: translateX(0.12em);
}

.hero-name-right {
  transform: translateX(-0.12em);
}

.hero-portrait-wrap {
  width: clamp(230px, 24vw, 340px);
}

.hero-portrait {
  aspect-ratio: 0.82;
  border: 0;
  border-radius: 45% 45% 2rem 2rem;
  background: transparent;
  box-shadow: 0 16px 34px rgba(42, 84, 120, 0.13);
}

.hero-portrait img {
  object-position: center 13%;
}

.float-badge {
  width: 74px;
  height: 74px;
  border-radius: 1.35rem;
}

.float-badge-plus {
  left: -20%;
  bottom: 17%;
  width: 68px;
  height: 68px;
}

.float-badge-book {
  right: -20%;
  top: 12%;
}

.hero-sub {
  margin-top: 1.1rem;
}

.hero-sub .role {
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
}

.hero-actions {
  margin-top: 1.35rem;
}

.section {
  margin-top: clamp(3.5rem, 7vw, 7rem);
}

.card,
.media-card,
.stack-item,
.interest,
.contact-list li,
.form {
  border-color: rgba(185, 207, 225, 0.78);
  box-shadow: 0 14px 32px rgba(58, 104, 150, 0.08);
}

@media (max-width: 900px) {
  .nav {
    width: auto;
    min-height: auto;
    border-radius: 1.25rem;
  }

  .hero-composition {
    gap: var(--space-3);
  }

  .hero-name-left,
  .hero-name-right {
    transform: none;
  }

  .hero-portrait {
    aspect-ratio: 1;
    border-radius: 50%;
  }
}

/* Keep the original compact navigation and foreground portrait treatment. */
.header-inner { justify-content: space-between; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.05;
}

.logo strong { display: block; color: var(--accent-deep); font-weight: 800; }

.logo-mark {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #287eb5, #75b8dc);
  box-shadow: 0 7px 18px rgba(40, 126, 181, 0.22);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.nav {
  width: auto;
  min-height: auto;
  justify-content: center;
  padding: 0 0.35rem;
  background: #8eb4d4;
  border-radius: var(--radius-pill);
}

.nav a { padding: 0.72rem 1.15rem; }

.hero-stage { --pointer-x: 0px; --pointer-y: 0px; }

.hero-portrait-wrap {
  transform: translate(var(--pointer-x), var(--pointer-y));
  transition: transform 0.32s ease-out;
}

.hero-portrait {
  overflow: visible;
  aspect-ratio: 0.72;
  border-radius: 0;
  box-shadow: none;
}

.hero-portrait img {
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 22px 18px rgba(30, 75, 108, 0.18));
}

@media (max-width: 900px) {
  .hero-portrait { aspect-ratio: 1; border-radius: 0; }
  .hero-name-left, .hero-name-right { animation: none; }
}

@media (max-width: 820px) {
  .logo { display: inline-flex; }
  .nav { width: auto; border-radius: 1.1rem; }
}

.hero-portrait-wrap {
  width: clamp(190px, 20vw, 285px);
  align-self: end;
  margin-bottom: -1.2rem;
}

@media (min-width: 901px) {
  .hero-composition {
    grid-template-columns: minmax(0, 1fr) clamp(190px, 20vw, 285px) minmax(0, 1fr);
  }
}

.hero-portrait {
  aspect-ratio: 0.79;
}

.footer-inner {
  align-items: center;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.28rem 0.68rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
  transform: translateY(-2px);
}

@media (max-width: 820px) {
  .hero-portrait-wrap {
    width: min(230px, 56vw);
    margin-bottom: 0;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Shared motion and interaction layer */
.has-site-motion .site-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease var(--reveal-delay, 0ms), transform 0.65s cubic-bezier(.2,.8,.2,1) var(--reveal-delay, 0ms);
}

.has-site-motion .site-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.interactive-card {
  transform: perspective(900px) rotateX(var(--card-y, 0deg)) rotateY(var(--card-x, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.interactive-card:hover {
  box-shadow: 0 22px 42px rgba(58, 104, 150, 0.15);
}

.card.interactive-card:hover,
.media-card.interactive-card:hover {
  transform: perspective(900px) translateY(-3px) rotateX(var(--card-y, 0deg)) rotateY(var(--card-x, 0deg));
}

.nav a {
  position: relative;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav a:hover {
  transform: translateY(-1px);
}

.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 22%, rgba(255,255,255,0.28) 48%, transparent 74%);
  transform: translateX(-120%);
  transition: transform 0.48s ease;
}

.btn:hover::after,
.btn:focus-visible::after {
  transform: translateX(120%);
}

/* Contact-style footer without portrait imagery */
.footer-showcase {
  margin: 0 clamp(1rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 0;
  border-radius: 1.6rem;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(58, 104, 150, 0.12);
}

.footer-showcase-main {
  position: relative;
  min-height: 22rem;
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
}

.footer-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.52;
  background-image: linear-gradient(rgba(197, 217, 236, 0.42) 1px, transparent 1px), linear-gradient(90deg, rgba(197, 217, 236, 0.42) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(90deg, black, transparent 75%);
}

.footer-showcase-main::after {
  content: "";
  position: absolute;
  width: 28rem;
  height: 12rem;
  right: -8rem;
  bottom: -5rem;
  border-radius: 999px;
  background: #dcecf7;
}

.footer-copy {
  position: relative;
  z-index: 1;
  max-width: 45rem;
}

.footer-copy h2 {
  margin: 0.55rem 0 0.85rem;
  color: var(--accent-deep);
  font-size: clamp(2rem, 4vw, 3.35rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.footer-copy > p:not(.kicker) {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
}

.footer-location {
  margin-top: 1.35rem;
  color: var(--fg) !important;
  font-weight: 600;
}

.footer-email {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: none;
}

.footer-email:hover { text-decoration: underline; }

.footer-showcase .footer-social {
  margin-top: 1.5rem;
}

.footer-signoff {
  padding: 1.45rem var(--space-5);
  background: #4a8fb8;
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 700px) {
  .footer-showcase-main { min-height: auto; padding: 2.75rem 1.5rem; }
  .footer-grid { mask-image: none; }
  .footer-showcase-main::after { width: 18rem; right: -10rem; }
}
