/* A quiet, skills-first portfolio. Water-lily greens, mist blues and warm whites. */
:root {
  color-scheme: light;
  --bg: #f7f8f5; --surface: #fff; --ink: #253238; --muted: #57656b;
  --accent: #355f59; --line: #d9e0db; --green: #dce8dd; --blue: #dee7ef;
  --lilac: #e5deed; --peach: #f0e4d6; --nav: rgba(247,248,245,.94);
  --header-height: 76px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #182222; --surface: #202d2d; --ink: #edf0e9; --muted: #b2c1bb;
  --accent: #b1d4c4; --line: #3c4c49; --green: #293f36; --blue: #2b3b48;
  --lilac: #383343; --peach: #413a31; --nav: rgba(24,34,34,.94);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
h1,h2,h3,p,ul,ol,dl,dd { margin: 0; }
h1,h2,h3 { font-weight: 600; line-height: 1.15; letter-spacing: -.035em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
.container { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: -100px; padding: 10px 20px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 10; background: var(--nav); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-color: var(--line); }
.nav-container { display: flex; align-items: center; min-height: var(--header-height); gap: 32px; }
.wordmark { font-size: 23px; font-weight: 650; letter-spacing: -.05em; }
.wordmark span { color: var(--accent); }
.nav-menu { margin-left: auto; display: flex; gap: 28px; list-style: none; padding: 0; }
.nav-link { display: inline-block; padding: 12px 0; font-size: 15px; color: var(--muted); }
.nav-link:hover, .nav-link.active { color: var(--accent); text-decoration: underline; text-underline-offset: 7px; }
.nav-actions { display: flex; gap: 6px; }
.theme-toggle, .nav-hamburger { display: grid; place-content: center; height: 44px; width: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); }
.theme-toggle:hover, .nav-hamburger:hover { background: var(--green); }
.nav-hamburger { display: none; gap: 6px; }
.nav-hamburger span { width: 20px; height: 1px; background: currentColor; }
.hero { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 72px; align-items: center; padding-block: 86px 94px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .15em; margin-bottom: 18px; }
h1 { font-size: clamp(46px, 6.2vw, 82px); line-height: 1.08; letter-spacing: -.055em; }
h1 span { color: var(--accent); }
.hero-intro { max-width: 660px; margin-top: 26px; font-size: 21px; line-height: 1.7; color: var(--muted); }
.hero-detail { font-size: 15px; color: var(--muted); margin-top: 20px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 32px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 14px; min-height: 44px; padding: 10px 22px; border-radius: 24px; border: 1px solid transparent; font-size: 15px; font-weight: 550; transition: background-color .18s; }
.primary { background: #355f59; color: #fff; }
.primary:hover { background: #284b46; }
.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.secondary:hover { background: var(--green); }
.text-link { color: var(--accent); font-size: 16px; font-weight: 550; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.profile { padding: 32px; border-radius: 28px; background: linear-gradient(145deg, var(--green), var(--blue) 65%, var(--lilac)); }
.profile img { border-radius: 50%; object-fit: cover; margin-bottom: 22px; }
.profile-name { font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.profile-role { font-size: 14px; color: var(--muted); }
.profile-divider { height: 1px; margin-block: 22px; background: var(--accent); opacity: .2; }
.profile > p:not(.profile-name):not(.profile-role) { font-size: 15px; color: var(--muted); }
.section { padding-block: 76px; border-top: 1px solid var(--line); }
h2 { font-size: clamp(34px, 3.8vw, 49px); }
.section-heading { margin-bottom: 44px; }
.section-heading > p:last-child:not(.eyebrow) { margin-top: 16px; color: var(--muted); max-width: 760px; }
.capabilities { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 36px; }
.capability-number { display: grid; place-items: center; height: 42px; width: 42px; margin-bottom: 24px; border-radius: 13px; background: var(--green); font-size: 14px; color: var(--ink); }
.capability:nth-child(2) .capability-number { background: var(--blue); }
.capability:nth-child(3) .capability-number { background: var(--lilac); }
h3 { font-size: 24px; }
.capability p { font-size: 16px; color: var(--muted); margin-top: 16px; }
.output strong { display: block; color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin-top: 22px; }
.tags li { padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; color: var(--muted); }
.learning-note { display: flex; align-items: baseline; gap: 28px; margin-top: 40px; padding: 22px 0 0; border-top: 1px solid var(--line); }
.learning-note .eyebrow { flex-shrink: 0; margin: 0; }
.learning-note p { color: var(--muted); font-size: 15px; }
.project-feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 70px; padding: 44px; background: var(--surface); border-radius: 24px; }
.project-copy h3 { font-size: 30px; letter-spacing: -.045em; overflow-wrap: anywhere; }
.project-copy > p:not(.eyebrow) { color: var(--muted); font-size: 16px; margin-top: 20px; }
.project-copy .button { margin-top: 26px; }
.project-contents > div { padding-block: 20px; border-bottom: 1px solid var(--line); }
.project-contents > div:first-child { padding-top: 0; }
.project-contents > div:last-child { border: 0; padding-bottom: 0; }
.project-contents dt { font-size: 15px; font-weight: 600; }
.project-contents dt span { color: var(--accent); font-size: 11px; margin-right: 12px; }
.project-contents dd { color: var(--muted); font-size: 15px; margin-top: 7px; }
.workflow-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 30px; padding: 0; list-style: none; }
.workflow-grid li { border-top: 2px solid var(--green); padding-top: 20px; }
.workflow-grid li:nth-child(2) { border-color: var(--blue); }
.workflow-grid li:nth-child(3) { border-color: var(--lilac); }
.workflow-grid li:nth-child(4) { border-color: var(--peach); }
.workflow-grid span { font-size: 11px; color: var(--accent); }
.workflow-grid h3 { margin-top: 15px; font-size: 21px; }
.workflow-grid p { color: var(--muted); font-size: 16px; margin-top: 12px; }
.pub-item { display: grid; grid-template-columns: 70px minmax(0,1fr); gap: 24px; padding-block: 28px; border-top: 1px solid var(--line); }
.pub-year { color: var(--muted); font-size: 15px; padding-top: 3px; }
.pub-title { font-size: 21px; line-height: 1.5; letter-spacing: -.015em; }
.pub-title a:hover { color: var(--accent); }
.pub-journal { font-size: 15px; color: var(--muted); margin-top: 10px; }
.project-desc { color: var(--muted); font-size: 15px; margin-top: 12px; }
.pub-links { color: var(--accent); font-size: 15px; margin-top: 12px; }
.pub-links a:hover { text-decoration: underline; }
.publication-profile { display: inline-block; margin-top: 12px; }
.contact-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; border-radius: 24px; padding: 44px; background: var(--green); }
.contact-panel p:not(.eyebrow):not(.copy-status) { color: var(--muted); margin-top: 20px; font-size: 16px; }
.contact-actions { align-self: center; min-width: 0; }
.email-link { display: block; font-size: clamp(16px,2.1vw,23px); letter-spacing: -.025em; overflow-wrap: anywhere; margin-bottom: 18px; }
.copy-status { font-size: 14px; color: var(--ink); min-height: 24px; margin-top: 8px; }
.social-links { display: flex; gap: 24px; font-size: 15px; }
.social-links a:hover, .email-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 26px 40px; color: var(--muted); font-size: 14px; }
::selection { background: var(--lilac); color: var(--ink); }
@media (max-width: 900px) {
  .container { width: calc(100% - 48px); }
  .hero { gap: 36px; grid-template-columns: minmax(0,1fr) 250px; padding-block: 60px; }
  .nav-container { gap: 16px; }
  .nav-menu { gap: 16px; }
  .capabilities { gap: 24px; }
  .project-feature, .contact-panel { gap: 32px; padding: 32px; }
}
@media (max-width: 768px) {
  .nav-container { flex-wrap: wrap; justify-content: space-between; gap: 0; }
  .nav-actions { margin-left: auto; }
  .nav-menu { order: 3; width: 100%; flex-wrap: wrap; margin-left: 0; gap: 12px 24px; padding-block: 12px; }
  .menu-ready .nav-menu { display: none; }
  .menu-ready .nav-menu.active { display: flex; }
  .nav-hamburger { display: grid; }
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .profile { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; padding: 24px; }
  .profile img { grid-row: 1 / 3; width: 64px; height: 64px; margin: 0; }
  .profile-name { align-self: end; }
  .profile-divider, .profile > p:not(.profile-name):not(.profile-role) { display: none; }
  .profile > .text-link { grid-column: 2; margin-top: 10px; }
  .hero-copy { max-width: 580px; }
  .capabilities { grid-template-columns: 1fr; gap: 32px; }
  .capability { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 22px; }
  .capability-number { margin: 0; }
  .section { padding-block: 54px; }
  .learning-note { flex-direction: column; gap: 12px; }
  .project-feature, .contact-panel { grid-template-columns: 1fr; }
  .workflow-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 40px); }
  .hero { padding-block: 46px 54px; }
  .hero-intro { font-size: 17px; }
  .hero-detail { font-size: 14px; }
  .actions { gap: 18px; }
  .project-feature, .contact-panel { padding: 24px; border-radius: 18px; }
  .pub-item { grid-template-columns: 1fr; gap: 8px; }
  .capability { grid-template-columns: 1fr; gap: 16px; }
  .footer p:nth-child(2) { width: 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print {
  .site-header, .nav-actions, #copyEmail, .copy-status { display: none !important; }
  body { background: white; color: black; }
  .container { width: 100%; }
  .hero, .section { padding-block: 24px; }
  .capability, .pub-item, .project-feature { break-inside: avoid; }
}

/* Gentle interactions: a short watercolor entrance, scroll reveals and hover depth. */
.hero { position: relative; isolation: isolate; }
.hero::before { content: ''; position: absolute; z-index: -1; inset: 4% -12px 0; border-radius: 48%; pointer-events: none; background: radial-gradient(ellipse at 28% 35%, var(--green), transparent 63%), radial-gradient(ellipse at 65% 65%, var(--lilac), transparent 65%); opacity: .3; }
.pub-links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: watercolor-arrive 3.5s ease-out both; }
  .hero-copy > * { animation: soft-arrive .7s cubic-bezier(.2,.7,.3,1) both; }
  .hero-copy h1 { animation-delay: .08s; }
  .hero-copy .hero-intro { animation-delay: .16s; }
  .hero-copy .hero-detail { animation-delay: .22s; }
  .hero-copy .actions { animation-delay: .28s; }
  .profile { transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .25s ease-out, box-shadow .25s; }
  .button { transition: transform .2s ease, background-color .2s, box-shadow .2s; }
  .button:active { transform: scale(.97); }
  .button span { transition: transform .2s; }
  .capability-number { transition: transform .3s, border-radius .3s; }
  .theme-toggle svg { transition: transform .4s ease; }
  .theme-toggle:hover svg { transform: rotate(35deg); }
  .tags li { transition: background-color .2s, transform .2s; }
  @media (hover: hover) and (pointer: fine) {
    .profile:hover { box-shadow: 0 18px 38px -28px var(--accent); }
    .button:hover { transform: translateY(-2px); }
    .button:hover span { transform: translate(2px,-2px); }
    .capability:hover .capability-number { transform: translateY(-3px) rotate(-6deg); border-radius: 17px; }
    .tags li:hover { transform: translateY(-2px); background: var(--green); }
  }
}
@keyframes soft-arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes watercolor-arrive { from { opacity: 0; transform: scale(.94) translateY(12px); } to { opacity: .3; transform: none; } }
@media (prefers-reduced-motion: reduce), print { *, *::before, *::after { animation: none !important; transition: none !important; } .profile { transform: none !important; } }

/* Each section is a full viewport canvas; longer content remains scrollable. */
.hero, .section {
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
}
.hero { align-content: start; align-items: start; }
.section { display: flex; flex-direction: column; justify-content: flex-start; }
.profile > .text-link { display: flex; align-items: center; gap: 8px; width: fit-content; }
.profile > p + .text-link { margin-top: 24px; }
.profile > .text-link + .text-link { margin-top: 12px; }
.profile > .text-link svg { flex-shrink: 0; }
.publication-profile { align-self: flex-start; }
@media print {
  .hero, .section { min-height: 0; }
}

/* Keep the opening content in the upper portion of each viewport. */
@media (min-width: 769px) {
  .hero, .section { padding-top: clamp(48px, 8vh, 88px); }
}
/* Wheel easing supplies its own timing; avoid a second native smooth animation. */
html.wheel-easing { scroll-behavior: auto; }

/* More legible type and substantive notes within each viewport canvas. */
.hero-context { max-width: 650px; color: var(--muted); font-size: 17px; margin-top: 24px; }
.note-topics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 32px; margin-top: 36px; scroll-margin-top: 20px; }
.note-topic { border-top: 2px solid var(--green); padding-top: 22px; }
.note-topic:nth-child(2) { border-color: var(--blue); }
.note-topic:nth-child(3) { border-color: var(--lilac); }
.note-topic h3 { font-size: 22px; line-height: 1.3; }
.note-topic p:not(.eyebrow) { font-size: 16px; color: var(--muted); margin-top: 14px; }
.note-topic .eyebrow { margin-bottom: 12px; }





.capability, .note-topic, .project-copy { min-width: 0; }
@media (max-width: 900px) {
  .nav-menu { gap: 14px; }
  .nav-link { font-size: 13px; }
  .note-topics { gap: 24px; }
}
@media (max-width: 768px) {
  .note-topics { grid-template-columns: 1fr; }

  .hero-context { font-size: 16px; }
}

/* A decorative wheel cue appears only while the document is moving. */
.scroll-cue { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; z-index: 20; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; padding: 10px 14px; border-radius: 28px; background: var(--nav); border: 1px solid var(--line); transition: opacity .25s ease, transform .25s ease; }
.scroll-cue.is-scrolling { opacity: 1; transform: translate(-50%, 0); }
.scroll-mouse { display: block; width: 22px; height: 34px; border: 1.5px solid var(--accent); border-radius: 12px; position: relative; }
.scroll-wheel { position: absolute; left: 8px; top: 6px; width: 3px; height: 7px; border-radius: 2px; background: var(--accent); }
.scroll-cue.is-scrolling .scroll-wheel { animation: wheel-hint 1.15s ease-in-out infinite; }
@keyframes wheel-hint { 0% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce), print { .scroll-cue { display: none; } }

/* iPhone / mobile Safari: safe areas, stable viewport height and touch targets. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.site-header { -webkit-backdrop-filter: blur(16px); }
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  :root { --header-height: calc(64px + env(safe-area-inset-top, 0px)); }
  .site-header { padding-top: env(safe-area-inset-top, 0px); }
  .nav-container { min-height: 64px; }
  .container { width: min(1200px, calc(100% - 40px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))); }
  .hero, .section { min-width: 0; }
  .hero-copy, .profile, .pub-content, .project-contents { min-width: 0; }
  .hero-copy h1 { font-size: clamp(38px, 10.5vw, 64px); }
  .hero::before { inset-inline: 0; }
  .pub-title, .profile-role { overflow-wrap: anywhere; }
  .profile > .text-link, .pub-links a, .social-links a, .actions > .text-link, .publication-profile { min-height: 44px; display: inline-flex; align-items: center; }
  .profile > .text-link + .text-link { margin-top: 2px; }
  .nav-menu.active { max-height: calc(100svh - var(--header-height)); overflow-y: auto; }
  .nav-link { min-height: 44px; }
  .footer { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
  .scroll-cue { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding: 7px 10px; }
  .scroll-mouse { width: 18px; height: 28px; }
  .scroll-wheel { left: 6px; height: 5px; }
}
@media (max-width: 360px) {
  .workflow-grid { grid-template-columns: 1fr; }
  .profile { column-gap: 12px; padding: 20px; }
  .contact-panel { padding: 20px; }
}
@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .hero, .section { padding-block: 36px; }
}

/* Content depth and a consistent visual hierarchy. */
.hero-focus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-focus dt { color: var(--accent); font-size: 12px; font-weight: 600; }
.hero-focus dd { margin-top: 5px; color: var(--muted); font-size: 14px; }
.capability { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.note-detail { margin-top: 22px; border-top: 1px solid var(--line); }
.note-detail summary { padding-block: 14px; min-height: 44px; cursor: pointer; color: var(--accent); font-size: 15px; font-weight: 600; }
.note-detail summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.note-detail[open] summary { border-bottom: 1px solid var(--line); }
.note-detail code { font-size: .85em; overflow-wrap: anywhere; }
.note-topic .note-caption { font-size: 12px; color: var(--accent); }
.section-note { margin-top: 28px; color: var(--muted); font-size: 14px; }
.analysis-record { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; margin-top: 48px; padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.analysis-record h3 { max-width: 300px; line-height: 1.3; }
.record-items > div + div { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.record-items dt { font-size: 15px; font-weight: 600; }
.record-items dd { margin-top: 4px; color: var(--muted); font-size: 15px; }
.contact-prompts { padding-left: 20px; margin-top: 24px; color: var(--muted); font-size: 14px; }
.contact-prompts li + li { margin-top: 8px; }
@media (max-width: 900px) { .capabilities { gap: 18px; } .capability { padding: 22px; } }
@media (max-width: 768px) {
  .analysis-record { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .analysis-record h3 { max-width: none; }
}
@media (max-width: 480px) {
  .hero-focus { grid-template-columns: 1fr; gap: 16px; }
  .workflow-grid { grid-template-columns: 1fr; }
}
@media print { .analysis-record, .note-topic { break-inside: avoid; } }
