/* Public portfolio visual system. The private site carries an isolated copy. */
:root {
  --blue: #155eef;
  --ink: #070a12;
  --paper: #f7f9fc;
  --coral: #ff5a3c;
  --accent-text: var(--blue);
  --accent-fill: var(--blue);
  --on-accent: #fff;
  --bg: var(--paper);
  --surface: color-mix(in srgb, var(--paper) 92%, var(--blue));
  --text: var(--ink);
  --muted: color-mix(in srgb, var(--ink) 66%, transparent);
  --rule: color-mix(in srgb, var(--ink) 16%, transparent);
  --header: color-mix(in srgb, var(--paper) 94%, transparent);
  --radius: 1.1rem;
  --shadow: 0 24px 70px rgb(7 10 18 / 16%);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: var(--ink);
  --surface: color-mix(in srgb, var(--paper) 6%, var(--ink));
  --text: var(--paper);
  --muted: color-mix(in srgb, var(--paper) 68%, transparent);
  --rule: color-mix(in srgb, var(--paper) 19%, transparent);
  --header: color-mix(in srgb, var(--ink) 92%, transparent);
  --accent-text: #8db8ff;
  --accent-fill: #1d5fe2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { min-width: 0; margin: 0; overflow-x: clip; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.58; }
body.menu-open { overflow: hidden; }
a { color: inherit; }
button { color: inherit; font: inherit; }
img, svg, video { max-width: 100%; height: auto; }
a, p, li { overflow-wrap: break-word; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 1000; top: 1rem; left: 1rem; padding: .75rem 1rem; border: 2px solid var(--text); background: var(--bg); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.shell { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.section { position: relative; padding-block: clamp(5.5rem, 10vw, 9rem); }
.eyebrow { margin: 0 0 1rem; color: var(--accent-text); font: 800 .74rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 1.25rem; font-size: clamp(3.3rem, 8vw, 7.6rem); line-height: .89; letter-spacing: -.075em; }
h2 { margin-bottom: 1rem; font-size: clamp(2.15rem, 4.5vw, 4.4rem); line-height: .98; letter-spacing: -.055em; }
h3 { margin-bottom: .55rem; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.15; letter-spacing: -.025em; }
.lede { max-width: 720px; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.28rem); }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .72rem 1.15rem; border: 1.5px solid currentColor; border-radius: 999px; background: transparent; color: inherit; text-decoration: none; font-weight: 800; cursor: pointer; }
.button:hover { background: var(--text); color: var(--bg); }
.button.primary { border-color: var(--accent-fill); background: var(--accent-fill); color: var(--on-accent); }
.button.primary:hover { border-color: var(--text); background: var(--text); color: var(--bg); }
.button.small { min-height: 40px; padding: .5rem .85rem; font-size: .84rem; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.text-link { font-weight: 800; text-decoration-thickness: 1.5px; text-underline-offset: .25rem; }
.text-link:hover { color: var(--accent-text); }

/* Header and selected mega-menu */
.site-header { position: sticky; z-index: 500; top: 0; border-bottom: 1px solid var(--rule); background: var(--header); backdrop-filter: blur(16px); }
.header-inner { width: min(1280px, calc(100% - 2rem)); min-height: 76px; margin-inline: auto; display: grid; grid-template-columns: minmax(230px, 1fr) auto auto; align-items: center; gap: 1rem; }
.brand { font-size: 1rem; font-weight: 900; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent-text); }
.desktop-nav { align-self: stretch; display: none; }
.js .desktop-nav { display: flex; }
.nav-toggle, .nav-link { min-width: 96px; border: 0; border-left: 1px solid var(--rule); padding-inline: 1rem; background: transparent; color: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.nav-link, .desktop-nav > a.nav-toggle { display: grid; place-items: center; }
.desktop-nav > :last-child { border-right: 1px solid var(--rule); }
.nav-toggle:hover, .nav-toggle[aria-expanded="true"], .nav-link:hover, .nav-link[aria-current="page"] { background: var(--ink); color: var(--paper); }
html[data-theme="dark"] .nav-toggle:hover,
html[data-theme="dark"] .nav-toggle[aria-expanded="true"],
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link[aria-current="page"] { background: var(--accent-fill); color: var(--on-accent); }
.header-actions { display: flex; align-items: center; gap: .55rem; }
.theme-toggle { min-height: 40px; display: none; align-items: center; gap: .45rem; border: 1px solid var(--text); border-radius: 999px; padding: .5rem .75rem; background: var(--bg); font-weight: 800; cursor: pointer; }
.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { background: var(--coral); color: var(--ink); }
.theme-dot { width: .8rem; height: .8rem; border: 2px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 0 50%, transparent 50%); }
.mobile-toggle { display: none; }
.mega-panel { position: absolute; z-index: 480; top: 100%; left: 0; right: 0; padding: clamp(1.25rem, 3vw, 2.5rem) max(1.5rem, calc((100vw - 1120px) / 2)); background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.mega-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(230px, .85fr); gap: clamp(2rem, 5vw, 5rem); }
.mega-intro h2 { max-width: 680px; font-size: clamp(1.7rem, 3vw, 3rem); }
.mega-intro p { max-width: 630px; color: rgb(247 249 252 / 72%); }
.mega-panel .eyebrow { color: var(--coral); }
.mega-feature { display: block; padding: 1.35rem; background: var(--accent-fill); color: var(--on-accent); text-decoration: none; }
.mega-feature:hover { background: var(--coral); color: var(--ink); }
.mega-feature strong { display: block; margin-bottom: .6rem; font-size: 1.2rem; }
.mega-links { display: grid; align-content: start; }
.mega-links > span { margin-bottom: .4rem; color: var(--coral); font: 800 .68rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.mega-links a { padding: .7rem 0; border-bottom: 1px solid rgb(247 249 252 / 20%); text-decoration: none; font-weight: 720; }
.mega-links a:hover { color: var(--coral); }
.mobile-menu { position: absolute; z-index: 490; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 76px); overflow: auto; padding: 1rem; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.mobile-menu details { border-top: 1px solid rgb(247 249 252 / 24%); }
.mobile-menu details:last-of-type { border-bottom: 1px solid rgb(247 249 252 / 24%); }
.mobile-menu summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 850; }
.mobile-menu summary::after { content: "+"; color: var(--coral); }
.mobile-menu details[open] summary::after { content: "-"; }
.mobile-menu a { display: block; padding: .65rem 1rem; text-decoration: none; }
.mobile-menu a:hover, .mobile-menu a:focus-visible { background: var(--accent-fill); color: var(--on-accent); }
.mobile-menu > a { border-top: 1px solid rgb(247 249 252 / 24%); font-weight: 850; }
.no-js-nav { padding: .7rem max(1rem, calc((100vw - 1120px) / 2)); display: flex; flex-wrap: wrap; gap: .45rem 1.25rem; border-top: 1px solid var(--rule); background: var(--bg); }
.no-js-nav a { font-weight: 800; text-underline-offset: .2rem; }
.js .no-js-nav { display: none; }

.header-inner > *, .mega-layout > *, .section-head > *, .work-item > *, .profile-grid > *, .contact-panel > * { min-width: 0; }

/* Calm hero */
.hero { min-height: min(820px, calc(100dvh - 76px)); display: grid; align-content: center; padding-block: clamp(5rem, 10vw, 9rem); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; z-index: -1; width: min(52vw, 660px); aspect-ratio: 1; right: -16%; top: -12%; border: 1px solid color-mix(in srgb, var(--blue) 28%, transparent); border-radius: 50%; }
html.orbit-mode .hero::before { border-color: var(--coral); box-shadow: 0 0 0 1.25rem color-mix(in srgb, var(--blue) 7%, transparent), 0 0 0 3rem color-mix(in srgb, var(--coral) 5%, transparent); animation: orbit-signal 4s ease-in-out infinite alternate; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 280px); align-items: center; gap: clamp(2.5rem, 6vw, 5rem); }
.hero-copy { max-width: 820px; }
.hero h1 span { display: block; color: var(--accent-text); }
.hero-statement { max-width: 900px; margin-bottom: 1.3rem; font-size: clamp(1.55rem, 3.3vw, 3rem); font-weight: 780; line-height: 1.08; letter-spacing: -.04em; }
.portrait-card { margin: 0; }
.portrait-frame { position: relative; }
.portrait-frame::before { content: ""; position: absolute; z-index: -1; inset: -.75rem .75rem .75rem -.75rem; border: 2px solid var(--accent-fill); border-radius: calc(var(--radius) + .2rem); }
.portrait-card img { width: 100%; display: block; aspect-ratio: 1; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; object-fit: cover; box-shadow: var(--shadow); }
.portrait-card figcaption { display: grid; gap: .15rem; margin-top: 1rem; }
.portrait-card figcaption span { color: var(--accent-text); font: 800 .68rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.portrait-card figcaption strong { font-size: .92rem; }
.facts { margin-top: clamp(3rem, 7vw, 5rem); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.fact { padding: 1.1rem 1.2rem 0 0; }
.fact strong { display: block; margin-bottom: .25rem; color: var(--accent-text); font: 800 .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.fact span { color: var(--muted); }

/* Section framing */
.section-head { display: grid; grid-template-columns: minmax(130px, .28fr) 1fr; gap: clamp(1.5rem, 5vw, 4rem); margin-bottom: clamp(3rem, 7vw, 5rem); padding-top: 1.35rem; border-top: 4px solid var(--accent-fill); }
.section-head > div { max-width: 790px; }
.section-no { width: max-content; align-self: start; padding: .42rem .65rem; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font: 800 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.section-head p { color: var(--muted); }

#work { border-block: 1px solid var(--rule); background: var(--surface); }
#about .section-head { border-top-color: var(--coral); }
#about .section-no { background: var(--coral); color: var(--ink); }
#contact { border-block: 1px solid rgb(247 249 252 / 18%); background: var(--ink); color: var(--paper); }
#contact .eyebrow { color: var(--coral); }
#contact .lede { color: rgb(247 249 252 / 74%); }
#contact .contact-note { border-color: transparent; background: var(--paper); color: var(--ink); }
#contact .contact-note span { color: rgb(7 10 18 / 68%); }
html[data-theme="dark"] #contact { background: color-mix(in srgb, var(--blue) 18%, var(--ink)); }

/* Selected work: spacious rows, not a wall of cards */
.work-list { border-top: 1px solid var(--rule); }
.work-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(210px, .44fr); gap: clamp(1.25rem, 4vw, 3rem); padding-block: clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--rule); }
.work-index { color: var(--accent-text); font: 800 .72rem var(--mono); }
.work-item p { max-width: 650px; color: var(--muted); }
.work-outcome { padding-left: 1.2rem; border-left: 3px solid var(--coral); }
.work-outcome strong { display: block; margin-bottom: .4rem; font-size: .78rem; }
.work-outcome span { color: var(--muted); font-size: .92rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tag { padding: .3rem .6rem; border: 1px solid var(--rule); border-radius: 999px; font: 700 .68rem var(--mono); }

/* Profile, privacy and contact */
.profile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.profile-block { min-height: 240px; padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--rule); }
.profile-block:first-child { background: var(--accent-fill); color: var(--on-accent); }
.profile-block:first-child p { color: rgb(255 255 255 / 90%); }
.profile-block p { color: var(--muted); }
.contact-panel { padding-block: clamp(4rem, 8vw, 7rem); display: grid; grid-template-columns: 1fr .7fr; gap: 2rem; align-items: end; }
.contact-note { padding: 1.3rem; border: 1px solid var(--rule); background: var(--surface); }
.contact-note strong { display: block; margin-bottom: .4rem; }
.contact-note span { color: var(--muted); }
.footer { padding: 2rem max(1.5rem, calc((100vw - 1120px) / 2)); display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule); color: var(--muted); font: 700 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.easter-message { position: fixed; z-index: 700; right: 1rem; bottom: 1rem; margin: 0; padding: .7rem 1rem; border: 1px solid var(--coral); border-radius: 999px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); font: 800 .72rem var(--mono); letter-spacing: .04em; }

@keyframes orbit-signal {
  from { transform: scale(1); }
  to { transform: scale(1.035); }
}

@media (max-width: 900px) {
  .shell { width: min(100% - 2rem, 720px); }
  .header-inner { min-height: 68px; grid-template-columns: 1fr auto; }
  .desktop-nav, .js .desktop-nav, .contact-button { display: none; }
  .header-actions { grid-column: 2; }
  .js .mobile-toggle { display: inline-flex; }
  .mega-panel { display: none !important; }
  .mobile-menu { position: fixed; top: 68px; bottom: 0; max-height: none; overscroll-behavior: contain; }
  .theme-toggle .theme-dot { display: none; }
  .hero { min-height: auto; }
  .hero::before { width: 90vw; right: -48%; }
  .hero-layout { grid-template-columns: 1fr; }
  .portrait-card { width: min(260px, 72vw); margin-top: 1rem; }
  .facts { grid-template-columns: 1fr; }
  .fact { padding-block: .9rem; border-bottom: 1px solid var(--rule); }
  .section-head, .work-item, .contact-panel { grid-template-columns: 1fr; }
  .work-item { gap: .8rem; }
  .work-outcome { margin-top: .6rem; }
  .profile-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}

@media (min-width: 901px) {
  .mobile-menu, .mobile-toggle { display: none !important; }
}

@media (max-width: 560px) {
  h1 { font-size: clamp(3rem, 17vw, 5rem); }
  .brand { max-width: 155px; white-space: normal; line-height: 1.05; }
  .header-actions { gap: .35rem; }
  .theme-toggle, .mobile-toggle { min-width: 58px; padding-inline: .6rem; }
  .theme-toggle [data-theme-label] { font-size: .75rem; }
  .mobile-toggle { font-size: .75rem; }
}

@media (max-width: 360px) {
  .shell { width: calc(100% - 1.25rem); }
  .header-inner { width: calc(100% - 1rem); gap: .35rem; }
  .brand { max-width: 120px; font-size: .82rem; }
  .theme-toggle [data-theme-label] { display: none; }
  .theme-toggle { min-width: 42px; }
  .mobile-toggle { min-width: 52px; }
  .section { padding-block: 4.25rem; }
}

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

@media print {
  html, html[data-theme="dark"] {
    --bg: #fff;
    --surface: #f7f9fc;
    --text: #070a12;
    --muted: #3f4654;
    --rule: rgb(7 10 18 / 20%);
    --accent-text: #155eef;
  }
  .site-header, .actions, .footer { display: none !important; }
  body { background: white; color: black; }
  .section { padding-block: 2rem; }
  .hero { min-height: 0; padding-block: 2rem; }
  h1 { font-size: 36pt; line-height: 1; }
  .hero-statement { font-size: 18pt; }
}
