/* Presentation layer: editorial scale, a finite entrance, and restrained depth.
   Content remains readable without JavaScript or animation support. */
:root {
  --story-ease: cubic-bezier(.22, 1, .36, 1);
  --story-rule: rgba(29,29,31,.14);
  --story-raised: #fff;
}
[data-theme="dark"] { --story-rule: rgba(245,245,247,.16); --story-raised: #272729; }
body { overflow-x: clip; }
[data-theme] .ambient, [data-theme] .noise { display: none; }
[data-theme="light"] { --text: #1D1D1F; --text-secondary: #57575D; --text-muted: #65656B; }
[data-theme="dark"] { --text-secondary: #A1A1A6; --text-muted: #A1A1A6; }
[data-theme] main > section:not(.hero) { background: var(--chapter-bg); }
main > section:not(.hero) { padding-block: clamp(88px, 9vw, 140px); }
main > section:not(.hero) > .container, .hero > .container { width: min(1200px, calc(100% - 96px)); }
[data-theme] main .glass { border-radius: 28px; }
.editorial-accent { color: var(--blue-3); }
.section-label { color: var(--text-muted); font-size: .68rem; letter-spacing: .14em; margin-bottom: 10px; }
.section-heading { max-width: 21ch; font-size: clamp(2.7rem, 5vw, 4.5rem); line-height: 1.04; letter-spacing: -.045em; margin: 0 0 22px; text-wrap: balance; }
.section-subtext { max-width: 51ch; margin: 0 0 56px; font-size: 1.12rem; line-height: 1.7; }
[data-theme] .display-xl { text-shadow: none; }

/* The opening is a short sequence, with no overlay or artificial wait screen. */
.hero { padding: 104px 0 64px; min-height: auto; }
.hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .82fr); align-items: center; gap: clamp(40px, 6vw, 90px); }
.hero-title { font-size: clamp(3.2rem, 5.4vw, 5rem); line-height: 1.04; letter-spacing: -.047em; font-weight: 650; margin-bottom: 28px; }
.hero-line { display: block; overflow: clip; padding-bottom: .09em; margin-bottom: -.09em; }
.hero-line-inner { display: block; }
#home .hero-eyebrow { border: 0; border-radius: 0; padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--blue-3); font-size: .86rem; font-weight: 650; letter-spacing: -.005em; margin-bottom: 28px; }
.hero-eyebrow .dot { animation: none; width: 8px; height: 8px; box-shadow: 0 0 0 4px rgba(52, 199, 89, .10); }
.hero-desc { font-size: 1.03rem; max-width: 42ch; line-height: 1.75; margin-bottom: 24px; }
.hero-caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: 590px; margin-bottom: 32px; }
#home .hero-caps li { min-height: 54px; padding: 2px 18px 2px 14px; border: 0; border-left: 1px solid var(--story-rule); border-radius: 0; background: none; box-shadow: none; color: var(--text-secondary); font-size: .8rem; font-weight: 600; line-height: 1.35; backdrop-filter: none; -webkit-backdrop-filter: none; }
.hero-caps li > span { display: block; margin-bottom: 5px; color: var(--blue-3); font-size: .61rem; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.hero-caps li:not(:last-child)::after { content: none; }
.hero-cta { gap: 12px; }
.hamburger, .theme-toggle { min-width: 44px; min-height: 44px; }
.hero-cta .btn { min-height: 50px; padding: 13px 22px; border-radius: 999px; font-size: .88rem; font-weight: 600; }
#home .hero-cta .btn-glass { background: transparent; box-shadow: none; border: 1px solid var(--story-rule); backdrop-filter: none; -webkit-backdrop-filter: none; }
#home .btn-primary { background: #0071E3; border: 0; box-shadow: none; color: #FFF; }
#home .btn-primary:hover { background: #0068D1; }
.hero-visual { width: 100%; max-width: 410px; justify-self: end; }
[data-theme] .hero-visual::before { display: none; }
.portrait-frame { border-radius: 28px; border: 0; background: #E3E3E6; box-shadow: none; }
[data-theme="dark"] .portrait-frame { background: #1D1D1F; }
.portrait-frame img { filter: saturate(.85); }
.portrait-meta { left: 28px; right: 28px; bottom: 26px; }
.portrait-years { font-size: .7rem; text-align: center; width: 100%; padding: 0; }
.hero-proof { display: flex; gap: 28px; align-items: center; justify-content: space-between; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--story-rule); }
.hero-proof-label { max-width: 15ch; color: var(--text-muted); font-size: .76rem; line-height: 1.5; }
.hero-proof-brands { display: flex; gap: clamp(20px, 3vw, 48px); }
.hero-proof-brands > span { display: flex; gap: 10px; align-items: center; font-size: .92rem; font-weight: 600; }
.hero-proof-brands img { border-radius: 8px; }
.hero-proof > a { color: var(--blue-3); font-size: .74rem; text-decoration: none; }
.hero-proof > a span { display: inline-block; margin-left: 8px; }
.scroll-cue { display: none; }
.intro-in:not(.intro-settled) .hero-line-inner { animation: story-line 1000ms var(--story-ease) both; }
.intro-in:not(.intro-settled) .hero-line:nth-child(2) .hero-line-inner { animation-delay: 100ms; }
.intro-in:not(.intro-settled) .hero-line:nth-child(3) .hero-line-inner { animation-delay: 200ms; }
.intro-in:not(.intro-settled) .hero-line:nth-child(4) .hero-line-inner { animation-delay: 300ms; }
html.intro-in:not(.intro-settled) #home :is(.hero-eyebrow, .hero-desc, .hero-caps, .hero-cta, .hero-proof) { animation: story-arrive 850ms var(--story-ease) both; }
html.intro-in:not(.intro-settled) #home .hero-desc { animation-delay: 320ms; }
html.intro-in:not(.intro-settled) #home .hero-caps { animation-delay: 380ms; }
html.intro-in:not(.intro-settled) #home .hero-cta { animation-delay: 440ms; }
html.intro-in:not(.intro-settled) #home .hero-proof { animation-delay: 560ms; }
html.intro-in:not(.intro-settled) #home .hero-visual { animation: story-portrait 1200ms var(--story-ease) 200ms both; }
@keyframes story-line { from { transform: translateY(108%); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes story-arrive { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes story-portrait { from { transform: translateY(24px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.js-reveal .reveal.in { animation-duration: 850ms; animation-timing-function: var(--story-ease); }
.js-reveal .reveal:focus-within { opacity: 1; animation: none; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Reading surfaces remain quiet; selected surfaces receive glass below. */
[data-theme] header nav { box-shadow: 0 8px 24px rgba(0,0,0,.05), inset 0 1px 0 rgba(255,255,255,.12); backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2); }
[data-theme] .nav-selection { background: rgba(var(--on-bg),.06); box-shadow: none; border: 0; }
[data-theme] header .brand-icon { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; font-size: .75rem; font-weight: 750; letter-spacing: -.04em; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 10001; padding: 12px 20px; border-radius: 12px; background: var(--bg); color: var(--text); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
#main-content:focus { outline: none; }
.now-dot { animation: none; }
#experience .now-badge { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; }
#experience .tl-toggle { min-height: 44px; padding: 10px 16px; background: transparent; border: 1px solid var(--story-rule); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
#experience .tl-toggle:hover { background: rgba(var(--on-bg),.04); }
[data-theme] footer .social-btn { min-width: 44px; min-height: 44px; border: 1px solid var(--story-rule); background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-theme] footer .social-btn:hover { color: var(--blue-3); transform: none; }

/* A persistent table of contents gives the long page direct access as well as flow. */
.chapter-progress {
  position: fixed; right: clamp(12px, 2vw, 28px); top: 50%; z-index: 50;
  width: 132px; padding: 8px; display: grid; gap: 2px;
  border: 1px solid var(--liquid-edge, var(--story-rule)); border-radius: 20px;
  background: rgba(255,255,255,.16);
  box-shadow: 0 14px 38px -18px rgba(29,29,31,.30), inset 0 1px 0 rgba(255,255,255,.82), inset 1px 0 0 rgba(255,255,255,.34);
  backdrop-filter: blur(22px) saturate(1.32) brightness(1.04);
  -webkit-backdrop-filter: blur(22px) saturate(1.32) brightness(1.04);
  transform: translateY(-50%);
}
[data-theme="dark"] .chapter-progress {
  background: rgba(24,24,27,.24);
  box-shadow: 0 18px 42px -18px rgba(0,0,0,.64), inset 0 1px 0 rgba(255,255,255,.16), inset 1px 0 0 rgba(255,255,255,.07);
}
.chapter-progress::after {
  content: ''; position: absolute; inset: 1px; z-index: -1; pointer-events: none;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.20), transparent 30%, transparent 72%, rgba(255,255,255,.04));
}
.chapter-progress a {
  min-height: 34px; padding: 7px 9px; display: flex; align-items: center; gap: 9px;
  border-radius: 12px; color: var(--text-muted); text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}
.chapter-progress a::before {
  content: ''; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 999px;
  background: currentColor; opacity: .5;
  transition: transform 300ms var(--story-ease), background 180ms ease, opacity 180ms ease;
}
.chapter-progress a > span {
  overflow: hidden; font-size: .68rem; font-weight: 620; line-height: 1;
  letter-spacing: -.005em; white-space: nowrap;
}
.chapter-progress a:is(:hover, :focus-visible) { color: var(--text); background: rgba(var(--on-bg), .055); }
.chapter-progress a:focus-visible { outline: 2px solid rgba(var(--c-blue), .42); outline-offset: 1px; }
.chapter-progress a.is-active,
[data-theme="dark"] .chapter-progress a.is-active { color: var(--text); background: transparent; box-shadow: none; }
.chapter-progress a.is-active::before { background: var(--blue-3); opacity: 1; transform: scale(1.55); }

/* Keep the chapter navigator at the viewport edge on wide screens. It is a
   quiet row of dots only; accessible link names remain in the markup. */
@media (min-width: 1441px) {
  [data-theme] .chapter-progress {
    right: max(1px, env(safe-area-inset-right)); width: 22px; padding: 3px 2px; gap: 0;
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .chapter-progress::after { display: none; }
  .chapter-progress a {
    min-height: 30px; padding: 0; justify-content: center; gap: 0;
    background: transparent; box-shadow: none;
  }
  .chapter-progress a > span { display: none; }
}

/* Keep the rail useful on laptop-width screens without letting it cover content. */
@media (max-width: 1440px) and (min-width: 801px) {
  [data-theme] .chapter-progress {
    right: max(1px, env(safe-area-inset-right)); width: 22px; padding: 3px 2px; gap: 0;
    border: 0; border-radius: 0;
    background: transparent; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .chapter-progress::after { display: none; }
  .chapter-progress a { min-height: 30px; padding: 0; justify-content: center; background: transparent; box-shadow: none; }
  [data-theme] .chapter-progress a.is-active { background: transparent; box-shadow: none; }
  .chapter-progress a > span { display: none; }
}

/* An editorial introduction, followed by tangible work. */
.about-grid { align-items: center; grid-template-columns: 1fr 1fr; gap: 64px; }
[data-theme] main .about-bio { padding: 20px 0; min-height: auto; border-radius: 0; }
.about-statement { font-size: clamp(1.9rem, 3vw, 2.7rem); max-width: 14ch; line-height: 1.1; }
.about-role { border: 0; background: none; padding: 0; font-size: .7rem; margin-bottom: 20px; }
.about-copy { font-size: .98rem; }
.about-facts { border-top: 1px solid var(--story-rule); }
.about-facts > div { display: grid; grid-template-columns: minmax(100px,.7fr) minmax(0,1fr); align-items: center; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--story-rule); }
.about-facts strong { font-size: clamp(1.8rem, 2.8vw, 2.4rem); font-weight: 600; letter-spacing: -.04em; }
.about-facts span { font-size: .85rem; color: var(--text-secondary); line-height: 1.5; }
.apps-grid { gap: 22px; }
.app-card { min-height: 220px; padding: 26px; }
.app-card:nth-child(-n+3) { min-height: 350px; padding: 32px; }
.app-card:nth-child(-n+3) .app-icon-wrap { width: 100px; height: 100px; border-radius: 24px; margin: 0 0 30px; }
.app-card:nth-child(n+4) .app-icon-wrap { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 20px; }
.app-card:nth-child(n+4) .app-name { font-size: 1.1rem; }
.app-card:nth-child(n+4) .app-desc { font-size: .84rem; line-height: 1.6; }
.app-icon-wrap { box-shadow: 0 9px 22px rgba(0,0,0,.1); transition: transform 650ms var(--story-ease); }
.app-badge { min-height: 44px; }
[data-theme] main a.glass { transition: transform 450ms var(--story-ease), box-shadow 450ms var(--story-ease); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-theme] main .glass:not(.glass-static):hover { transform: none; }
  [data-theme] main a.glass:not(.glass-static):is(:hover, :focus-visible) { transform: translateY(-4px); box-shadow: var(--interactive-shadow, 0 16px 36px rgba(0,0,0,.08)) !important; }
  .app-card:hover .app-icon-wrap { transform: scale(1.05) translateY(-2px); }
  .story-link:hover span { transform: translateY(3px); }
}
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--blue-3); outline-offset: 5px; }

/* The centerpiece shows how the work fits together. */
.spotlight-card.featured { display: grid; grid-template-columns: 1.1fr 1fr; gap: 52px; align-items: center; min-height: 460px; padding: clamp(30px, 4vw, 48px); }
.spotlight-card:nth-child(2), .spotlight-card:nth-child(3) { min-height: 300px; padding: 36px; }
.spotlight-card:nth-child(n+4) { min-height: 260px; }
.engineering-note { margin: 0; font-size: .78rem; line-height: 1.5; color: var(--blue-3); font-weight: 600; }
.feature-eyebrow { color: var(--text-muted); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.spotlight-card.featured .spotlight-title { font-size: clamp(2.4rem, 4vw, 3.8rem); letter-spacing: -.04em; max-width: none; margin: 24px 0; line-height: 1.08; }
.spotlight-card.featured .spotlight-text { font-size: 1rem; max-width: 40ch; }
.spotlight-card.featured .spotlight-stat { gap: 44px; padding-top: 30px; margin: 0 0 28px; }
.spotlight-card.featured .spotlight-stat-num { font-size: 2.7rem; font-weight: 600; }
.story-link { display: inline-flex; gap: 16px; color: var(--blue-3); text-decoration: none; font-size: .86rem; min-height: 44px; align-items: center; }
.story-link span { display: inline-block; transition: transform 250ms var(--story-ease); }
.sdk-visual { width: 100%; margin: 0; padding: 24px 0; }
.sdk-brands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: center; }
.sdk-brands > div { display: grid; justify-items: center; gap: 12px; }
.sdk-brands img { border-radius: 16px; max-width: 100%; height: auto; box-shadow: 0 10px 25px rgba(0,0,0,.1); }
.sdk-brands span { font-size: .68rem; color: var(--text-secondary); }
.sdk-branches { height: 56px; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 16.66%; position: relative; }
.sdk-branches::before { content: ''; position: absolute; inset: 26px 0 auto; height: 1px; background: var(--story-rule); }
.sdk-branches span { width: 1px; background: var(--story-rule); height: 26px; }
.sdk-branches span:nth-child(2) { justify-self: center; height: 56px; }
.sdk-branches span:nth-child(3) { justify-self: end; }
.sdk-core { min-height: 132px; display: grid; justify-items: center; align-content: center; gap: 5px; background: var(--story-raised); border: 1px solid var(--story-rule); border-radius: 22px; box-shadow: 0 16px 34px rgba(0,0,0,.07); }
.sdk-core-mark { font-size: 1.65rem; color: var(--blue-3); line-height: 1.3; }
.sdk-core strong { font-size: 1rem; letter-spacing: -.02em; }
.sdk-core > span:last-child { font-size: .65rem; color: var(--text-muted); }
.sdk-trunk { height: 30px; width: 1px; background: var(--story-rule); margin: 0 auto; }
.sdk-services { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sdk-services span { font-size: .62rem; padding: 7px 10px; border: 1px solid var(--story-rule); border-radius: 8px; }
.sdk-visual figcaption { margin-top: 24px; text-align: center; font-size: .64rem; color: var(--text-muted); }
.spotlight-card.featured.in .sdk-core { animation: sdk-arrive 1000ms var(--story-ease) 200ms backwards; }
@keyframes sdk-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.spotlight-card:nth-child(n+4) .spotlight-icon { background: none !important; box-shadow: none !important; border: 0 !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.spotlight-card:nth-child(n+4) .spotlight-title { font-size: 1.3rem; }
/* Keep the demo attached to the engineering chapter, without a second gap. */
main > #flow { padding-top: 0; padding-bottom: clamp(76px, 8vw, 112px); }
[data-theme="light"] main > #flow { --chapter-bg: #F5F5F7; --content-card-bg: #FFFFFF; background: var(--chapter-bg); }
[data-theme="dark"] main > #flow { --chapter-bg: #101010; --content-card-bg: #1D1D1F; background: var(--chapter-bg); }
.payment-notes { color: var(--text-muted); font-size: .73rem; line-height: 1.6; margin-top: 8px; }
.payment-notes summary { cursor: pointer; width: fit-content; padding: 10px 0; color: var(--text-secondary); }
.payment-notes p { max-width: 90ch; margin: 0 0 4px; }
.payment-static-note { font-size: .85rem; line-height: 1.6; color: var(--text-secondary); }
.timeline-card .timeline-tags { gap: 6px 12px; margin-top: 20px; }
#experience .timeline-card .tag { border: 0; box-shadow: none; background: none; padding: 0; font-size: .68rem; color: var(--text-muted); backdrop-filter: none; -webkit-backdrop-filter: none; }
.timeline-card .tag:not(:last-child)::after { content: ' /'; opacity: .35; margin-left: 10px; }
.timeline-item.is-current .timeline-card { padding: 44px; }
.timeline-item.is-current .timeline-role { font-size: 1.8rem; line-height: 1.15; margin-top: 6px; }
[data-theme] main .timeline-item.is-past .timeline-card { padding-block: 36px; }
.timeline-item.is-past .timeline-role { font-size: 1.25rem; }
.timeline-item.is-past .timeline-desc { max-width: 78ch; }
.timeline-dot { width: 12px; height: 12px; left: -26px; box-shadow: none !important; }
.timeline::after { box-shadow: none; }
.testimonial-quote { font-style: normal; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.6; letter-spacing: -.015em; }
.testimonial-card blockquote { margin: 0 0 28px; }
#testimonial .testimonial-card { min-height: auto; }
.testimonial-avatar { background: transparent; color: var(--blue-3); border: 1px solid var(--story-rule); border-radius: 50%; }
#testimonial .testimonial-context { border: 0; border-top: 1px solid var(--story-rule); border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 20px 0 0; }
.market-flags { font-size: .75rem; gap: 4px; opacity: .7; }
.skills-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.skill-group:nth-child(n) { grid-column: span 4; min-height: 220px; padding: 28px; }
#skills .skill-group-icon { width: auto; height: auto; background: none; box-shadow: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; margin-bottom: 18px; font-size: 1.3rem; }
#skills .skill-group-title { font-size: 1.08rem; text-transform: none; letter-spacing: -.02em; margin-bottom: 12px; }
.skill-detail-copy { font-size: .9rem; color: var(--text-secondary); line-height: 1.65; margin: 0; }
.uni-label { margin-top: 76px; }
#education .uni-label + .section-heading { font-size: clamp(2.2rem, 3.6vw, 3rem); max-width: 28ch; }
.university-projects { border-block: 1px solid var(--story-rule); }
.university-projects > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; cursor: pointer; padding: 22px 0; font-size: 1rem; font-weight: 600; }
.university-projects > summary::-webkit-details-marker { display: none; }
.university-projects > summary span { font-size: 1.5rem; font-weight: 400; color: var(--text-muted); transition: transform 200ms; }
.university-projects[open] > summary span { transform: rotate(45deg); }
.university-projects .uni-grid { padding-bottom: 28px; }
.uni-card { min-height: auto; padding: 30px; }
.uni-title { font-size: 1.25rem; }
#education .uni-tag { padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--text-muted); font-size: .72rem; }
.uni-stack { gap: 6px 14px; }
.contact-info h3 { font-size: 2rem; letter-spacing: -.03em; }
.contact-info, .contact-visual { min-height: 0; padding: 36px; }
.contact-info h3 { margin-bottom: 28px; }
#contact .contact-link { box-shadow: none; border: 1px solid var(--story-rule); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; font-size: .9rem; }
#contact .contact-link:hover { background: rgba(var(--on-bg),.04); border-color: rgba(var(--on-bg),.24); }
#contact .contact-link::after { content: '↗'; margin-left: auto; color: var(--text-muted); }
.contact-link span { overflow-wrap: anywhere; }
.contact-social { display: none; }
.contact-globe { animation: none; width: 240px; height: 240px; box-shadow: none; background: none; border-color: var(--story-rule); }
.contact-globe::before { inset: 0 60px; border-color: var(--story-rule); }
.contact-globe::after { inset: 70px 0; border-color: var(--story-rule); }
.globe-label { z-index: 1; padding: 14px; background: var(--content-card-bg); }
.globe-label strong { font-size: 2rem; letter-spacing: -.04em; }

/* Liquid accents: one clean edge, transmitted light, and no coloured refraction.
   Opaque defaults are deliberate fallbacks for browsers without backdrop blur. */
:root {
  --liquid-fill: rgba(255,255,255,.54);
  --liquid-nav-fill: rgba(255,255,255,.68);
  --liquid-card-fill: rgba(242,243,245,.62);
  --liquid-edge: rgba(29,29,31,.10);
  --liquid-top-light: rgba(255,255,255,.86);
  --liquid-floor-light: rgba(255,255,255,.08);
  --liquid-specular: rgba(255,255,255,.38);
  --liquid-shadow: 0 10px 30px -16px rgba(29,29,31,.24), inset 0 1px 0 rgba(255,255,255,.85);
  --liquid-hover-shadow: 0 18px 38px -18px rgba(29,29,31,.32), inset 0 1px 0 rgba(255,255,255,.92);
}
[data-theme="dark"] {
  --liquid-fill: rgba(36,36,39,.58);
  --liquid-nav-fill: rgba(20,20,22,.80);
  --liquid-card-fill: rgba(36,36,39,.66);
  --liquid-edge: rgba(255,255,255,.13);
  --liquid-top-light: rgba(255,255,255,.065);
  --liquid-floor-light: rgba(255,255,255,.008);
  --liquid-specular: rgba(255,255,255,.075);
  --liquid-shadow: 0 12px 32px -16px rgba(0,0,0,.44), inset 0 1px 0 rgba(255,255,255,.12);
  --liquid-hover-shadow: 0 20px 42px -18px rgba(0,0,0,.60), inset 0 1px 0 rgba(255,255,255,.20);
}
[data-theme] header nav,
[data-theme] .nav-links.open { background: var(--bg); border-color: var(--liquid-edge); box-shadow: var(--liquid-shadow); }
[data-theme] header .nav-links a { color: var(--text); }
[data-theme] .nav-selection { background: var(--story-raised); border: 1px solid var(--liquid-edge); box-shadow: inset 0 1px 0 var(--liquid-top-light); transition: transform 420ms var(--story-ease), width 420ms var(--story-ease), opacity 180ms; }
#home .hero-cta .btn-glass,
#contact .contact-link,
#experience .tl-toggle { background: var(--content-card-bg, var(--bg)); border-color: var(--liquid-edge); box-shadow: var(--liquid-shadow); }
[data-theme] main .glass[data-liquid-card] { background: var(--content-card-bg); border: 1px solid var(--liquid-edge); box-shadow: var(--liquid-shadow); --interactive-shadow: var(--liquid-hover-shadow); }
[data-theme] .sdk-core { position: relative; overflow: hidden; isolation: isolate; background: var(--story-raised); border-color: var(--liquid-edge); box-shadow: var(--liquid-shadow); }
.sdk-core > * { position: relative; z-index: 1; }

/* This is glass over real image detail, rather than blur over an empty canvas. */
#home .portrait-meta { left: 16px; right: 16px; bottom: 16px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.20); border-radius: 20px; background: #242426; box-shadow: 0 8px 26px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.12); }
#home .portrait-frame::after { background: linear-gradient(to top, rgba(0,0,0,.34), transparent 45%); }
#home .portrait-name { font-size: 1.06rem; }
#home .portrait-role { font-size: .8rem; line-height: 1.5; color: #F5F5F7; font-weight: 500; }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  [data-theme] header nav,
  [data-theme] .nav-links.open { background: var(--liquid-nav-fill); backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2); }
  [data-theme] .nav-selection { background: var(--liquid-fill); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  #home .hero-cta .btn-glass,
  #contact .contact-link,
  #experience .tl-toggle,
  [data-theme] .sdk-core { background: linear-gradient(145deg, var(--liquid-top-light), var(--liquid-floor-light) 60%), var(--liquid-fill); backdrop-filter: blur(16px) saturate(1.08); -webkit-backdrop-filter: blur(16px) saturate(1.08); }
  [data-theme] main .glass[data-liquid-card] { background: linear-gradient(150deg, var(--liquid-top-light), transparent 48%, var(--liquid-floor-light)), var(--liquid-card-fill); backdrop-filter: blur(16px) saturate(1.08); -webkit-backdrop-filter: blur(16px) saturate(1.08); }
  #home .portrait-meta { background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,0)), rgba(20,20,22,.70); backdrop-filter: blur(20px) saturate(1.15); -webkit-backdrop-filter: blur(20px) saturate(1.15); }
}

/* A single moving reflection, underneath text. Never restore the legacy rims. */
[data-theme] main .glass[data-liquid-follow]::before,
[data-theme] main .sdk-core[data-liquid-follow]::before {
  content: ''; display: block; position: absolute; inset: -50%; border: 0; border-radius: 0;
  background: radial-gradient(ellipse 24% 32% at 50% 50%, var(--liquid-specular), transparent 75%);
  z-index: 0; pointer-events: none; opacity: 0; filter: none;
  transform: translate3d(var(--surface-x, 0px), var(--surface-y, 0px), 0);
  transition: opacity 350ms ease, transform 140ms ease-out;
}
[data-theme] main [data-liquid-follow].is-surface-lit::before { opacity: 1; }

/* Shared physical rhythm: responsive press, gentle lift, longer release. */
#home .hero-cta .btn,
#contact .contact-link,
#experience .tl-toggle { transition: transform 380ms var(--story-ease), box-shadow 380ms var(--story-ease), border-color 220ms, background-color 220ms; }
#home .hero-cta .btn:active,
#contact .contact-link:active,
#experience .tl-toggle:active { transform: scale(.98); transition-duration: 100ms; }
#contact .contact-link::after { transition: transform 300ms var(--story-ease); }
[data-theme] main a.glass.glass:not(.glass-static):active { transform: scale(.99); }
.sdk-core { transition: box-shadow 450ms var(--story-ease); }
@media (hover: hover) and (pointer: fine) {
  #home .hero-cta .btn:hover,
  #contact .contact-link:hover { transform: translateY(-3px); box-shadow: var(--liquid-hover-shadow); }
  #contact .contact-link:hover::after { transform: translate(2px,-2px); }
  #experience .tl-toggle:hover { box-shadow: var(--liquid-hover-shadow); }
  [data-theme] .sdk-core:hover { box-shadow: var(--liquid-hover-shadow); }
  #home .hero-cta .btn:active,
  #contact .contact-link:active { transform: scale(.98); }
}
@media (max-width: 768px) {
  .nav-links.open { transform-origin: top center; animation: menu-arrive 260ms var(--story-ease) both; }
  #home .portrait-meta { padding: 15px 16px; }
}
@keyframes menu-arrive { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }
@media (hover: none), (pointer: coarse) {
  #home .hero-cta .btn:hover, #contact .contact-link:hover { transform: none; }
  #home .hero-cta .btn:active, #contact .contact-link:active { transform: scale(.98); }
}

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1.2fr .8fr; gap: 32px; }
  .hero-title { font-size: clamp(2.8rem, 5.5vw, 4.1rem); }
  .hero-proof { flex-wrap: wrap; }
  .hero-proof > a { margin-left: auto; }
  .about-grid { gap: 34px; }
  .spotlight-card.featured { gap: 32px; }
  .sdk-brands img { width: 52px; }
}
@media (max-width: 1024px) {
  .skill-group:nth-child(n) { grid-column: span 6; }
}
@media (max-width: 800px) {
  main > section:not(.hero) > .container, .hero > .container { width: calc(100% - 48px); }
  .hero { padding-top: 110px; }
  .hero-grid, .about-grid, .spotlight-card.featured { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(3.1rem, 8.5vw, 4.9rem); }
  .hero-visual { justify-self: center; width: 80%; max-width: 370px; margin-top: 12px; }
  .hero-desc { max-width: 48ch; }
  .hero-proof { margin-top: 44px; gap: 20px; }
  .hero-proof-label { max-width: none; width: 100%; }
  .hero-proof-brands { gap: 24px; flex-wrap: wrap; }
  .hero-proof > a { margin-left: 0; }
  /* On phones the chapter rail becomes a slim, scroll-wheel-like row of dots.
     It stays tappable without taking meaningful width from the reading column. */
  .chapter-progress {
    right: max(1px, env(safe-area-inset-right)); width: 22px; padding: 3px 2px;
    gap: 0; border: 0; border-radius: 0; opacity: .72;
    background: transparent; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    transition: opacity 180ms ease;
  }
  [data-theme="dark"] .chapter-progress {
    background: transparent; border: 0; box-shadow: none;
  }
  .chapter-progress:focus-within { opacity: 1; }
  .chapter-progress::after { display: none; }
  .chapter-progress a {
    position: relative; min-height: 22px; padding: 0; justify-content: center; gap: 0;
    background: transparent; box-shadow: none;
  }
  .chapter-progress a::before { width: 3px; height: 3px; flex-basis: 3px; }
  .chapter-progress a::after {
    content: ''; position: absolute; inset: -1px -8px -1px -14px;
  }
  .chapter-progress a.is-active { background: transparent; box-shadow: none; }
  [data-theme="dark"] .chapter-progress a.is-active { background: transparent; box-shadow: none; }
  .chapter-progress a.is-active::before { transform: scale(1.65); }
  .chapter-progress a:is(:hover, :focus-visible, :active) { background: transparent; outline: 0; }
  .chapter-progress a > span { display: none; }
  .sdk-visual { max-width: 460px; margin-inline: auto; }
  .sdk-story-copy { max-width: 44ch; }
  .spotlight-card.featured .spotlight-title { font-size: clamp(2.5rem, 6vw, 3.6rem); }
  .edu-grid { grid-template-columns: 1fr; }
  [data-theme] main .edu-card { min-height: auto; padding: 28px 4px; border-right: 0; border-bottom: 1px solid var(--story-rule); }
  .edu-year { margin: 0 0 18px; }
  .edu-school { margin-top: 0; }
}
@media (max-width: 1440px) and (max-height: 500px) {
  .chapter-progress a { min-height: 18px; }
}
@media (max-width: 1440px) {
  html.chapter-scrubbing { scroll-behavior: auto; }
  .chapter-progress {
    touch-action: none; user-select: none; -webkit-user-select: none;
    transform-origin: right center;
    transition: transform 220ms var(--story-ease), opacity 180ms ease;
  }
  .chapter-progress a { transition: min-height 220ms var(--story-ease), color 180ms ease, background 180ms ease; }
  .chapter-progress.is-scrubbing {
    opacity: 1; transform: translate(-5px, -50%) scale(1.08);
  }
  .chapter-progress.is-scrubbing a { min-height: 34px; }
  .chapter-progress.is-scrubbing a::before { opacity: .72; transform: scale(1.55); }
  .chapter-progress.is-scrubbing a.is-active::before,
  .chapter-progress.is-scrubbing a.is-scrub-target::before {
    opacity: 1; background: var(--blue-3); transform: scale(1.85);
  }
}
@media (max-width: 800px) {
  .chapter-progress.is-scrubbing a { min-height: 28px; }
}
@media (max-width: 800px) and (max-height: 500px) {
  .chapter-progress.is-scrubbing a { min-height: 22px; }
}
@media (max-width: 720px) {
  .skill-group:nth-child(n) { grid-column: 1 / -1; }
  .app-card { min-height: 210px; }
  .spotlight-card:nth-child(n+2) { min-height: auto; }
  .spotlight-card:nth-child(2), .spotlight-card:nth-child(3) { padding: 30px; }
}
@media (max-width: 600px) {
  main > section:not(.hero) { padding-block: 76px; }
  main > section:not(.hero) > .container, .hero > .container { width: calc(100% - 40px); }
  .hero-title { font-size: clamp(2rem, 9.5vw, 3.6rem); letter-spacing: -.045em; }
  .hero-line-inner { white-space: nowrap; }
  .hero-caps { grid-template-columns: 1fr; gap: 14px; }
  #home .hero-caps li { min-height: 0; padding-block: 0; }
  .hero-caps li > span { display: inline-block; width: 30px; margin: 0 8px 0 0; }
  .hero-cta { flex-direction: row; }
  .hero-cta .btn { padding-inline: 18px; font-size: .8rem; }
  .hero-proof-brands { gap: 18px; }
  .hero-proof-brands > span { gap: 7px; font-size: .78rem; }
  .hero-proof-brands img { width: 23px; height: 23px; border-radius: 6px; }
  .section-heading { font-size: 2.6rem; max-width: 18ch; }
  .section-subtext { font-size: 1rem; margin-bottom: 36px; }
  .app-card:nth-child(-n+3) { min-height: 290px; padding: 30px; }
  .app-card:nth-child(-n+3) .app-icon-wrap { width: 92px; height: 92px; border-radius: 23px; margin-bottom: 26px; }
  .spotlight-card.featured { padding: 28px; }
  .spotlight-card.featured .spotlight-title { font-size: 2.4rem; }
  .sdk-core strong { font-size: .88rem; }
  .skill-group:nth-child(n) { grid-column: 1 / -1; min-height: 0; }
  .timeline { padding-left: 24px; }
  .timeline::before, .timeline::after { left: 3px; }
  .timeline-dot { left: -26px; top: 29px; }
  .timeline-item.is-current .timeline-card { padding: 28px; }
  .timeline-item.is-current .timeline-role { font-size: 1.4rem; }
  .timeline-meta { white-space: normal; }
  #testimonial .testimonial-card { padding: 30px; }
  .testimonial-source { gap: 12px; align-items: flex-start; }
  .testimonial-avatar { flex-shrink: 0; width: 40px; height: 40px; }
  .contact-info { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal .reveal { opacity: 1; }
  .js-reveal .reveal.in, html.intro-in #home .reveal, .hero-line-inner, .spotlight-card.featured.in .sdk-core { animation: none !important; }
  [data-theme] main a.glass:not(.glass-static):is(:hover, :focus-visible), .app-card:hover .app-icon-wrap { transform: none; }
  [data-theme] main a.glass.glass:not(.glass-static):active,
  #home .hero-cta .btn:is(:hover, :active),
  #contact .contact-link:is(:hover, :active),
  #experience .tl-toggle:is(:hover, :active),
  #contact .contact-link:is(:hover, :active)::after { transform: none; transition: none; }
  .nav-links.open { animation: none; }
  [data-theme] main :is(.glass, .sdk-core)[data-liquid-follow]::before { display: none; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (forced-colors: active) {
  [data-theme] { --liquid-hover-shadow: none; }
  [data-theme] main a.glass { --interactive-shadow: none; }
  [data-theme] header nav, [data-theme] .nav-links.open, [data-theme] .nav-selection,
  [data-theme] .chapter-progress, [data-theme] .chapter-progress a > span,
  #home .hero-cta .btn-glass, #contact .contact-link.contact-link, #experience .tl-toggle.tl-toggle,
  [data-theme] main .glass[data-liquid-card], [data-theme] .sdk-core {
    background: var(--content-card-bg, var(--bg)); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none !important; border-color: var(--text-muted);
  }
  .chapter-progress::after { display: none; }
  #home .portrait-meta { background: #242426; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  [data-theme] main :is(.glass, .sdk-core)[data-liquid-follow]::before { display: none; }
}
@media print {
  .chapter-progress, .scroll-progress, header, .skip-link, .tl-toggle, .payment-controls { display: none !important; }
  .js-reveal .reveal { opacity: 1; animation: none !important; }
  main > section:not(.hero) { padding-block: 30px; }
  main > section:not(.hero) > .container, .hero > .container { width: 100%; }
  main > section { break-inside: auto; }
  .hero { padding-top: 0; }
  .tl-more { grid-template-rows: 1fr; }
  .tl-more .timeline-highlights li { opacity: 1; transform: none; }
  .university-projects > summary span { display: none; }
  .app-card, .skill-group, .timeline-card, .uni-card { break-inside: avoid; }
  [data-theme] main .glass[data-liquid-card], [data-theme] .sdk-core,
  #home .hero-cta .btn-glass, #contact .contact-link, #home .portrait-meta { backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none !important; }
  [data-theme] main .glass[data-liquid-card], [data-theme] .sdk-core, #contact .contact-link { background: var(--content-card-bg); }
  #home .portrait-meta { background: #242426; }
  [data-theme] main :is(.glass, .sdk-core)[data-liquid-follow]::before { display: none; }
}
