/* ==========================================================================
   Zeyad ElGammal — portfolio
   Plain CSS, no build step. Strict-CSP friendly: no inline styles anywhere.
   Sections: 1 fonts · 2 tokens · 3 base · 4 layout · 5 header · 6 hero
             7 wheel · 8 marquee · 9 about cards · 10 work · 11 holograms
             12 experience · 13 certifications · 14 writing · 15 contact
             16 footer · 17 responsive · 18 reduced motion
   ========================================================================== */

/* 1. Fonts (self-hosted, no third-party requests) ------------------------- */
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-800.woff") format("woff"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-300.woff") format("woff"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-400-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Nothing You Could Do"; src: url("../fonts/nothing-you-could-do-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

/* 2. Design tokens --------------------------------------------------------- */
:root {
  --bg: #191919;
  --bg-deep: #141415;
  --surface: #1f1f22;
  --surface-2: #222225;
  --surface-3: #2a2a2e;
  --ink: #f4f1ea;
  --ink-strong: #ffffff;
  --muted: #a8a29a;
  --muted-2: #bdb7ad;
  --faint: #9a948b;
  --line: rgba(255, 255, 255, 0.08);
  --gold: #ffd98e;
  --gold-ink: #17140f;
  --teal: #7fb7a4;
  --orange: #f0a37a;
  --holo: #8feaff;
  --radius: 8px;
  --radius-sm: 6px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Display", "Inter", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-hand: "Nothing You Could Do", "Segoe Print", "Bradley Hand", cursive;
  --wrap: 1200px;
  --gutter: 32px;
  --footer-h: 64px;
  color-scheme: dark;
}

/* 3. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); line-height: 1.5; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink-strong); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul { margin: 0; }
.mono { font-family: var(--font-mono); }
.serif-i { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.gold { color: var(--gold); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 16px; color: var(--gold-ink); }

/* 4. Layout ---------------------------------------------------------------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.section-head p { max-width: 420px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.h2 { font-size: 56px; line-height: 1.02; letter-spacing: -0.03em; font-weight: 600; }
.h2 .serif-i { color: var(--gold); }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { color: var(--gold-ink); filter: brightness(1.06); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.18); color: var(--ink); }
.pill { font-family: var(--font-mono); font-size: 12px; padding: 5px 9px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.14); color: #c9c3ba; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.link-gold { font-weight: 600; color: var(--gold); }
.link-gold:hover { color: #ffe7b5; }
.dots { display: flex; align-items: center; gap: 8px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: #45454b; }
.dots.color span:nth-child(1) { background: #ff5f57; }
.dots.color span:nth-child(2) { background: #febc2e; }
.dots.color span:nth-child(3) { background: #28c840; }

/* 5. Header ---------------------------------------------------------------- */
.topbar { position: absolute; z-index: 10; inset: 0 0 auto 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 24px 36px; }
.logo { justify-self: start; display: inline-flex; }
.cta { justify-self: center; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; background: linear-gradient(120deg, #ffe6a8 0%, #ffd98e 45%, #e9b65c 100%); color: var(--gold-ink); font: 700 17px var(--font-sans); letter-spacing: -0.01em; box-shadow: 0 0 0 1px rgba(255, 217, 142, 0.5), 0 8px 30px rgba(255, 217, 142, 0.28); transition: transform .2s ease, box-shadow .2s ease; }
.cta:hover { color: var(--gold-ink); transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 217, 142, 0.8), 0 10px 40px rgba(255, 217, 142, 0.45); }
.cta svg { transition: transform .2s ease; }
.cta:hover svg { transform: translateX(3px); }
.cta-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #1f8a55; }
.cta-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(31, 138, 85, 0.55); animation: ping 2s ease-out infinite; }
@keyframes ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.toplinks { display: flex; justify-content: flex-end; gap: 10px; }
.toplinks a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 8px; background: rgba(20, 20, 22, 0.72); border: 1px solid rgba(255, 255, 255, 0.12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 500; font-size: 16px; color: var(--ink); transition: border-color .2s, color .2s, background .2s; }
.toplinks a svg { width: 16px; height: 16px; color: var(--gold); }
.toplinks a:hover { color: #fff; border-color: rgba(255, 217, 142, 0.55); background: rgba(28, 28, 30, 0.85); }

/* 6. Hero ------------------------------------------------------------------ */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--bg); }
.hero-text { position: absolute; z-index: 3; left: 7vw; top: 50%; transform: translateY(-38%); max-width: 44vw; }
.hero-name { font-family: var(--font-display); font-size: clamp(44px, 5.86vw, 100px); line-height: 0.85; letter-spacing: -0.02em; font-weight: 400; color: var(--gold); margin-top: 0.32em; }
.hero-tag { font-family: var(--font-display); font-weight: 300; font-size: clamp(14px, 1.37vw, 22px); line-height: 1.4; letter-spacing: -0.01em; color: #fcfcfc; margin-top: 0.9em; max-width: 36em; }

/* photo + curly arrow trigger */
.me { position: relative; display: inline-block; }
.photo-btn { display: block; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.photo-btn:focus-visible { outline: none; }
.photo { display: block; width: clamp(84px, 11.1vw, 170px); height: clamp(84px, 11.1vw, 170px); border-radius: 50%; overflow: hidden; background: #fff; transition: transform .35s ease, box-shadow .35s ease; }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.me:hover .photo, .photo-btn:focus-visible .photo, .me.is-open .photo { transform: scale(1.04); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gold); }
.arrow { position: absolute; left: calc(100% + 6px); top: -6px; display: flex; align-items: flex-start; gap: 2px; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.arrow span { font-family: var(--font-hand); font-size: 30px; line-height: 1; color: var(--gold); transform: rotate(-8deg) translateY(-6px); white-space: nowrap; }
.me:hover .arrow, .me:focus-within .arrow, .me.is-open .arrow { opacity: 0; transform: translateX(12px); }
.arrow-tap { display: none; }
@media (hover: none) { .arrow-hover { display: none; } .arrow-tap { display: inline; } }

/* 7. Spinning card wheel ----------------------------------------------------
   8 spokes 45° apart on one vertical axis; each card twisted another 45°;
   the whole wheel tilted toward the viewer and spun around Y.              */
.stage { position: absolute; z-index: 1; left: 78%; top: 51%; width: 0; height: 0; pointer-events: none; }
.scaler { position: absolute; left: 0; top: 0; transform: scale(1.2); }
.tilt { position: absolute; left: -347px; top: -261px; width: 694px; height: 522px; transform-style: preserve-3d; transform-origin: 347px 261px; transform: matrix3d(0.319058, 0.41342, 0.492404, -0.000410337, -0.186947, 0.41989, -0.642788, 0.000535656, -0.472497, 0.113033, 0.586824, -0.00048902, 0, 0, 0, 1); }
.ring { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 347px 261px; animation: spin 12s linear infinite; }
@keyframes spin { from { transform: rotateY(0deg); } to { transform: rotateY(-360deg); } }
.spoke { position: absolute; left: 355px; top: 261px; width: 350px; height: 552px; transform-origin: 0 276px; transform-style: preserve-3d; }
.spoke:nth-child(1) { transform: translateY(-276px) rotateY(0deg); }
.spoke:nth-child(2) { transform: translateY(-276px) rotateY(45deg); }
.spoke:nth-child(3) { transform: translateY(-276px) rotateY(90deg); }
.spoke:nth-child(4) { transform: translateY(-276px) rotateY(135deg); }
.spoke:nth-child(5) { transform: translateY(-276px) rotateY(180deg); }
.spoke:nth-child(6) { transform: translateY(-276px) rotateY(225deg); }
.spoke:nth-child(7) { transform: translateY(-276px) rotateY(270deg); }
.spoke:nth-child(8) { transform: translateY(-276px) rotateY(315deg); }
.face { position: absolute; left: 20px; top: 0; width: 330px; height: 552px; border-radius: 20px; overflow: hidden; transform-origin: 165px 276px; transform: rotateY(45deg); padding: 28px; }
.face .mono { font-size: 13px; line-height: 1.85; }
.face-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.face-big { position: absolute; left: 28px; bottom: 26px; line-height: 0.9; }
.f-blue { background: linear-gradient(165deg, #5c93ff 0%, #3b78f2 55%, #bfd3ff 100%); color: #fff; }
.f-blue .face-quote { font-family: var(--font-serif); font-size: 58px; line-height: 0.98; margin-top: 8px; }
.f-blue .face-foot { position: absolute; left: 30px; bottom: 30px; font-family: var(--font-mono); font-size: 13px; color: rgba(255, 255, 255, 0.88); }
.f-term { background: #0e0e10; border: 1px solid rgba(255, 255, 255, 0.12); color: #c9c3ba; padding: 0; }
.f-term .dots { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.f-term .dots span { width: 12px; height: 12px; }
.f-term .mono { padding: 22px; }
.ok { color: #6fd3a8; }
.dim { color: #8c867e; }
.f-term .face-big { left: 22px; font: 700 54px/0.9 var(--font-sans); letter-spacing: -0.04em; color: #fff; }
.f-cream { background: #f3ebdc; color: #3a342b; }
.f-cream .face-big { font-family: var(--font-serif); font-style: italic; font-size: 66px; color: #1a1a1a; }
.f-pipe { background: linear-gradient(170deg, #e9edf4, #aeb8cb); color: #1a1a1a; }
.f-pipe .face-label { color: #3d4555; margin-bottom: 20px; display: block; }
.f-pipe .steps { display: flex; flex-direction: column; gap: 12px; }
.f-pipe .steps span { font-family: var(--font-mono); padding: 16px; border-radius: 12px; background: #fff; font-size: 14px; }
.f-pipe .steps .hl { background: #1a1a1a; color: var(--gold); }
.f-serp { background: #fff; color: #1a1a1a; padding: 26px; }
.f-serp .search { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 999px; border: 1px solid #dadce0; font-size: 14px; color: #3c4043; }
.f-serp .crumb { margin-top: 22px; font-size: 12px; color: #4d5156; }
.f-serp .result { margin-top: 4px; font-size: 19px; line-height: 1.3; color: #1a0dab; }
.f-serp .snippet { margin-top: 6px; font-size: 13px; line-height: 1.5; color: #4d5156; }
.f-serp .face-big { left: 26px; font: 700 50px/0.92 var(--font-sans); letter-spacing: -0.04em; }
.f-tf { background: linear-gradient(160deg, #f4f4f2, #c9cbcf); color: #2a2a2e; }
.f-tf .add { color: #1e7a4f; } .f-tf .chg { color: #a8660a; }
.f-tf .face-big { font: 800 72px/0.9 var(--font-sans); letter-spacing: -0.05em; color: #1a1a1a; }
.f-chart { background: linear-gradient(180deg, #f7f8fb, #d9dfea); display: flex; flex-direction: column; color: #4a5163; }
.f-chart .chart-head { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; }
.bars { flex: 1; display: flex; align-items: flex-end; gap: 8px; margin-top: 20px; }
.bars span { flex: 1; border-radius: 5px; background: #9aa6be; }
.bars span:nth-child(1) { height: 86%; } .bars span:nth-child(2) { height: 78%; } .bars span:nth-child(3) { height: 90%; } .bars span:nth-child(4) { height: 60%; }
.bars span:nth-child(5) { height: 36%; background: #3b78f2; } .bars span:nth-child(6) { height: 28%; background: #3b78f2; } .bars span:nth-child(7) { height: 24%; background: #3b78f2; }
.f-chart .chart-word { margin-top: 18px; font: 700 44px/0.95 var(--font-sans); letter-spacing: -0.04em; color: #1a1a1a; }
.f-cloud { background: linear-gradient(170deg, #1f5f55, #0f2e2a); color: #fff; }
.f-cloud .face-label { color: #9fd8c8; }
.f-cloud .vpc { margin-top: 22px; border: 1px dashed rgba(159, 216, 200, 0.55); border-radius: 14px; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.f-cloud .vpc span { font-family: var(--font-mono); padding: 14px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); font-size: 13px; text-align: center; }
.f-cloud .face-big { font-family: var(--font-serif); font-size: 66px; }

/* 8. Tool marquee ---------------------------------------------------------- */
.marquee { position: absolute; z-index: 4; left: 0; right: 0; bottom: 36px; overflow: hidden; }
.track { display: flex; align-items: center; gap: clamp(48px, 6vw, 96px); width: max-content; padding-left: 48px; margin: 0; list-style: none; animation: scroll 46s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.track li { white-space: nowrap; color: #fff; font-size: clamp(22px, 2.4vw, 38px); }
.t-sans { font-weight: 700; letter-spacing: -0.03em; }
.t-heavy { font-weight: 800; letter-spacing: -0.04em; }
.t-serif { font-family: var(--font-serif); }
.t-serif-i { font-family: var(--font-serif); font-style: italic; }
.t-mono { font-family: var(--font-mono); letter-spacing: -0.02em; }
.t-caps { font-weight: 500; letter-spacing: 0.14em; }
.t-italic { font-weight: 700; font-style: italic; letter-spacing: -0.03em; }

/* 9. About cards (fan out from the photo) ---------------------------------- */
.about { position: absolute; left: 100%; top: -24px; z-index: 8; display: flex; flex-wrap: wrap; gap: 16px; width: 812px; padding-left: 28px; box-sizing: content-box; pointer-events: none; }
.me:hover .about, .me:focus-within .about, .me.is-open .about { pointer-events: auto; }
.hero-text:has(.me:hover), .hero-text:has(.me:focus-within), .hero-text:has(.me.is-open) { z-index: 6; }

.acard { position: relative; width: 260px; min-height: 300px; padding: 22px 22px 24px; border-radius: 10px; overflow: hidden; box-shadow: 0 34px 80px rgba(0, 0, 0, 0.6); text-align: left; display: flex; flex-direction: column; opacity: 0; transform: translateX(-80px) translateY(20px) rotate(-14deg) scale(0.8); transform-origin: 0 100%; transition: opacity .3s ease, transform .55s cubic-bezier(.2, .9, .25, 1.25), box-shadow .3s ease; transition-delay: 0ms; --r: 0deg; --d: 0ms; }
.acard:nth-child(1) { --r: -4deg; --d: 0ms; }
.acard:nth-child(2) { --r: 2deg; --d: 80ms; }
.acard:nth-child(3) { --r: 5deg; --d: 160ms; }
.acard:nth-child(4) { --r: -1deg; --d: 260ms; }
.me:hover .acard, .me:focus-within .acard, .me.is-open .acard { opacity: 1; transform: translateX(0) rotate(var(--r)) scale(1); transition-delay: var(--d); }
.me .acard:hover { transform: translateY(-10px) rotate(0deg) scale(1.04); transition-delay: 0ms; box-shadow: 0 44px 90px rgba(0, 0, 0, 0.7); z-index: 2; }
.acard-n { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.acard-title { margin: 14px 0 12px; font: 700 22px/1.15 var(--font-sans); letter-spacing: -0.02em; }
.acard .big { font: 400 42px/0.95 var(--font-serif); letter-spacing: -0.01em; }
.acard p:not(.acard-title) { margin-top: auto; font-size: 14px; line-height: 1.6; }
.a-cream { background: #f3ebdc; color: #1a1a1a; }
.a-cream .acard-n { color: #8a6a2e; } .a-cream p:not(.acard-title) { color: #3a342b; }
.a-blue { background: linear-gradient(165deg, #5c93ff 0%, #3b78f2 60%, #2a5fd0 100%); color: #fff; }
.a-blue .acard-n { color: rgba(255, 255, 255, 0.85); } .a-blue p:not(.acard-title) { color: rgba(255, 255, 255, 0.92); }
.a-term { background: #0e0e10; color: #fff; border: 1px solid rgba(255, 255, 255, 0.12); padding-top: 16px; }
.a-term .dots span { width: 11px; height: 11px; }
.a-term .acard-n { color: #6fd3a8; margin-top: 14px; } .a-term p:not(.acard-title) { color: #c9c3ba; }
.a-gold { flex-basis: 100%; width: 100%; min-height: 0; padding: 26px 30px 28px; background: linear-gradient(120deg, #ffe6a8 0%, #ffd98e 45%, #e9b65c 100%); color: var(--gold-ink); box-shadow: 0 34px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 217, 142, 0.25); transform-origin: 50% 0; transform: translateY(-40px) scale(0.85); }
.a-gold .acard-n { color: #7a5518; }
.a-gold .quote { margin: 12px 0 14px; font: 400 38px/1.05 var(--font-serif); letter-spacing: -0.01em; color: var(--gold-ink); }
.a-gold .sign { margin: 0 !important; font: 400 13px/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: #5c4312; }

/* compact about cards for short laptop screens */
@media (min-width: 901px) and (max-height: 860px) {
  .about { top: -110px; gap: 12px; width: 764px; }
  .about .acard { width: 246px; min-height: 236px; padding: 18px 18px 20px; }
  .about .acard .big { font-size: 34px; }
  .about .acard-title { margin: 10px 0 10px; }
  .about .acard p:not(.acard-title) { font-size: 13px; line-height: 1.5; }
  .about .a-gold { padding: 18px 24px 20px; min-height: 0; }
  .about .a-gold .quote { font-size: 30px; margin: 8px 0 10px; }
}
@media (min-width: 901px) and (max-height: 700px) {
  .about { top: -104px; }
  .about .acard { min-height: 214px; }
  .about .acard .big { font-size: 30px; }
  .about .a-gold .quote { font-size: 26px; }
}
/* 10. Work (project cards) ------------------------------------------------- */
.work { padding-top: 140px; padding-bottom: 72px; }
.projects { display: flex; flex-direction: column; gap: 32px; }
.project { position: sticky; border-radius: var(--radius); background: var(--surface-2); border: 1px solid rgba(255, 255, 255, 0.09); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); overflow: hidden; }
.project:nth-child(1) { top: 32px; }
.project:nth-child(2) { top: 48px; background: #232326; }
.project:nth-child(3) { top: 64px; background: #242427; }
.chrome { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.03); }
.chrome .file { margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; padding: 40px; }
.project-copy { display: flex; flex-direction: column; gap: 18px; }
.kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.project h3 { font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
.project-copy p { font-size: 16px; line-height: 1.65; color: var(--muted-2); }
.stat { display: flex; align-items: baseline; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface-3); align-self: flex-start; }
.stat strong { font-size: 36px; font-weight: 600; color: var(--gold); }
.stat span { font-size: 14px; color: var(--muted-2); }
.panel { height: 100%; border-radius: var(--radius-sm); background: #161618; border: 1px solid rgba(255, 255, 255, 0.06); padding: 24px; min-height: 300px; }
.panel-term { font-family: var(--font-mono); font-size: 13px; line-height: 1.95; color: var(--muted-2); }
.panel-term .note { color: #7a766f; margin-bottom: 6px; }
.panel-term .warn { color: var(--orange); }
.panel-term .teal { color: var(--teal); }
.panel-flow { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 28px; min-height: 320px; }
.node { font-family: var(--font-mono); padding: 14px; border-radius: 4px; background: var(--surface-3); border: 1px solid var(--line); font-size: 13px; text-align: center; }
.node.hl { border-color: rgba(255, 217, 142, 0.45); color: var(--gold); }
.flow-arrow { font-family: var(--font-mono); text-align: center; color: #7a766f; }
.nodes-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.node-dash { font-family: var(--font-mono); padding: 16px 8px; border-radius: 4px; border: 1px dashed rgba(127, 183, 164, 0.5); font-size: 12px; text-align: center; color: var(--teal); }
.more { margin-top: 72px; }
.more-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.more-head h3, .cert-head { font-size: 22px; font-weight: 600; }
.mini { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); height: 100%; transition: border-color .2s; }
.peek:hover .mini { border-color: rgba(255, 217, 142, 0.45); }
.mini .mono, .wcard .mono, .cert .mono { font-size: 12px; color: var(--faint); }
.mini strong { font-size: 18px; line-height: 1.3; font-weight: 600; }
.mini span:last-child { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* 11. Hologram hover (projects, certificates, writing) ---------------------
   The whole tile links to the source (GitHub / certificate / doc) through a
   stretched .cover link; the hologram's button goes to #contact.           */
.peek { position: relative; display: block; border-radius: var(--radius-sm); perspective: 900px; perspective-origin: 50% 100%; }
.peek-sm { height: 100%; }
.peek-sm:hover, .peek-sm:focus-within { z-index: 6; }
.peek::before { content: ""; position: absolute; z-index: 1; left: 22%; right: 22%; bottom: 10px; height: 3px; border-radius: 3px; background: var(--holo); box-shadow: 0 0 12px 3px rgba(143, 234, 255, 0.8), 0 0 40px 10px rgba(143, 234, 255, 0.35); opacity: 0; transform: scaleX(0.2); transition: opacity .25s ease, transform .35s ease; pointer-events: none; }
.peek::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 10px; top: -6%; background: linear-gradient(to top, rgba(143, 234, 255, 0.42), rgba(143, 234, 255, 0.1) 55%, rgba(143, 234, 255, 0) 85%); clip-path: polygon(40% 100%, 60% 100%, 100% 0, 0 0); opacity: 0; transition: opacity .4s ease .05s; pointer-events: none; mix-blend-mode: screen; }
.cover { position: absolute; inset: 0; z-index: 2; border-radius: var(--radius-sm); }
.art { height: 100%; transition: filter .35s ease, transform .35s ease; }
.hint { position: absolute; right: 14px; bottom: 14px; font: 500 11px var(--font-mono); letter-spacing: .06em; color: var(--faint); padding: 5px 9px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(25, 25, 25, 0.7); transition: opacity .25s; }
.peek-sm .hint { right: 10px; bottom: 10px; font-size: 10px; padding: 4px 8px; }
.holo { position: absolute; left: 5%; right: 5%; top: 50%; z-index: 3; border-radius: var(--radius-sm); overflow: hidden; background: linear-gradient(180deg, rgba(18, 46, 56, 0.82), rgba(10, 26, 34, 0.88)); color: #e9fbff; border: 1px solid rgba(143, 234, 255, 0.65); box-shadow: 0 0 0 1px rgba(143, 234, 255, 0.15), 0 0 28px rgba(143, 234, 255, 0.45), 0 0 90px rgba(143, 234, 255, 0.25), inset 0 0 40px rgba(143, 234, 255, 0.12), 0 50px 90px rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-shadow: 0 0 8px rgba(143, 234, 255, 0.55); opacity: 0; transform: translateY(-8%) translateZ(-120px) rotateX(78deg) scale(0.55); transform-origin: 50% 100%; pointer-events: none; transition: opacity .3s ease, transform .6s cubic-bezier(.16, 1.1, .3, 1.08); }
.peek-sm .holo { left: -12%; right: -12%; }
.holo::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(143, 234, 255, 0.1) 0 1px, transparent 1px 4px); mix-blend-mode: screen; }
.holo::after { content: ""; position: absolute; left: 0; right: 0; top: -40%; height: 40%; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, transparent, rgba(143, 234, 255, 0.22), transparent); animation: scan 2.6s linear infinite; }
@keyframes scan { to { transform: translateY(350%); } }
@keyframes flick { 0% { opacity: 0; } 12% { opacity: .85; } 18% { opacity: .25; } 26% { opacity: 1; } 34% { opacity: .6; } 42%, 100% { opacity: 1; } }
.peek:hover::before, .peek:focus-within::before { opacity: 1; transform: scaleX(1); }
.peek:hover::after, .peek:focus-within::after { opacity: 1; }
.peek:hover .art, .peek:focus-within .art { filter: blur(3px) brightness(0.45); transform: scale(0.97); }
.peek:hover .hint, .peek:focus-within .hint { opacity: 0; }
.peek:hover .holo, .peek:focus-within .holo { opacity: 1; pointer-events: auto; transform: translateY(-56%) translateZ(60px) rotateX(-5deg) scale(0.94); animation: flick .55s linear both; }
.holo-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: rgba(143, 234, 255, 0.1); border-bottom: 1px solid rgba(143, 234, 255, 0.35); }
.holo-bar .dots span { box-shadow: 0 0 8px currentColor; opacity: .9; }
.holo-url { margin-left: 8px; font: 500 12px var(--font-mono); color: var(--holo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holo-link { position: absolute; inset: 0; z-index: 4; }
.holo-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.peek-sm .holo-body { padding: 16px 18px 18px; gap: 10px; }
.holo-title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.peek-sm .holo-title { font-size: 16px; }
.holo-body ul { padding-left: 18px; font-size: 14px; line-height: 1.55; color: #cdeff7; }
.peek-sm .holo-body ul { font-size: 13px; line-height: 1.5; }
.holo-meta { font-family: var(--font-mono); font-size: 12px; color: var(--holo); }
.holo-go { position: relative; z-index: 5; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 40px; padding: 0 16px; border-radius: 4px; background: rgba(255, 217, 142, 0.12); border: 1px solid var(--gold); color: var(--gold); font: 600 14px var(--font-sans); text-shadow: 0 0 8px rgba(255, 217, 142, 0.6); box-shadow: 0 0 16px rgba(255, 217, 142, 0.35); transition: background .2s, box-shadow .2s; }
.holo-go:hover { background: rgba(255, 217, 142, 0.28); color: #fff; box-shadow: 0 0 26px rgba(255, 217, 142, 0.6); }
.peek-sm .holo-go { min-height: 36px; padding: 0 14px; font-size: 13px; }

/* 12. Experience tabs ------------------------------------------------------ */
.experience { padding-top: 72px; padding-bottom: 120px; }
.exp { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 56px; }
.exp-intro p { margin-top: 20px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.09); }
.tab { min-height: 44px; padding: 0 22px; border: 0; border-radius: 10px; background: none; color: var(--muted-2); font: 500 15px var(--font-sans); cursor: pointer; transition: background .2s, color .2s; }
.tab:hover { color: #fff; }
.tab[aria-selected="true"] { background: var(--gold); color: var(--gold-ink); }
.no-js .tabs { display: none; }
.no-js [role="tabpanel"][hidden] { display: block; }
.no-js [role="tabpanel"] + [role="tabpanel"] { margin-top: 32px; }
.row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row time, .row .when { font-family: var(--font-mono); font-size: 13px; color: var(--faint); }
.row:first-child .when { color: var(--gold); }
.row h3 { font-size: 19px; font-weight: 600; }
.row p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* 13. Certifications ------------------------------------------------------- */
.certs { margin-top: 80px; }
.cert-head { margin-bottom: 20px; }
.cert { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 104px; padding: 18px 20px 20px; margin-top: 14px; border-radius: 0 10px 10px 10px; background: linear-gradient(180deg, #222226, #1c1c1f); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); height: calc(100% - 14px); }
/* folder tab: a raised lip on the top-left with a slanted edge */
.cert::before { content: ""; position: absolute; left: -1px; top: -14px; width: 38%; height: 15px; background: #222226; border: 1px solid rgba(255, 255, 255, 0.12); border-bottom: 0; border-radius: 8px 0 0 0; }
.cert::after { content: ""; position: absolute; left: calc(38% - 2px); top: -14px; width: 20px; height: 15px; background: #222226; border-top: 1px solid rgba(255, 255, 255, 0.12); border-right: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0 6px 0 0; transform: skewX(38deg); transform-origin: 0 100%; }
.peek:hover .cert, .peek:focus-within .cert { border-color: rgba(255, 217, 142, 0.4); }
.peek-cert .hint { color: #e9e4da; border-color: rgba(255, 255, 255, 0.35); background: transparent; font-size: 11px; padding: 4px 9px; }
.cert strong { font-size: 16px; font-weight: 600; }
.certs .grid-4 { row-gap: 22px; }
.certs .grid-4 + .grid-4 { margin-top: 22px; }
.peek-cert .holo { left: -45%; right: -45%; }
.peek-cert:first-child .holo { left: 0; right: -90%; }
.peek-cert:last-child .holo { left: -90%; right: 0; }
.cert-img { padding: 12px; }
.cert-img img { width: 100%; height: auto; border-radius: 3px; opacity: .94; box-shadow: 0 0 24px rgba(143, 234, 255, 0.35); }

/* 14. Writing -------------------------------------------------------------- */
.writing { padding: 120px 0; background: var(--bg-deep); border-top: 1px solid rgba(255, 255, 255, 0.06); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.writing .section-head p { max-width: 400px; }
.wcard { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); min-height: 260px; height: 100%; }
.wcard strong { font-size: 22px; line-height: 1.3; font-weight: 600; }
.wcard span:nth-child(3) { font-size: 14px; line-height: 1.55; color: var(--muted); }
.wcard .link-gold { margin-top: auto; }
.training { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.training > span:first-child { font-family: var(--font-mono); font-size: 12px; color: var(--faint); margin-right: 6px; }

/* 15. Contact (contact + footer fill exactly one viewport) ----------------- */
.contact { min-height: calc(100vh - var(--footer-h)); min-height: calc(100svh - var(--footer-h)); display: flex; align-items: center; justify-content: center; padding: 64px var(--gutter); text-align: center; }
.contact-inner { max-width: 860px; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.contact .prompt { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.contact .h2 { font-size: 48px; }
.contact-inner > p { max-width: 520px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact-inner > .connect-hand { display: inline-flex; align-items: flex-start; gap: 8px; max-width: none; margin-top: -4px; font-family: var(--font-hand); font-size: 50px; line-height: 1.1; color: var(--gold); transform: rotate(-3deg); }
.contact-inner > .connect-hand svg { margin-top: 26px; flex: none; }
@media (max-width: 900px) { .contact-inner > .connect-hand { font-size: 38px; } }
.socials { display: flex; gap: 28px; font-size: 15px; }

/* 16. Footer --------------------------------------------------------------- */
.site-footer { position: relative; overflow: hidden; height: var(--footer-h); display: flex; flex-direction: column; justify-content: center; gap: 0; padding: 0 32px; background: #111112; color: var(--ink); border-top: 1px solid rgba(255, 217, 142, 0.18); }
.foot-top { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; }
.foot-logo { display: inline-flex; color: var(--gold); transition: transform .25s ease; }
.foot-logo:hover { color: var(--gold); transform: rotate(-4deg); }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: space-evenly; gap: 6px 24px; }
.foot-nav a { font-weight: 500; font-size: 13px; color: var(--ink); padding: 1px 0; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1.5px no-repeat; transition: background-size .25s ease, color .2s; }
.foot-nav a:hover { color: #fff; background-size: 100% 1.5px; }
.foot-tf { font-family: var(--font-mono); font-size: 11px; color: var(--faint); white-space: nowrap; }
.foot-tf strong { font-weight: 400; color: var(--gold); background: rgba(255, 217, 142, 0.08); padding: 2px 6px; border-radius: 4px; }
.foot-copy { position: relative; z-index: 1; text-align: center; font-size: 10.5px; line-height: 1.3; color: var(--faint); }
/* name as a watermark behind the content */
.foot-mark { position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center; font: 400 clamp(40px, 5vw, 92px)/1 var(--font-serif); letter-spacing: 0.02em; white-space: nowrap; color: rgba(255, 217, 142, 0.055); pointer-events: none; user-select: none; }

/* 17. Responsive ----------------------------------------------------------- */
/* Wheel size follows both width and height, so short laptop screens and 4K both fit */
@media (min-width: 1280px) { .scaler { transform: scale(1.5); } }
@media (min-width: 1600px) and (min-height: 900px) { .scaler { transform: scale(1.8); } }
@media (min-width: 2200px) and (min-height: 1200px) { .scaler { transform: scale(2.3); } }
@media (min-width: 901px) and (max-height: 860px) { .scaler { transform: scale(1.2); } }
@media (min-width: 901px) and (max-height: 760px) { .scaler { transform: scale(1.02); } .stage { top: 54%; } }
@media (min-width: 901px) and (max-width: 1100px) { .scaler { transform: scale(0.98); } .stage { left: 80%; } }
@media (min-width: 2200px) {
  .cta { min-height: 62px; padding: 0 34px; font-size: 23px; }
  .toplinks a { min-height: 56px; font-size: 20px; padding: 0 22px; }
  .toplinks a svg { width: 20px; height: 20px; }
  .logo svg { width: 76px; height: 88px; }
}
/* Large / 4K displays: scale type and layout up */
@media (min-width: 1800px) {
  :root { --wrap: 1440px; }
  .hero-name { font-size: clamp(100px, 5.86vw, 160px); }
  .hero-tag { font-size: clamp(22px, 1.25vw, 32px); }
  .photo { width: clamp(170px, 9.5vw, 250px); height: clamp(170px, 9.5vw, 250px); }
  .h2 { font-size: 68px; }
  .topbar { padding: 32px 48px; }
  .cta { min-height: 54px; padding: 0 28px; font-size: 19px; }
  .toplinks a { min-height: 48px; font-size: 17px; padding: 0 18px; }
  .logo svg { width: 62px; height: 72px; }
  .track li { font-size: clamp(38px, 2vw, 52px); }
  .arrow svg { width: 190px; height: 109px; }
  .arrow span { font-size: 38px; }
}
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .peek-cert .holo, .peek-cert:first-child .holo, .peek-cert:last-child .holo { left: -25%; right: -25%; }
}
@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .hero { height: auto; min-height: 0; padding-bottom: 110px; }
  .hero-text { position: relative; left: auto; top: auto; transform: none; max-width: none; padding: 156px 16px 0; }
  .stage { position: relative; left: 50%; top: 260px; height: 540px; }
  .scaler { transform: scale(0.78); }
  .topbar { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: 18px 16px; row-gap: 14px; }
  .cta { justify-self: center; font-size: 15px; padding: 0 18px; min-height: 44px; }
  .toplinks { grid-column: 1 / -1; justify-content: center; gap: 24px; }
  .toplinks a { font-size: 15px; padding: 0 12px; }
  .toplinks { gap: 8px; }
  .h2 { font-size: 38px; }
  .contact .h2 { font-size: 34px; }
  .split, .grid-3, .exp { grid-template-columns: minmax(0, 1fr); }
  .split { padding: 24px; gap: 24px; }
  .exp { gap: 24px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .track { gap: 48px; }
  .me { display: block; }
  .about { position: static; display: none; flex-direction: column; width: auto; padding: 16px 0 0; }
  .me:focus-within .about, .me.is-open .about { display: flex; }
  .about .acard { width: 100%; min-height: 0; opacity: 1; transform: none !important; }
  .arrow { left: 100px; top: 4px; }
  .arrow svg { width: 110px; height: 63px; }
  .a-gold .quote { font-size: 30px; }
  .arrow span { font-size: 24px; }
  :root { --footer-h: 100px; }
  .site-footer { padding: 0 16px; }
  .foot-top { grid-template-columns: auto auto; justify-content: space-between; row-gap: 8px; }
  .foot-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .foot-tf { font-size: 11px; }
  .foot-mark { font-size: 14vw; letter-spacing: 0; }
  .foot-logo svg { width: 30px; height: 35px; }
  .work { padding-top: 64px; }
  .project h3 { font-size: 26px; }
  .writing { padding: 80px 0; }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .peek-cert .holo, .peek-cert:first-child .holo, .peek-cert:last-child .holo { left: 0; right: 0; }
}

/* 18. Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring, .track, .holo, .holo::after { animation: none !important; }
  .acard, .holo, .art, .photo { transition: none !important; }
}
