/* Dark by default; light when the visitor's Mac is light or they flip the switch (main.js sets data-theme). */
:root {
  --bg: #000000;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --hairline: rgb(255 255 255 / 0.14);
  --accent: #0071e3;
  --link: #2997ff;
  --nav-bg: rgb(0 0 0 / 0.55);
  --wall: url("/assets/problack.webp");
  --wall-small: url("/assets/problack-1200.webp");
  --wall-dim: rgb(0 0 0 / 0.35);
  --glass-solid: #202023;
  --glass-fill: rgb(255 255 255 / 0.03);
  --glass-hairline: rgb(255 255 255 / 0.10);
  --glass-sheen-card: linear-gradient(170deg, rgb(255 255 255 / 0.10), rgb(255 255 255 / 0) 38%);
  --glass-bright: 1.35;
  --glass-spec: rgb(255 255 255 / 0.75);
  --glass-spec-low: rgb(255 255 255 / 0.16);
  --glass-top: rgb(255 255 255 / 0.18);
  --glass-bottom: rgb(255 255 255 / 0.05);
  --glass-bevel: rgb(255 255 255 / 0.04);
  --glass-shadow: rgb(0 0 0 / 0.6);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --hairline: rgb(0 0 0 / 0.1);
  --link: #0066cc;
  --nav-bg: rgb(251 251 253 / 0.72);
  --wall: url("/assets/silver.webp");
  --wall-small: url("/assets/silver-1200.webp");
  --wall-dim: rgb(255 255 255 / 0.55);
  --glass-solid: #ffffff;
  --glass-fill: rgb(255 255 255 / 0.16);
  --glass-hairline: rgb(255 255 255 / 0.6);
  --glass-sheen-card: linear-gradient(170deg, rgb(255 255 255 / 0.55), rgb(255 255 255 / 0) 40%);
  --glass-bright: 1.04;
  --glass-spec: rgb(255 255 255 / 1);
  --glass-spec-low: rgb(255 255 255 / 0.55);
  --glass-top: rgb(255 255 255 / 0.9);
  --glass-bottom: rgb(0 0 0 / 0.04);
  --glass-bevel: rgb(255 255 255 / 0.5);
  --glass-shadow: rgb(0 0 0 / 0.22);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  isolation: isolate;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One wallpaper behind the whole page, dimmed a little so text keeps its contrast. */
body::before {
  /* Large viewport height, so the wallpaper does not rescale as phone toolbars slide. */
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; z-index: -1;
  background: linear-gradient(var(--wall-dim), var(--wall-dim)), var(--wall) center / cover;
}
@media (max-width: 1200px) { body::before { background-image: linear-gradient(var(--wall-dim), var(--wall-dim)), var(--wall-small); } }

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; padding: 10px 14px; background: var(--bg); color: var(--link); box-shadow: 0 0 0 1px var(--hairline); border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }

/* Type, on Apple's scale and tracking. */
.headline { font-size: clamp(40px, 7vw, 80px); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; margin: 0; }
.tagline { font-size: clamp(21px, 2.8vw, 28px); font-weight: 400; line-height: 1.25; letter-spacing: -0.02em; margin: 8px 0 0; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--muted); margin: 0 0 16px; letter-spacing: -0.01em; }

/* Nav: Apple's thin translucent bar. */
.nav { position: sticky; top: 0; z-index: 5; background: var(--nav-bg); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hairline); }
.nav-row { width: min(100% - 40px, 1024px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; height: 48px; }
.nav-name { color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.nav nav { display: flex; gap: 28px; }
.nav nav a { color: var(--ink); font-size: 13px; opacity: 0.82; }
.nav nav a:hover { opacity: 1; text-decoration: none; }
.nav-end { display: flex; align-items: center; gap: 20px; }
.theme-switch { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -12px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; opacity: 0.82; }
.theme-switch:hover { opacity: 1; }
.theme-switch svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Shows where the switch goes: a sun in dark mode, a moon in light mode. */
:root[data-theme="light"] .theme-switch .sun, :root:not([data-theme="light"]) .theme-switch .moon { display: none; }

/* Links with Apple's trailing chevron. */
.chevron { font-size: 19px; letter-spacing: -0.01em; }
.chevron::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; transform: translateY(-1px) rotate(45deg); }


/* Label-to-arrow blur morph, as on gazeunlock.com. Fine pointers only, so touch never sticks. */
.morph { position: relative; display: inline-grid; place-items: center; }
.morph > * { grid-area: 1 / 1; transition: opacity 340ms linear, filter 340ms cubic-bezier(0.22, 1, 0.36, 1); }
.morph .hover { opacity: 0; filter: blur(16px); }
.morph .hover svg { width: 20px; height: 20px; }
.morph .hover svg.gh { width: 24px; height: 24px; }
a:focus-visible > .morph .rest { opacity: 0; filter: blur(16px); }
a:focus-visible > .morph .hover { opacity: 1; filter: blur(0); }
@media (hover: hover) and (pointer: fine) {
  a:hover > .morph .rest { opacity: 0; filter: blur(16px); }
  a:hover > .morph .hover { opacity: 1; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .morph > * { transition: none; }
  .morph .hover { display: none; }
  a:hover > .morph .rest, a:focus-visible > .morph .rest { opacity: 1; filter: none; }
}


/* Hero: photo on the left, name on the right, straight on the wallpaper. */
.hero { width: min(100% - 40px, 1024px); margin: 0 auto; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 96px); }
.desktop { display: grid; grid-template-columns: minmax(0, 300px) 1fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.intro-name { font-size: clamp(48px, 7vw, 80px); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; margin: 0; }
.intro-line { font-size: clamp(21px, 2.6vw, 28px); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--muted); margin: 14px 0 0; max-width: 18ch; }
.intro-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 24px; box-shadow: 0 0 0 1px var(--hairline), 0 24px 60px rgb(0 0 0 / 0.5); }

/* Projects: Apple-style cards, one per app. More apps add more cards. */
.work { width: min(100% - 40px, 1024px); margin: 0 auto; padding: clamp(24px, 4vw, 48px) 0 clamp(80px, 11vw, 140px); text-align: center; }
.cards { list-style: none; margin: clamp(40px, 6vw, 64px) 0 0; padding: 0; display: grid; gap: 20px; }
.card { border-radius: 28px; overflow: hidden; text-align: center; }
/* Matches the lock screen in the picture, so the Mac sits on one surface. */
.card-dark { background: #000; color: #f5f5f7; border: 1px solid var(--hairline); --link: #2997ff; }
.card-dark a.chevron { color: var(--link); }
.card-media { padding: clamp(28px, 5vw, 56px) clamp(20px, 6vw, 72px) 0; }
.card-text { padding: 0 24px clamp(48px, 6vw, 64px); }
.card-title { font-size: clamp(32px, 4.5vw, 48px); font-weight: 700; line-height: 1.08; letter-spacing: -0.035em; margin: 0; }
.card-tagline { font-size: clamp(19px, 2.4vw, 24px); line-height: 1.25; letter-spacing: -0.02em; margin: 8px 0 0; color: #a1a1a6; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; margin-top: 28px; }
/* The shell image has wide empty margins; let the laptop itself fill the width. */
.mac { position: relative; aspect-ratio: 1920 / 1280; width: 136%; margin-inline: -18%; margin-block: -9% -10%; }
/* Screen geometry from gaze-site/src/components/hero-device.tsx. */
.mac-plate { position: absolute; left: 19.1%; top: 18.7%; width: 61.8%; height: 59.6%; background: #000; }
.mac-screen { position: absolute; left: 19.444%; top: 19.067%; width: 61.111%; height: 58.933%; overflow: hidden; }
.mac-screen video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mac-shell { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
/* Pause control for the clip (WCAG 2.2.2), inside the screen's bottom-right corner. Shown on hover or focus; always on touch. */
.video-toggle { position: absolute; right: 21%; bottom: 25%; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgb(0 0 0 / 0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; cursor: pointer; opacity: 0; transition: opacity 0.2s; }
.video-toggle svg { width: 12px; height: 12px; fill: currentColor; }
.video-toggle[aria-pressed="false"] .play, .video-toggle[aria-pressed="true"] .pause { display: none; }
.mac:hover .video-toggle, .video-toggle:focus-visible { opacity: 1; }
.video-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
@media (hover: none) { .video-toggle { opacity: 1; } }

/* About statement: the words light up one by one as you scroll, like gazeunlock.com's WordScroll. */
.statement { text-align: center; padding: clamp(80px, 11vw, 140px) 20px; }
.statement-text { font-size: clamp(30px, 4.6vw, 56px); font-weight: 600; line-height: 1.12; letter-spacing: -0.03em; margin: 0 auto; max-width: 22ch; text-wrap: balance; }
/* Sized before first paint (the head script adds .js), so nothing below shifts when the script runs. */
@media (prefers-reduced-motion: no-preference) {
  .js .statement { height: 260vh; padding: 0 20px; }
  .js .statement .statement-stage { position: sticky; top: 48px; height: calc(100svh - 48px); display: grid; place-content: center; }
}
.words .w { position: relative; display: inline-block; }
.words .dim { color: color-mix(in oklab, color-mix(in oklab, var(--link) 45%, var(--ink)) 22%, transparent); }
.words .lit { position: absolute; inset: 0; color: var(--ink); opacity: 0; }
.words .glo { position: absolute; inset: 0; color: transparent; opacity: 0; pointer-events: none; text-shadow: 0 0 10px rgb(147 197 253 / 0.9), 0 0 26px rgb(147 197 253 / 0.6); }
.words .lit::before, .words .glo::before { content: attr(data-word); }
@media (prefers-reduced-motion: no-preference) and (max-width: 720px) { .js .statement { height: 200vh; } }

/* Setup: a shelf of app cards, each lit by its own icon, like the App Store. */
.setup { text-align: center; padding: clamp(80px, 11vw, 140px) 0 clamp(64px, 9vw, 112px); }
.setup > .headline, .setup > .tagline, .setup > .machine { padding-inline: 20px; }
.gallery { --inset: max(20px, calc((100% - 1024px) / 2)); margin-top: clamp(48px, 7vw, 72px); }
.shelf {
  /* Room above and below so the cards' shadows fade out instead of being cut off by the scroller. */
  list-style: none; margin: -32px 0 -56px; padding: 32px var(--inset) 72px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(300px, 76vw); gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--inset);
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf:focus-visible { outline-offset: -2px; }
/* Liquid Glass panel, values from Apple's macOS 27 Figma kit (owen-design-kit liquid-glass skill):
   radius 34, frosted fill, hairline rim, soft lit bevel, 0 18 48 shadow. */
.app-card {
  /* Each card on its own GPU layer: Chromium otherwise drops filtered cards mid-scroll. */
  position: relative; isolation: isolate; scroll-snap-align: start; transform: translateZ(0); will-change: transform;
  height: 420px; padding: 30px; border-radius: 34px; color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  /* Live Liquid Glass: the middle is clear, so whatever is behind shows through in real time. */
  background: var(--glass-fill);
  box-shadow:
    inset 0 0 0 0.5px var(--glass-hairline),
    inset 0 0 30px var(--glass-bevel),
    inset 0 0 22px -8px var(--glass-spec-low),
    0 24px 60px -18px var(--glass-shadow);
}
/* The lens: only the edge band bends light, fading toward the clear middle. It is a backdrop filter, so it
   follows the page with no lag. Chromium gets true refraction from lens.js (--lens); Safari and Firefox
   get the same band as a brighter, more saturated soft blur. */
.app-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  backdrop-filter: var(--lens, blur(5px) saturate(210%) brightness(var(--glass-bright)));
  -webkit-backdrop-filter: blur(5px) saturate(210%) brightness(var(--glass-bright));
  --edge: 30px;
  -webkit-mask: linear-gradient(to right, #000, transparent var(--edge)), linear-gradient(to left, #000, transparent var(--edge)),
    linear-gradient(to bottom, #000, transparent var(--edge)), linear-gradient(to top, #000, transparent var(--edge));
  mask: linear-gradient(to right, #000, transparent var(--edge)), linear-gradient(to left, #000, transparent var(--edge)),
    linear-gradient(to bottom, #000, transparent var(--edge)), linear-gradient(to top, #000, transparent var(--edge));
}
/* Specular rim: light catches the top left and bottom right, plus a glint where the pointer is. */
.app-card::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background:
    radial-gradient(160px circle at var(--mx, 18%) var(--my, 0%), var(--glass-spec), transparent 70%),
    linear-gradient(135deg, var(--glass-spec) 0%, var(--glass-spec-low) 18%, transparent 40%, transparent 62%, var(--glass-spec-low) 84%, var(--glass-spec) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
@media (prefers-reduced-transparency: reduce) { .app-card { background: var(--glass-solid); } .app-card::before { display: none; } }
.app-card-icon { width: 128px; height: 128px; margin: 36px auto auto; filter: drop-shadow(0 18px 30px rgb(0 0 0 / 0.4)); }
.app-card h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.app-card p { font-size: 15px; line-height: 1.4; margin: 6px 0 0; color: var(--muted); }
.shelf-nav { display: flex; justify-content: flex-end; gap: 14px; padding: 20px var(--inset) 0; }
.shelf-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--glass-sheen-card), var(--glass-fill); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); box-shadow: inset 0 1px 0 var(--glass-top), inset 0 0 0 0.5px var(--glass-spec-low), 0 6px 16px -6px var(--glass-shadow); color: var(--ink); cursor: pointer; transition: opacity 0.2s; }
.shelf-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.shelf-button:hover:not(.is-off):not([aria-disabled="true"]) { background: var(--glass-sheen-card), color-mix(in srgb, var(--glass-fill), var(--ink) 8%); }
.shelf-button.is-off { opacity: 0.4; cursor: default; }
.machine { margin: clamp(56px, 8vw, 80px) 0 0; font-size: 15px; color: var(--muted); }

/* Contact */
.contact { width: min(100% - 40px, 680px); margin: 0 auto; padding: clamp(48px, 7vw, 80px) 0; }
.contact ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.contact li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; border-bottom: 1px solid var(--hairline); font-size: 17px; }
.contact .label { font-size: 15px; color: var(--muted); }
.copy { font: inherit; color: var(--link); background: none; border: 0; padding: 8px 0; cursor: pointer; }
.copy:hover { text-decoration: underline; text-underline-offset: 3px; }
.copied { margin-left: 8px; color: var(--muted); font-size: 14px; }

.footer { border-top: 1px solid var(--hairline); padding: 20px; text-align: center; font-size: 12px; color: var(--muted); }
.footer p { margin: 0; }


@media (max-width: 600px) {
  .nav nav { gap: 16px; }
  .nav nav a[href="#setup"] { display: none; }
  .card { border-radius: 22px; }
  .desktop { grid-template-columns: 1fr; }
  .intro-links { margin-top: 24px; }
  .app-card { height: 380px; padding: 24px; border-radius: 28px; }
  .app-card-icon { width: 112px; height: 112px; }
}

@media (max-width: 360px) { .nav nav { gap: 12px; } .nav-end { gap: 8px; } }
