/* Theme tokens */
:root {
  color-scheme: light;
  --bg: #edf5fb;
  --surface: #ffffff;
  --band: #f7fbff;
  --ink: #17324a;
  --muted: #5a7185;
  --line: #d3e2ee;
  --primary: #2f769f;
  --control-active: #17384d;
  --control-active-text: #ffffff;
  --portrait-glow: rgb(47 118 159 / 32%);
  --button-text: #ffffff;
  --shadow: 0 12px 38px rgb(43 94 128 / 8%);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #091824;
  --surface: #12283a;
  --band: #0d2030;
  --ink: #edf7ff;
  --muted: #a9c1d3;
  --line: #29485f;
  --primary: #78c4ed;
  --control-active: #dff3ff;
  --control-active-text: #123247;
  --portrait-glow: rgb(120 196 237 / 58%);
  --button-text: #0a2638;
  --shadow: none;
}
/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.7 "Plus Jakarta Sans", sans-serif; }
h1, h2, h3, .brand { font-family: "Sora", sans-serif; line-height: 1.2; letter-spacing: -.035em; }
h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); margin: 1rem 0; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 0 0 1rem; text-wrap: balance; }
h3 { font-size: 1.2rem; margin: 0 0 .8rem; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
ul { padding-left: 1.2rem; }
li + li { margin-top: .5rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.shell { width: min(1140px, calc(100% - 48px)); margin-inline: auto; }
section { padding-block: 80px; scroll-margin-top: 88px; }
.band { background: var(--band); border-block: 1px solid var(--line); }
.skip-link { position: fixed; left: 1rem; top: -6rem; z-index: 30; padding: .8rem; background: var(--primary); color: var(--button-text); }
.skip-link:focus { top: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Navigation */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--band); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 80px; }
.brand { font-size: 1.5rem; font-weight: 700; white-space: nowrap; }
.brand span { color: var(--primary); }
#main-nav { position: relative; display: flex; gap: .25rem; padding: .3rem; border: 1px solid var(--line); border-radius: 99px; }
#main-nav a { position: relative; z-index: 1; padding: .48rem .88rem; border-radius: 99px; font-size: .88rem; font-weight: 700; color: var(--muted); transition: color .25s; }
#main-nav a[aria-current] { background: var(--primary); color: var(--button-text); }
#main-nav a:not([aria-current]):hover { background: color-mix(in srgb, var(--primary) 11%, transparent); color: var(--primary); }
.nav-indicator { position: absolute; top: .3rem; bottom: .3rem; left: 0; z-index: 0; border-radius: 99px; background: var(--primary); pointer-events: none; transition: width .42s cubic-bezier(.22, 1, .36, 1), transform .42s cubic-bezier(.22, 1, .36, 1); }
@media (min-width: 641px) {
  #main-nav a[aria-current] { background: transparent; color: var(--button-text); }
}
.theme-toggle, .menu-toggle { min-height: 44px; padding: .52rem .82rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: .84rem; font-weight: 700; }
.theme-toggle { display: inline-flex; align-items: center; gap: .45rem; overflow: hidden; view-transition-name: theme-control; transition: color .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s cubic-bezier(.22, 1, .36, 1); }
.theme-icon { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: theme-icon-in .45s cubic-bezier(.22, 1, .36, 1); }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
.theme-toggle:is(:hover, .is-switching) { color: var(--control-active-text); background: var(--control-active); border-color: var(--control-active); box-shadow: 0 8px 22px color-mix(in srgb, var(--control-active) 24%, transparent); transform: translateY(-2px); }
.theme-toggle:is(:hover, .is-switching) .theme-icon { transform: rotate(18deg) scale(1.08); }
.theme-toggle.is-switching .theme-icon { animation: none; }
.theme-toggle:active { transform: translateY(0) scale(.96); transition-duration: .1s; }
@keyframes theme-icon-in { from { opacity: 0; transform: rotate(-70deg) scale(.55); } to { opacity: 1; transform: rotate(0) scale(1); } }
::view-transition-old(root), ::view-transition-new(root), ::view-transition-old(theme-control), ::view-transition-new(theme-control) { animation: none; mix-blend-mode: normal; }
.theme-fallback, .theme-fallback body, .theme-fallback .site-header, .theme-fallback .band, .theme-fallback .card, .theme-fallback .project-card, .theme-fallback .button, .theme-fallback .theme-toggle { transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease; }
.menu-toggle { display: none; }
/* Hero */
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); min-height: calc(100svh - 77px); gap: clamp(40px, 5vw, 72px); align-items: center; padding-block: clamp(40px, 6vh, 72px); }
.hero::before, .hero::after { content: ""; position: absolute; inset-block: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none; }
.hero::before { z-index: -2; background: radial-gradient(circle at 78% 42%, color-mix(in srgb, var(--primary) 18%, transparent) 0, color-mix(in srgb, var(--primary) 7%, transparent) 24%, transparent 48%), linear-gradient(135deg, color-mix(in srgb, var(--surface) 54%, transparent), transparent 58%); }
.hero::after { z-index: -1; opacity: .32; background-image: linear-gradient(color-mix(in srgb, var(--primary) 15%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--primary) 15%, transparent) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(circle at 78% 44%, #000 0, transparent 52%); mask-image: radial-gradient(circle at 78% 44%, #000 0, transparent 52%); }
.hero-copy { max-width: 680px; }
.hero-copy > p:not(.eyebrow) { max-width: 65ch; color: var(--muted); font-size: 1.02rem; }
.hero-greeting { color: var(--muted); font-size: .5em; font-weight: 600; letter-spacing: -.015em; }
.role-line { display: inline-block; min-width: 19ch; color: var(--primary); }
.typing-cursor { display: inline-block; width: .08em; height: .82em; margin-left: .08em; background: currentColor; animation: cursor-blink .8s steps(1) infinite; }
@keyframes cursor-blink { 50% { opacity: 0; } }
.eyebrow { font-size: .82rem; font-weight: 800; color: var(--primary); }
.lead { font-size: 1.08rem; }
.facts, .tags { list-style: none; display: flex; flex-wrap: wrap; padding: 0; gap: .5rem; }
.facts li, .tags li { border: 1px solid var(--line); border-radius: 99px; padding: .35rem .7rem; margin: 0; font-size: .78rem; background: var(--surface); }
.actions, .project-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 99px; padding: .65rem 1.1rem; background: var(--surface); font-weight: 800; font-size: .82rem; transition: transform .18s, border-color .18s; }
.button:hover { transform: translateY(-2px); border-color: var(--primary); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--primary); color: var(--button-text); border-color: var(--primary); }
.social-actions { margin-top: 1.3rem; }
.social-actions .button { gap: .5rem; }
.social-actions svg { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.hero-note { display: grid; width: fit-content; margin: 1.35rem 0; padding: .85rem 1rem; gap: .1rem; border-left: 3px solid var(--primary); border-radius: 0 12px 12px 0; background: var(--band); }
.hero-note strong { font-family: "Sora", sans-serif; font-size: .88rem; }
.hero-note span { color: var(--muted); font-size: .78rem; }
.portrait { position: relative; z-index: 0; width: min(360px, calc(100% - 44px)); aspect-ratio: 1; justify-self: center; margin: 24px; padding: 9px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); box-shadow: 0 20px 55px rgb(43 94 128 / 16%); }
.portrait::before { content: ""; position: absolute; inset: -34px; z-index: -2; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 52%, var(--portrait-glow) 68%, transparent 84%); filter: blur(20px); pointer-events: none; animation: portrait-spin 5.5s linear infinite; }
.portrait-media { position: relative; width: 100%; height: 100%; isolation: isolate; }
.portrait-media::before, .portrait-media::after { content: ""; position: absolute; pointer-events: none; }
.portrait-media::before { inset: -20px; z-index: -2; border: 1px solid color-mix(in srgb, var(--primary) 42%, transparent); border-radius: 50%; animation: portrait-halo 4.2s ease-in-out infinite; }
.portrait-media::after { inset: -13px; z-index: -1; padding: 3px; border-radius: 50%; background: conic-gradient(transparent 0 58%, var(--primary) 76%, transparent 92%); filter: drop-shadow(0 0 8px var(--portrait-glow)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: portrait-spin 5.5s linear infinite; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; border-radius: 50%; }
@keyframes portrait-halo { 0%, 100% { opacity: .4; transform: scale(.985); } 50% { opacity: 1; transform: scale(1.025); box-shadow: 0 0 28px color-mix(in srgb, var(--primary) 20%, transparent); } }
@keyframes portrait-spin { to { transform: rotate(360deg); } }
/* Content */
.section-head { max-width: 42rem; margin-bottom: 28px; }
.section-head p { color: var(--muted); }
.section-head h2, .contact-layout > div > h2 { color: var(--ink); }
.section-head h2::after, .contact-layout > div > h2::after { content: ""; display: block; width: 72px; height: 3px; margin-top: .8rem; border-radius: 99px; background: linear-gradient(90deg, var(--primary), transparent); }
#overview .section-head, #projects .section-head, #skills .section-head { margin-inline: auto; text-align: center; }
#overview .section-head h2::after, #projects .section-head h2::after, #skills .section-head h2::after { width: 92px; margin-inline: auto; background: linear-gradient(90deg, transparent, var(--primary), transparent); }
.overview-grid, .projects-grid, .skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.card p, .card ul { color: var(--muted); }
.card p:last-child { margin: 0; }
.overview-grid h3 { color: var(--primary); font-size: .95rem; }
.overview-grid:has(> :last-child:nth-child(odd)) > .featured-overview { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.overview-feature-title, .overview-feature-copy { min-width: 0; }
.overview-feature-title .eyebrow { margin-bottom: .65rem; }
.overview-feature-title h3 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.7rem); }
.overview-feature-copy { padding-left: 48px; border-left: 1px solid var(--line); }
.accent-card { border-color: var(--primary); }
.project-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; transition: transform .2s, border-color .2s; }
.project-card:hover, .project-card:focus-within { transform: translateY(-4px); border-color: var(--primary); }
.projects-grid:has(> :nth-child(3):last-child) > .featured-project { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); }
.projects-grid:has(> :nth-child(3):last-child) > .featured-project .project-image-cover { aspect-ratio: auto; min-height: 360px; }
.project-cover { min-height: 240px; padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.project-cover span { font-size: .75rem; margin-bottom: 1.2rem; }
.project-cover strong { font: 600 clamp(1.65rem, 2.7vw, 2.3rem)/1.15 "Sora", sans-serif; letter-spacing: -.035em; overflow-wrap: anywhere; }
.project-cover p { font-size: .85rem; margin: 1rem 0 0; }
.tutor-cover { background: #dceefa; color: #245a7d; }
.project-image-cover { aspect-ratio: 16 / 9; min-height: 240px; padding: 0; overflow: hidden; }
.project-image-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.wedding-cover { background: #e6effb; color: #385d89; }
.pharmacy-cover { background: #dcebf4; color: #315b73; }
.project-body { display: flex; flex-direction: column; flex: 1; padding: 26px; }
.project-body > p:not(.eyebrow) { color: var(--muted); font-size: .9rem; }
.project-body .role { font-weight: 700; }
.tags { margin-top: .2rem; }
details { border-top: 1px solid var(--line); margin-block: .7rem 1.5rem; padding-top: 1rem; font-size: .87rem; color: var(--muted); }
summary { cursor: pointer; color: var(--primary); font-weight: 800; min-height: 44px; }
details li { margin-bottom: .75rem; }
.stack { font-size: .8rem; }
.project-links { margin-top: auto; }
.project-detail-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.project-detail-link:focus-visible { outline: none; }
.project-card:has(.project-detail-link:focus-visible) { outline: 3px solid var(--primary); outline-offset: 4px; }
.project-links, .project-links a { position: relative; z-index: 2; }
/* Project case studies */
.project-page { min-height: 100vh; }
nav.project-nav { display: block; padding: 24px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--band); }
.project-nav-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.project-nav-actions { display: flex; align-items: center; gap: .75rem; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; padding: .45rem .75rem; border: 1px solid transparent; border-radius: 12px; color: var(--primary); font-weight: 800; transition: color .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s cubic-bezier(.22, 1, .36, 1); }
.back-link:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 32%, transparent); box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 12%, transparent); transform: translateX(-4px); }
.back-link:active { transform: translateX(-2px) scale(.97); transition-duration: .1s; }
.case-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 72px; align-items: center; padding-block: clamp(64px, 8vw, 112px); }
.case-hero h1 { max-width: 14ch; }
.case-lead { max-width: 62ch; color: var(--muted); font-size: 1.08rem; }
.case-meta { display: grid; gap: 0; margin: 0; padding: 8px 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.case-meta div { display: grid; gap: .25rem; }
.case-meta div { padding-block: 20px; }
.case-meta div + div { border-top: 1px solid var(--line); }
.case-meta dt { color: var(--muted); font-size: .75rem; font-weight: 700; }
.case-meta dd { margin: 0; font-weight: 700; }
.case-study { display: grid; grid-template-columns: minmax(250px, .62fr) minmax(0, 1.38fr); gap: 48px; align-items: start; padding-block: clamp(64px, 8vw, 96px); }
.case-study aside { position: sticky; top: 32px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.case-study aside h3 { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.case-study article { display: grid; max-width: 72ch; gap: 20px; }
.case-study article section { padding: 30px 32px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.case-study h2 { padding-bottom: .75rem; border-bottom: 1px solid var(--line); color: var(--ink); font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.case-study p, .case-study li { color: var(--muted); }
.case-study article section > :last-child { margin-bottom: 0; }
.case-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 24px; }
.experience-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.experience-layout > .section-head { position: sticky; top: 110px; }
.timeline { --timeline-axis: 9px; --timeline-gutter: 34px; position: relative; display: grid; gap: 24px; padding-left: var(--timeline-gutter); }
.timeline::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: var(--timeline-axis); width: 2px; border-radius: 99px; background: linear-gradient(var(--primary), color-mix(in srgb, var(--primary) 28%, var(--line))); transform: translateX(-50%) scaleY(var(--timeline-progress, 1)); transform-origin: top; }
.timeline .card { position: relative; }
.timeline .card::before { content: ""; position: absolute; top: 28px; left: calc(var(--timeline-axis) - var(--timeline-gutter)); width: 14px; height: 14px; border: 3px solid var(--band); border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 0 18px color-mix(in srgb, var(--primary) 28%, transparent); transform: translateX(-50%) scale(var(--marker-scale, 1)); }
.experience-company { color: var(--ink) !important; font-weight: 700; }
.text-link { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.skills-grid ul { margin-bottom: 0; }
.strengths { max-width: 75ch; margin-top: 40px; }
.strengths p { color: var(--muted); }
/* Contact */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-layout > div > p:not(.eyebrow) { color: var(--muted); }
.contact-form { display: grid; align-self: start; }
.contact-form-fields { display: grid; gap: 12px; }
.contact-form h3, .contact-form p { margin: 0; }
.contact-form label { font-size: .88rem; font-weight: 700; }
.contact-form input, .contact-form textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--band);
  color: var(--ink);
  font: inherit;
}
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); opacity: 1; }
.contact-form .contact-form-note { font-size: .78rem; color: var(--muted); }
.contact-submit-status { min-height: 1.4em; color: #b42318; font-size: .82rem; font-weight: 700; }
.contact-form .button { justify-self: start; }
.contact-form button:disabled { cursor: wait; opacity: .65; transform: none; }
.contact-form.is-success { min-height: 420px; place-items: center; }
.contact-success { max-width: 28rem; text-align: center; }
.contact-success .button { justify-self: center; margin-top: .45rem; }
.contact-success p { color: var(--muted); }
.success-check { display: block; width: 96px; height: 96px; margin: 0 auto 1.5rem; overflow: visible; }
.success-check-ring, .success-check-mark { fill: none; stroke: var(--primary); stroke-linecap: round; stroke-linejoin: round; }
.success-check-ring { stroke-width: 5; stroke-dasharray: 252; }
.success-check-mark { stroke-width: 7; stroke-dasharray: 64; }
.contact-card { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; font-style: normal; }
.contact-card > span { font-size: .75rem; color: var(--muted); }
.contact-card a { overflow-wrap: anywhere; max-width: 100%; font-weight: 600; }
.contact-copy-row { display: flex; max-width: 100%; gap: .7rem; align-items: center; }
.contact-copy { max-width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 600; text-align: left; overflow-wrap: anywhere; user-select: text; }
.contact-copy:hover { color: var(--primary); }
.copy-status { color: var(--primary); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.contact-card > p { margin-bottom: 1rem; }
.contact-social-links { margin-top: 22px; }
.contact-social-links > p { margin-bottom: .7rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
.contact-social-links .button { background: transparent; }
.contact-social-links .button:hover { background: color-mix(in srgb, var(--primary) 9%, var(--surface)); }
.site-footer { --footer-bg: var(--bg); --footer-ink: var(--ink); --footer-muted: var(--muted); --footer-line: var(--line); padding-block: 56px 24px; border-top: 1px solid var(--footer-line); background: var(--footer-bg); color: var(--footer-muted); transition: background-color .35s ease, color .35s ease, border-color .35s ease; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr); grid-template-areas: "intro connect" "nav connect"; gap: 28px 72px; padding-bottom: 40px; }
.footer-intro { max-width: 34rem; }
.footer-intro { grid-area: intro; }
.footer-intro p { margin: 1rem 0 0; }
.footer-nav { grid-area: nav; display: flex; flex-wrap: wrap; align-self: end; gap: .5rem 1.25rem; }
.footer-connect { grid-area: connect; padding-left: 48px; border-left: 1px solid var(--footer-line); }
.footer-social-links { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; }
.site-footer .brand, .footer-nav a, .footer-connect a { color: var(--footer-ink); }
.footer-nav a, .footer-connect a { min-height: 32px; font-weight: 700; }
.footer-nav a:hover, .footer-connect a:hover { color: var(--primary); }
.footer-connect > p { margin: 0 0 .75rem; color: var(--footer-ink); font-weight: 800; }
.footer-contact-details { display: grid; gap: .7rem; margin-bottom: 1rem; }
.footer-contact-details p { display: grid; gap: .05rem; color: var(--footer-ink); overflow-wrap: anywhere; }
.footer-contact-details span { color: var(--footer-muted); font-size: .72rem; font-weight: 700; }
.footer-bottom { padding-top: 20px; border-top: 1px solid var(--footer-line); font-size: .8rem; }
.floating-top-link { position: fixed; right: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 32px); z-index: 9; display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--line)); border-radius: 50%; background: var(--surface); color: var(--primary); box-shadow: 0 12px 30px rgb(9 24 36 / 22%); font-size: 1.2rem; font-weight: 800; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(16px) scale(.9); transition: opacity .25s ease, visibility .25s ease, transform .35s cubic-bezier(.22, 1, .36, 1), background-color .2s ease, color .2s ease; }
.floating-top-link.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.floating-top-link:hover { color: var(--control-active-text); background: var(--control-active); transform: translateY(-3px) scale(1.04); }
.site-footer p { margin-bottom: 0; }
/* Responsive */
@media (max-width: 900px) {
  .header-row { flex-wrap: wrap; padding-block: .7rem; }
  #main-nav { order: 3; width: 100%; justify-content: center; }
  .hero { grid-template-columns: 1fr; min-height: calc(100svh - 132px); gap: 32px; padding-block: 52px; }
  .hero h1 { font-size: 2.25rem; }
  .portrait { width: min(340px, calc(100% - 44px)); margin-inline: auto; }
  .experience-layout, .contact-layout { grid-template-columns: 1fr; gap: 24px; }
  .case-hero, .case-study { grid-template-columns: 1fr; gap: 32px; }
  .case-study aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-connect { padding-left: 32px; }
  .projects-grid:has(> :nth-child(3):last-child) > .featured-project { display: flex; grid-column: auto; }
  .projects-grid:has(> :nth-child(3):last-child) > .featured-project .project-image-cover { aspect-ratio: 16 / 9; min-height: 240px; }
  .experience-layout > .section-head { position: static; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 32px); }
  section { padding-block: 52px; scroll-margin-top: 86px; }
  .hero { min-height: calc(100svh - 69px); padding-block: 36px 52px; overflow: clip; }
  .hero-copy { order: 2; }
  .portrait { width: min(280px, calc(100% - 44px)); margin-inline: auto; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .role-line { width: 100%; min-width: 0; }
  .overview-grid, .projects-grid, .skills-grid { grid-template-columns: 1fr; }
  .overview-grid:has(> :last-child:nth-child(odd)) > .featured-overview { display: block; grid-column: auto; }
  .overview-feature-copy { margin-top: 1.25rem; padding: 1.25rem 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .menu-toggle { display: block; margin-left: auto; }
  .js-enabled #main-nav { display: none; }
  .js-enabled #main-nav.open { display: flex; }
  .nav-indicator { display: none; }
  #main-nav { flex-direction: column; border-radius: 14px; }
  #main-nav a { min-height: 44px; }
  .project-nav-actions { gap: .35rem; }
  .project-nav .theme-toggle { width: 44px; padding-inline: 0; justify-content: center; }
  .project-nav .theme-label { display: none; }
  .card, .project-body { padding: 22px; }
  .project-cover { min-height: 210px; padding: 26px; }
  .case-hero { padding-block: 52px; }
  .case-study { gap: 20px; padding-block: 52px; }
  .case-study aside, .case-study article section { padding: 22px; }
  .case-study article { gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; grid-template-areas: "intro" "connect" "nav"; gap: 28px; }
  .footer-connect { padding: 28px 0 0; border-top: 1px solid var(--footer-line); border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .typing-cursor { animation: none; opacity: 1; }
  .portrait::before, .portrait-media::before, .portrait-media::after { animation: none; }
  .theme-icon { animation: none; }
}
