/* Final shell. Scoped to the navigation and hero; the completed content sections stay intact. */
:root { --site-header-height: 78px; }
html { scroll-padding-top: calc(var(--site-header-height) + 16px); }
.section { scroll-margin-top: 18px; }
body { min-width: 320px; }
.skip-link:not(:focus) { width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { width: auto; height: auto; margin: 0; clip-path: none; visibility: visible; transform: none; z-index: 2000; }
body.light-theme .skip-link:focus { color: white; }
#site-header {
  --shell-bg: #0b121eea; --shell-panel: #111b29; --shell-ink: #edf3fc; --shell-muted: #b0bfd2; --shell-line: #9dacc330;
  position: relative; top: 0; left: 0; width: 100%; height: auto; margin: 0; padding: 0;
  z-index: 1100; background: var(--shell-bg); color: var(--shell-ink); border: 0; border-bottom: 1px solid var(--shell-line);
  box-shadow: none; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); text-align: left;
  transition: background .25s, border-color .25s;
}
.site-ready #site-header { position: fixed; }
#site-header::before, #site-header::after { display: none; }
body.light-theme #site-header, [data-theme="light"] #site-header {
  --shell-bg: #f8faf4ec; --shell-panel: #fffefa; --shell-ink: #172b35; --shell-muted: #4d6370; --shell-line: #19333c29;
  background: var(--shell-bg); color: var(--shell-ink);
}
#site-header.scrolled { padding: 0; box-shadow: 0 6px 30px #0000000c; border-color: var(--shell-line); }
#site-header *, #site-header *::before, #site-header *::after { box-sizing: border-box; }
#site-header [hidden] { display: none !important; }
.site-bar { width: min(calc(100% - 48px), var(--content-width, 1180px)); min-height: var(--site-header-height); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
#site-header .site-wordmark { display: inline-flex; align-items: center; gap: 0; flex-shrink: 0; color: var(--shell-ink); text-decoration: none; font: 800 13px/1.4 Inter, system-ui, sans-serif; letter-spacing: .035em; }
.site-wordmark span { font-weight: 400; }
.site-wordmark i { display: block; width: 5px; height: 5px; margin: 1px 0 0 9px; background: var(--accent); border-radius: 50%; }
#site-header .site-nav { display: block; position: static; width: auto; margin: 0 0 0 auto; padding: 0; border: 0; background: transparent; }
.site-nav ul { display: flex; align-items: center; gap: 28px; padding: 0; margin: 0; list-style: none; }
#site-header .site-link { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 46px; padding: 3px 0; border-radius: 0; background: transparent; color: var(--shell-muted); font: 600 12px/1.5 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; text-decoration: none; transition: color .2s; }
#site-header .site-link::before { display: none; }
#site-header .site-link::after { content: ''; position: absolute; height: 2px; bottom: 4px; left: 0; right: 0; transform: scaleX(0); transform-origin: left; background: var(--accent); transition: transform .24s ease; }
#site-header .site-link:hover, #site-header .site-link[aria-current] { color: var(--shell-ink); background: transparent; transform: none; }
#site-header .site-link:hover::after, #site-header .site-link[aria-current]::after { transform: scaleX(1); }
.site-link-index { color: var(--accent); font: 9px/1.5 Consolas, monospace; align-self: flex-start; margin-top: 9px; }
.site-link-arrow, .site-nav-caption { display: none; }
.site-tools { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
#site-header button { font-family: inherit; cursor: pointer; }
.site-language { position: relative; }
#site-header .site-language-toggle, #site-header .site-theme { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 1px solid var(--shell-line); border-radius: 5px; background: transparent; color: var(--shell-ink); padding: 0 10px; font: 600 11px/1 Consolas, monospace; transition: border-color .2s, background .2s; }
#site-header .site-theme { width: 44px; padding: 0; }
#site-header .site-theme svg { width: 20px; height: 20px; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
#site-header .site-theme[aria-pressed="true"] svg { transform: rotate(180deg); }
#site-header .site-language-toggle svg { width: 14px; height: 14px; transition: transform .2s; }
#site-header .site-language-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
#site-header .site-language-toggle:hover, #site-header .site-theme:hover { border-color: var(--accent); background: var(--shell-panel); }
#site-header .site-language-options { position: absolute; top: calc(100% + 12px); right: 0; left: auto; width: 190px; min-width: 0; display: grid; gap: 3px; padding: 7px; border: 1px solid var(--shell-line); border-radius: 8px; background: var(--shell-panel); color: var(--shell-ink); box-shadow: 0 16px 50px #0003; visibility: visible; opacity: 1; transform: none; pointer-events: auto; overflow: visible; transition: none; }
.site-language-options button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 46px; padding: 10px 13px; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 13px; }
.site-language-options small { font: 10px/1.5 Consolas, monospace; color: var(--shell-muted); }
.site-language-options button:hover { background: var(--shell-line); }
.site-language-options button[aria-pressed="true"] { color: var(--accent); background: var(--shell-line); }
#site-header :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-reading-progress { position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; transform-origin: left; transform: scaleX(var(--site-progress, 0)); background: linear-gradient(90deg, var(--accent), #a99aeb, #ec9a82); pointer-events: none; }
#home.home-editorial { padding: 0; margin: 0; overflow: hidden; background: #0a101b; }
#home:focus { outline: none; }
#home .hero-editorial {
  --study-mint: #83e2c7; --study-violet: #b4a4ff; --study-coral: #efaa91;
  display: block; position: relative; min-height: 0; width: 100%; max-width: none; padding: 55px 24px 30px; margin: 0; border: 0;
  overflow: hidden; text-align: left; isolation: isolate;
  background: radial-gradient(ellipse at 90% 30%, #59699929, transparent 52%), radial-gradient(ellipse at 8% 95%, #4d3a7122, transparent 45%), #0a101b;
}
.site-ready #home .hero-editorial { padding-top: calc(var(--site-header-height) + 44px); }
#home .hero-editorial::before, #home .hero-editorial::after { content: none; display: none; }
#home .hero-editorial > * { position: relative; z-index: 1; width: min(100%, var(--content-width, 1180px)); margin-left: auto; margin-right: auto; }
body.light-theme #home .hero-editorial, [data-theme="light"] #home .hero-editorial {
  --study-mint: #087b68; --study-violet: #7253b4; --study-coral: #af5536;
  background: radial-gradient(ellipse at 90% 22%, #d4dfed88, transparent 50%), radial-gradient(ellipse at 10% 90%, #e5e0ef88, transparent 45%), #f7f8f2 !important;
}
.hero-topline { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font: 600 10px/1.7 Consolas, monospace; letter-spacing: .085em; text-transform: uppercase; }
.hero-topline > :first-child { color: var(--accent); }
.hero-composition { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(32px, 5vw, 76px); align-items: center; padding: 45px 0 43px; }
.hero-copy { min-width: 0; }
#home .hero-heading {
  width: 100%; max-width: 100%; margin: 0 0 26px; padding: 0; font: 800 clamp(2.35rem, 6.1vw, 5.85rem)/1.02 Inter, system-ui, sans-serif;
  letter-spacing: -.065em; text-align: left; text-shadow: none; color: var(--text) !important; -webkit-text-fill-color: currentColor !important; background: none !important;
}
#home .hero-heading .hero-word { display: inline-block; white-space: nowrap; }
#home .hero-heading .hero-word .letter { display: inline-block; margin: 0; padding: 0; background: none !important; color: var(--letter-dark, #f4f7ff) !important; -webkit-text-fill-color: currentColor !important; background-clip: border-box !important; -webkit-background-clip: border-box !important; }
body.light-theme #home .hero-heading .hero-word .letter, [data-theme="light"] #home .hero-heading .hero-word .letter { color: var(--letter-light, #142038) !important; }
#home .hero-description { width: 100%; max-width: 530px; margin: 0 0 26px; padding: 0; color: var(--muted); font: 400 clamp(1rem, 1.25vw, 1.13rem)/1.7 Inter, 'Segoe UI', sans-serif; text-align: left; }
#home .hero-description .hero-word { display: inline-block; white-space: nowrap; }
#home .hero-description .letter-type { font: inherit; letter-spacing: normal; background: none !important; color: inherit !important; -webkit-text-fill-color: currentColor !important; }
#home .hero-description::after, #home .hero-heading::after { content: none !important; display: none !important; }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
#home .hero-primary, #home .hero-secondary { display: inline-flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 52px; padding: 13px 20px; border: 1px solid var(--accent); border-radius: 5px; background: var(--accent); color: #09251d; font: 650 13px/1.5 Inter, 'Segoe UI', sans-serif; text-decoration: none; cursor: pointer; transition: transform .25s, box-shadow .25s; }
#home .hero-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px #74e1c21a; }
#home .hero-secondary { padding: 10px 0; gap: 15px; background: none; color: var(--text); border: 0; border-radius: 0; box-shadow: inset 0 -1px var(--line); }
#home .hero-secondary:hover { box-shadow: inset 0 -1px var(--accent); }
body.light-theme #home .hero-primary { color: white; }
#home .hero-stack { display: flex; width: 100%; flex-wrap: wrap; align-items: center; gap: 0; margin: 0; }
#home .hero-stack span { padding: 0; margin: 0; border: 0; background: none; border-radius: 0; color: var(--muted); font: 10px/1.7 Consolas, monospace; letter-spacing: .035em; }
#home .hero-stack span + span::before { content: '/'; color: var(--accent); margin: 0 12px; }
.hero-study { align-self: center; width: 100%; min-width: 0; margin: 5px 0 0; color: var(--muted); }
.hero-study-label { display: flex; justify-content: space-between; gap: 16px; font: 9px/1.7 Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.hero-study-label > :first-child { color: var(--accent); }
.hero-study > svg { display: block; width: 100%; height: auto; color: var(--muted); }
.hero-study figcaption { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 15px; color: var(--muted); font: 11px/1.7 Inter, system-ui, sans-serif; }
.hero-study-spark { color: var(--study-coral); font: 30px/1 Georgia, serif; }
#home .hero-baseline { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 21px; border-top: 1px solid var(--line); }
#home .hero-baseline p { display: flex; align-items: center; gap: 10px; width: auto; max-width: none; margin: 0; font: 11px/1.7 Inter, system-ui, sans-serif; color: var(--muted); }
.hero-baseline strong { color: var(--accent); font: italic 24px/1 Georgia, serif; }
.hero-baseline > span { color: var(--muted); font: 10px/1.7 Consolas, monospace; }
.hero-baseline a { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; color: var(--muted); font: 11px/1.7 Inter, system-ui, sans-serif; text-decoration: none; }
.hero-baseline a:hover { color: var(--accent); }
.creative-ticker { isolation: isolate; }
.ticker-is-paused .ticker-track { animation-play-state: paused; }
.ticker-pause { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 3; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); background: #0c1425; cursor: pointer; font-size: 14px; }
body.light-theme .ticker-pause { background: #e9f1f7; }
.ticker-pause[hidden] { display: none; }
.ticker-pause:disabled { opacity: .6; cursor: default; }
.footer-links { flex-wrap: wrap; }
@media (max-width: 1100px) {
  .hero-composition { grid-template-columns: minmax(0, 1fr) 210px; gap: 35px; }
  #home .hero-heading { font-size: clamp(2.35rem, 5.8vw, 5.85rem); }
  .site-nav ul { gap: 20px; }
  .site-bar { gap: 20px; }
}
@media (max-width: 850px) {
  :root { --site-header-height: 68px; }
  .site-bar { width: calc(100% - 40px); gap: 12px; flex-wrap: wrap; }
  .site-tools { margin-left: auto; }
  #site-header .site-menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 7px 10px; border: 1px solid var(--shell-line); border-radius: 5px; background: none; color: var(--shell-ink); font: 500 11px/1.3 Inter, system-ui, sans-serif; }
  .site-menu-lines { display: grid; gap: 5px; width: 16px; }
  .site-menu-lines i { display: block; height: 1px; width: 16px; background: currentColor; transition: transform .2s; }
  .site-menu-toggle[aria-expanded="true"] i:first-child { transform: translateY(3px) rotate(45deg); }
  .site-menu-toggle[aria-expanded="true"] i:last-child { transform: translateY(-3px) rotate(-45deg); }
  #site-header .site-nav { order: 3; flex: 1 0 100%; margin: 0; padding: 12px 0 22px; }
  .site-ready #site-header .site-nav { position: absolute; top: 100%; left: 0; right: 0; width: 100%; padding: 24px max(24px, calc((100vw - 720px)/2)) 28px; background: var(--shell-panel); border-bottom: 1px solid var(--shell-line); box-shadow: 0 22px 35px #0002; max-height: calc(100dvh - var(--site-header-height)); overflow-y: auto; }
  .site-nav-caption { display: block; margin: 0 0 14px; color: var(--shell-muted); font: 10px/1.7 Consolas, monospace; text-transform: uppercase; letter-spacing: .12em; }
  .site-nav ul { display: block; }
  #site-header .site-link { display: flex; align-items: center; gap: 18px; padding: 15px 0; min-height: 62px; border-top: 1px solid var(--shell-line); font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
  #site-header .site-link::after { bottom: 0; }
  .site-link-index { align-self: auto; margin: 0; font-size: 10px; }
  .site-link-arrow { display: inline; margin-left: auto; color: var(--accent); font-size: 22px; }
  .hero-composition { grid-template-columns: minmax(0, 1fr) 190px; gap: 28px; }
  #home .hero-heading { font-size: clamp(2.35rem, 6vw, 4.9rem); }
  .hero-topline { gap: 20px; font-size: 9px; }
  .hero-baseline > span { display: none; }
}
@media (max-width: 640px) {
  .site-bar { width: calc(100% - 32px); gap: 8px; }
  #site-header .site-wordmark { font-size: 11px; letter-spacing: .01em; }
  .site-wordmark i { width: 4px; height: 4px; margin-left: 5px; }
  .site-tools { gap: 5px; }
  #site-header .site-language-toggle { min-width: 52px; padding: 0 7px; }
  #site-header .site-theme { width: 40px; }
  #site-header .site-menu-toggle { padding: 7px 9px; }
  .site-menu-toggle > span:first-child { display: none; }
  #site-header .site-language-options { right: -43px; }
  #home .hero-editorial { padding: 32px 20px 24px; }
  .site-ready #home .hero-editorial { padding-top: calc(var(--site-header-height) + 28px); }
  .hero-topline { display: grid; gap: 5px; padding-bottom: 18px; }
  .hero-topline > :last-child { font-size: 8px; letter-spacing: .05em; }
  .hero-composition { grid-template-columns: minmax(0, 1fr); padding: 31px 0 27px; gap: 26px; }
  #home .hero-heading { font-size: clamp(2.35rem, 9.7vw, 3.9rem); line-height: 1.06; margin-bottom: 22px; }
  #home .hero-description { max-width: 36ch; margin-bottom: 24px; font-size: 15px; }
  .hero-study { display: none; }
  .hero-actions { gap: 21px; margin-bottom: 24px; }
  #home .hero-primary { min-height: 49px; padding: 12px 16px; gap: 25px; font-size: 12px; }
  #home .hero-secondary { min-height: 49px; font-size: 12px; gap: 10px; }
  #home .hero-stack span { font-size: 9px; }
  #home .hero-stack span + span::before { margin: 0 8px; }
  #home .hero-baseline { gap: 12px; padding-top: 17px; }
  #home .hero-baseline p, .hero-baseline a { font-size: 10px; }
  .hero-baseline strong { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  #site-header *, #home *, .ticker-pause { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  #home .letter, #home .letter-type { opacity: 1 !important; transform: none !important; }
}
@media print { #site-header, .skip-link, .ticker-pause { display: none !important; } #home .hero-editorial { padding-top: 25px !important; } }

/* Align the Selected Work index with Skills and Contact. */
#projects .projects-topline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    width: min(100%, var(--content-width, 1180px));
    margin: 0 auto 32px;
    padding-bottom: 19px;
    border-bottom: 1px solid var(--line);
    color: var(--accent);
    font: 600 10px/1.6 Consolas, ui-monospace, monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
}
#projects .projects-topline > :last-child { color: var(--muted); }
#projects .projects-heading h2::before,
#projects .projects-heading h2::after { content: none; display: none; }
#projects .projects-heading { align-items: end; }
#projects .projects-intro { font-family: Inter, 'Segoe UI', system-ui, sans-serif; }
@media (max-width: 760px) {
    #projects .projects-topline { gap: 8px 18px; font-size: 9px; margin-bottom: 26px; }
    #projects .projects-topline > :last-child { letter-spacing: .04em; }
    #projects .projects-heading { align-items: flex-start; }
}
