/* =========================================================
   ZERO SUS — Portfolio
   Minimal · Premium · Futuristic
   Palette: black / white / dark gray / subtle red accent
   ========================================================= */

:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --surface: rgba(255, 255, 255, 0.02);
  --surface-2: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #6b6b73;
  /* monochrome accent — matches the old black & white site */
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.12);

  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1160px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Enter gate — liquid / crystal glass ---------- */
.enter {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; text-align: center;
  padding: 24px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 30%, #0b0b0d, #000 78%);
  transition: opacity .7s var(--ease), visibility .7s var(--ease);
}
.enter.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* Coloured light orbs drifting behind the glass — the "liquid" light source */
.enter__orbs { position: absolute; inset: -10%; z-index: 0; pointer-events: none; filter: blur(60px); }
.enter__orbs span { position: absolute; width: 46vmin; height: 46vmin; border-radius: 50%; mix-blend-mode: screen; opacity: .55; }
.enter__orbs span:nth-child(1) { left: 8%;  top: 14%; background: radial-gradient(circle, rgba(255,255,255,.9), transparent 66%); animation: orbFloat 16s ease-in-out infinite alternate; }
.enter__orbs span:nth-child(2) { right: 6%; top: 30%; background: radial-gradient(circle, rgba(200,200,200,.7), transparent 66%); animation: orbFloat 22s ease-in-out infinite alternate-reverse; }
.enter__orbs span:nth-child(3) { left: 34%; bottom: 8%; background: radial-gradient(circle, rgba(255,255,255,.6), transparent 66%); animation: orbFloat 19s ease-in-out infinite alternate; }
@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vmin, -5vmin) scale(1.18); }
  100% { transform: translate(-5vmin, 4vmin) scale(1); }
}

/* The frosted glass panel */
.enter__glass {
  position: relative; z-index: 1; overflow: hidden;
  padding: clamp(34px, 7vw, 64px) clamp(30px, 8vw, 78px);
  border-radius: 30px;
  background: linear-gradient(150deg, rgba(255,255,255,.16), rgba(255,255,255,.04) 42%, rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow:
    0 30px 80px rgba(0,0,0,.55),
    inset 0 1px 1px rgba(255,255,255,.55),
    inset 0 -1px 1px rgba(255,255,255,.08),
    inset 0 0 40px rgba(255,255,255,.05);
  animation: fade .9s var(--ease) both, glassRise 1s var(--ease) both;
}
@keyframes glassRise { from { transform: translateY(16px) scale(.98); } to { transform: none; } }

/* A slow specular sheen sweeping across the glass */
.enter__sheen {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit; overflow: hidden;
}
.enter__sheen::before {
  content: ""; position: absolute; top: -60%; left: -30%; width: 55%; height: 220%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
  transform: rotate(18deg); filter: blur(8px);
  animation: sheenSweep 6.5s var(--ease) infinite;
}
@keyframes sheenSweep {
  0%   { left: -40%; opacity: 0; }
  35%  { opacity: 1; }
  70%  { left: 120%; opacity: 0; }
  100% { left: 120%; opacity: 0; }
}

.enter__inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.enter__mark {
  font-family: var(--mono); font-weight: 700; letter-spacing: .06em;
  font-size: 13px; color: rgba(255,255,255,.75);
  border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 6px 10px; margin-bottom: 18px;
  background: rgba(255,255,255,.06);
}
.enter__title {
  font-size: clamp(2.4rem, 12vw, 5.5rem); font-weight: 700; letter-spacing: -.03em; line-height: 1;
  background: linear-gradient(180deg, #fff 24%, #d0d0d0 78%, #8f8f8f 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 30px; text-shadow: 0 2px 30px rgba(255,255,255,.12);
}
.enter__hint {
  margin-top: 15px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.55);
}

/* ---------- Reusable liquid-glass button ---------- */
.glass-btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font); font-size: 15px; font-weight: 600; letter-spacing: .01em;
  color: #fff; cursor: pointer;
  padding: 15px 30px; border-radius: 999px;
  background: linear-gradient(160deg, rgba(255,255,255,.28), rgba(255,255,255,.08) 55%, rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.32);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow:
    0 8px 30px rgba(0,0,0,.35),
    inset 0 1px 1px rgba(255,255,255,.7),
    inset 0 -2px 6px rgba(255,255,255,.08);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.glass-btn svg { position: relative; z-index: 2; }
.glass-btn span:not(.glass-btn__shine) { position: relative; z-index: 2; }
.glass-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.5);
  box-shadow: 0 14px 44px rgba(255,255,255,.28), inset 0 1px 1px rgba(255,255,255,.8), inset 0 -2px 6px rgba(255,255,255,.12);
}
.glass-btn:active { transform: translateY(0) scale(.98); }
/* Moving specular light streaking across the button */
.glass-btn__shine {
  position: absolute; top: 0; left: -30%; z-index: 1; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent);
  transform: skewX(-18deg); pointer-events: none;
  animation: btnShine 3.8s var(--ease) infinite;
}
@keyframes btnShine {
  0%   { left: -40%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .enter__orbs span, .enter__sheen::before, .glass-btn__shine { animation: none !important; }
}

/* ---------- Ambient background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: .5;
}
.bg-glow {
  position: fixed; inset: 0; z-index: -4; pointer-events: none;
  background:
    radial-gradient(600px 400px at 50% -5%, rgba(255,255,255,.07), transparent 70%),
    radial-gradient(800px 600px at 80% 10%, rgba(255,255,255,.04), transparent 70%);
}
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: -2; pointer-events: none;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.09), transparent 62%);
  transform: translate(-50%, -50%);
  transition: opacity .4s var(--ease);
  opacity: 0;
}
@media (hover: none) { .cursor-glow { display: none; } }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,.35));
  z-index: 100; transition: width .1s linear;
}

/* ---------- Buttons ---------- */
.btn {
  --gap: 10px;
  display: inline-flex; align-items: center; gap: var(--gap);
  font-size: 14px; font-weight: 500; letter-spacing: .01em;
  padding: 12px 20px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  will-change: transform;
}
.btn svg { transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--solid { background: var(--text); color: #000; }
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(255,255,255,.12); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); box-shadow: 0 0 30px var(--accent-soft); }
.btn--lg { padding: 16px 28px; font-size: 16px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px var(--pad);
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5,5,6,.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .04em; }
.nav__mark {
  display: grid; place-items: center; width: 30px; height: 30px;
  font-family: var(--mono); font-size: 13px; color: #fff;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface-2);
}
.nav__name { font-size: 14px; }
.nav__links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav__links a { position: relative; transition: color .25s var(--ease); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--accent); transition: width .3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }
.nav__cta { padding: 9px 18px; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }

/* ---------- Hero (big centered) ---------- */
.hero {
  min-height: 100vh; display: grid; place-items: center; text-align: center;
  padding: 120px var(--pad) 96px; position: relative; overflow: hidden; isolation: isolate;
}
/* drifting smoke gradient behind the wordmark */
.hero::before {
  content: ""; position: absolute; inset: -20% -12%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(42% 40% at 50% 48%, rgba(255,255,255,.11), transparent 70%),
    radial-gradient(34% 30% at 30% 56%, rgba(255,255,255,.06), transparent 72%),
    radial-gradient(38% 32% at 72% 42%, rgba(255,255,255,.05), transparent 72%);
  filter: blur(30px); animation: outroDrift 18s ease-in-out infinite alternate;
}
/* flowing white "air" waves behind the hero */
.hero__waves {
  position: absolute; inset: -30% -20% auto -20%; height: 130%; z-index: -2;
  pointer-events: none; overflow: hidden; opacity: .9;
  mask-image: radial-gradient(75% 70% at 50% 30%, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(75% 70% at 50% 30%, #000 40%, transparent 85%);
}
.hero__waves span {
  position: absolute; left: 50%; top: 40%; width: 130vw; height: 130vw;
  border-radius: 45% 55% 52% 48% / 50% 48% 52% 50%;
  transform: translate(-50%, -50%);
  filter: blur(50px); mix-blend-mode: screen;
}
.hero__waves span:nth-child(1) {
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.16), transparent 62%);
  animation: waveDrift 20s ease-in-out infinite alternate;
}
.hero__waves span:nth-child(2) {
  width: 100vw; height: 100vw; top: 32%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.12), transparent 60%);
  animation: waveDrift 26s ease-in-out infinite alternate-reverse;
}
.hero__waves span:nth-child(3) {
  width: 80vw; height: 80vw; top: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.10), transparent 58%);
  animation: waveDrift 32s ease-in-out infinite alternate;
}
@keyframes waveDrift {
  0%   { transform: translate(-58%, -52%) rotate(0deg)   scale(1); }
  50%  { transform: translate(-44%, -46%) rotate(180deg) scale(1.15); }
  100% { transform: translate(-56%, -54%) rotate(360deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__waves span { animation: none !important; }
}

.hero__center { display: flex; flex-direction: column; align-items: center; max-width: 100%; width: 100%; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px; align-self: center;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.hero__eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero__mega {
  font-size: clamp(2.6rem, 15.5vw, 13rem); line-height: .9; font-weight: 700; letter-spacing: -.045em;
  margin: 24px 0 0; width: 100%; white-space: nowrap;
  background: linear-gradient(180deg, #fff 28%, #7a7a7a 118%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__role {
  font-size: clamp(1.5rem, 5.5vw, 3.4rem); font-weight: 600; letter-spacing: -.025em;
  color: var(--text); margin-top: 6px; line-height: 1.05;
}
.hero__sub { font-family: var(--mono); font-size: clamp(.82rem, 2vw, 1rem); color: var(--muted); margin-top: 20px; letter-spacing: .01em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; justify-content: center; }

/* ---------- GitHub live stats strip ---------- */
.ghstats { max-width: var(--max); margin: 0 auto; padding: 8px var(--pad); text-align: center; }
.hero__stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(28px, 6vw, 72px);
  padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center;
}
.hero__stats dt { font-size: 13px; color: var(--faint); font-family: var(--mono); }
.hero__stats dd { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero__live { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-family: var(--mono); font-size: 12px; color: var(--faint); opacity: .5; transition: opacity .5s var(--ease); }
.hero__live.is-live { opacity: 1; }
.hero__live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.hero__live.is-live .dot { background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.7); animation: pulse 2s infinite; }
.hero__live a { color: var(--muted); transition: color .25s var(--ease); }
.hero__live a:hover { color: var(--accent); }

.hero__scroll {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .2em; text-transform: uppercase;
}
.hero__scroll-line { width: 1px; height: 44px; background: linear-gradient(var(--faint), transparent); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--accent); animation: scrolldot 2s var(--ease) infinite; }
@keyframes scrolldot { to { top: 100%; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 20px 0; margin: 40px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; gap: 28px; width: max-content; animation: marquee 26s linear infinite; }
.marquee__track span { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 500; color: var(--faint); letter-spacing: -.01em; }
.marquee__track span:nth-child(3n+1) { color: var(--muted); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(70px, 12vh, 130px) var(--pad); }
.section__head { margin-bottom: 56px; }
.section__index { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.section__title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 600; letter-spacing: -.03em; margin: 8px 0 12px; }
.section__sub { color: var(--muted); max-width: 460px; }

/* ---------- Work cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  position: relative; grid-column: span 1;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 260px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
  transform-style: preserve-3d;
}
.card--wide { grid-column: span 2; }
.card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.card__glow {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
  left: var(--mx, 50%); top: var(--my, 50%); transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .35s var(--ease); pointer-events: none;
}
.card:hover .card__glow { opacity: 1; }
.card__body { position: relative; z-index: 1; }
.card__tag { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.card__title { font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 600; letter-spacing: -.02em; margin: 12px 0 10px; }
.card__desc { color: var(--muted); max-width: 46ch; font-size: .96rem; }
.card__stack { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.card__stack li { font-family: var(--mono); font-size: 11.5px; color: var(--faint); padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; }
.card__meta { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 13px; color: var(--faint); }
.card__arrow { font-size: 20px; transition: transform .35s var(--ease), color .35s var(--ease); }
.card:hover .card__arrow { transform: translate(4px, -4px); color: var(--accent); }
.cards__more { margin-top: 28px; font-family: var(--mono); font-size: 14px; }
.cards__more a { color: var(--muted); transition: color .25s var(--ease); }
.cards__more a:hover { color: var(--accent); }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .4s var(--ease), border-color .4s var(--ease); }
.skill:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.skill__icon { font-size: 26px; color: var(--accent); margin-bottom: 16px; }
.skill h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.skill p { color: var(--muted); font-size: .94rem; margin-bottom: 20px; }
.skill__bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.skill__bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #fff, rgba(255,255,255,.45)); transition: width 1.1s var(--ease); }
.skill.is-visible .skill__bar i { width: var(--v); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--line-strong), transparent); }
.timeline__item { position: relative; padding: 0 0 48px 24px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__node { position: absolute; left: -28px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); transition: border-color .4s var(--ease), box-shadow .4s var(--ease); }
.timeline__item:hover .timeline__node { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline__year { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.timeline__item h3 { font-size: 1.25rem; font-weight: 600; margin: 6px 0 8px; letter-spacing: -.01em; }
.timeline__item p { color: var(--muted); max-width: 52ch; font-size: .95rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact__inner { max-width: 640px; margin: 0 auto; }
.contact__title { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.04; margin: 14px 0 18px; }
.contact__title .accent { background: linear-gradient(120deg, #fff, #7a7a7a 130%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact__sub { color: var(--muted); margin-bottom: 34px; }
.contact__socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 42px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.contact__socials a { position: relative; transition: color .25s var(--ease); }
.contact__socials a:hover { color: var(--accent); }

/* ---------- Blog ---------- */
.blog { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.blog__state { color: var(--muted); font-family: var(--mono); font-size: 14px; grid-column: 1 / -1; }
.post {
  display: flex; flex-direction: column; gap: 12px; padding: 26px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  cursor: pointer; transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
}
.post:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--surface-2); }
.post:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.post__top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; }
.post__date { color: var(--faint); }
.post__tags { color: var(--accent); }
.post__title { font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; }
.post__excerpt { color: var(--muted); font-size: .95rem; flex: 1; }
.post__read { font-family: var(--mono); font-size: 13px; color: var(--text); transition: color .25s var(--ease); }
.post:hover .post__read { color: var(--accent); }

/* ---------- Reader modal ---------- */
.reader { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.reader[hidden] { display: none; }
.reader__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); animation: fade .3s var(--ease); }
.reader__panel {
  position: relative; width: min(760px, 100%); max-height: 88vh; overflow: auto;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 20px;
  padding: clamp(28px, 5vw, 52px); animation: pop .35s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.reader__close { position: sticky; top: 0; float: right; margin: -8px -8px 0 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 15px; transition: border-color .25s var(--ease), color .25s var(--ease); }
.reader__close:hover { border-color: var(--accent); color: var(--accent); }
.reader__tag { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-bottom: 12px; }
.reader__title { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 24px; }
.reader__body { color: var(--muted); line-height: 1.75; }
.reader__body h1, .reader__body h2, .reader__body h3 { color: var(--text); line-height: 1.25; margin: 1.4em 0 .5em; letter-spacing: -.02em; }
.reader__body h1 { font-size: 1.6rem; } .reader__body h2 { font-size: 1.35rem; } .reader__body h3 { font-size: 1.15rem; }
.reader__body p { margin: 1em 0; }
.reader__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.reader__body code { font-family: var(--mono); font-size: .85em; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; color: var(--text); }
.reader__body pre { background: #000; border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow: auto; margin: 1.2em 0; }
.reader__body pre code { background: none; padding: 0; }
.reader__body blockquote { border-left: 2px solid var(--accent); padding-left: 16px; margin: 1.2em 0; color: var(--text); }
.reader__body ul, .reader__body ol { margin: 1em 0 1em 22px; }
.reader__body li { margin: .4em 0; }
.reader__body hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.reader__body img { border-radius: 12px; margin: 1.2em 0; }

/* ---------- Big outro ---------- */
.outro {
  min-height: 92vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 80px var(--pad) 60px; position: relative; overflow: hidden;
  isolation: isolate;
}
/* soft, drifting smoke-like gradient behind the big ZERO SUS */
.outro::before {
  content: ""; position: absolute; inset: -25% -15%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(45% 42% at 50% 55%, rgba(255,255,255,.13), transparent 70%),
    radial-gradient(38% 34% at 28% 42%, rgba(255,255,255,.08), transparent 72%),
    radial-gradient(42% 36% at 74% 62%, rgba(255,255,255,.07), transparent 72%);
  filter: blur(28px);
  animation: outroDrift 16s ease-in-out infinite alternate;
}
/* faint radial vignette to seat the section on pure black */
.outro::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 50%, transparent 40%, rgba(0,0,0,.6) 100%);
}
@keyframes outroDrift {
  from { transform: translate3d(-3%, 1%, 0) scale(1); }
  to   { transform: translate3d(3%, -4%, 0) scale(1.1); }
}
.outro__date { font-family: var(--mono); font-size: clamp(12px, 1.6vw, 15px); color: var(--muted); letter-spacing: .04em; margin-bottom: clamp(24px, 5vh, 48px); }
.outro__title {
  font-size: clamp(3.2rem, 19vw, 17rem); line-height: .9; font-weight: 700; letter-spacing: -.04em;
  background: linear-gradient(180deg, #fff 25%, #6b6b73 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 0; width: 100%;
}
.outro__badge {
  display: inline-flex; align-items: center; gap: 9px; margin-top: clamp(24px, 5vh, 44px);
  font-family: var(--mono); font-size: 13px; color: var(--text);
  padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); backdrop-filter: blur(8px);
}
.outro__badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.7); animation: pulse 2s infinite; }
.outro__role { font-size: clamp(1.1rem, 2.4vw, 1.6rem); color: var(--muted); margin-top: 20px; letter-spacing: -.01em; }
.outro__cta { margin-top: 30px; padding: 13px 34px; }
.outro__socials { display: flex; gap: 16px; margin-top: 40px; }
.outro__socials a {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--muted); background: var(--surface);
  transition: color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.outro__socials a:hover { color: #fff; border-color: #fff; transform: translateY(-3px); box-shadow: 0 0 24px rgba(255,255,255,.14); }

@media (max-width: 640px) {
  .outro { min-height: 70vh; }
}

/* ---------- Footer ---------- */
.footer { max-width: var(--max); margin: 0 auto; padding: 40px var(--pad) 48px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--faint); }
.footer__main { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer__center { color: var(--muted); }
.footer__email { transition: color .25s var(--ease); }
.footer__email:hover { color: #fff; }
.footer__sub { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 22px; opacity: .55; }
.footer__admin, .footer__top { transition: color .25s var(--ease); }
.footer__admin:hover, .footer__top:hover { color: #fff; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Responsive — tiered breakpoints
   1024: tablets landscape · 820: tablets/large phones
   640: phones · 480: small phones
   ========================================================= */

/* ---- Tablets / small laptops ---- */
@media (max-width: 1024px) {
  .cards { gap: 16px; }
}

/* ---- Tablets & large phones ---- */
@media (max-width: 820px) {
  /* Collapse desktop nav into the hamburger menu */
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav__links.is-open {
    display: flex; flex-direction: column; gap: 22px;
    position: fixed; inset: 0; z-index: 40;
    align-items: center; justify-content: center;
    background: rgba(5,5,6,.96);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    font-size: 1.4rem; color: var(--text);
  }
  .nav__toggle { z-index: 60; }
  .nav__toggle.is-open span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav__toggle.is-open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  /* One-column grids */
  .cards, .skills, .blog { grid-template-columns: 1fr; }
  .card--wide { grid-column: span 1; }

  /* Tighten vertical rhythm so sections don't float far apart */
  .section { padding: clamp(52px, 8vh, 84px) var(--pad); }
  .section__head { margin-bottom: 38px; }
  .marquee { margin: 28px 0; padding: 16px 0; }
  .outro { min-height: auto; padding: 72px var(--pad) 56px; }
}

/* ---- Phones ---- */
@media (max-width: 640px) {
  .nav { padding: 12px var(--pad); }

  /* Compact section spacing on phones — no big empty gaps between pages */
  .section { padding: 46px var(--pad); }
  .section__head { margin-bottom: 30px; }
  .marquee { margin: 20px 0; padding: 14px 0; }
  .contact__sub { margin-bottom: 26px; }
  .outro { padding: 56px var(--pad) 44px; }

  .hero { padding: 104px var(--pad) 72px; min-height: auto; }
  /* Let the hero actions stack and go full-width so taps are easy */
  .hero__actions { width: 100%; flex-direction: column; gap: 12px; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__scroll { display: none; }

  /* Keep the airy waves softer + centered on small screens so text stays crisp */
  .hero__waves { opacity: .7; }
  .hero__waves span { width: 150vw; height: 150vw; filter: blur(38px); }
  .hero__waves span:nth-child(2) { width: 120vw; height: 120vw; }
  .hero__waves span:nth-child(3) { width: 95vw; height: 95vw; }

  .ghstats { padding: 8px var(--pad); }
  .hero__stats { gap: 24px 40px; padding: 26px 0; }

  .card { min-height: 0; padding: 22px; gap: 24px; }
  .skill { padding: 24px; }

  .contact__socials { gap: 16px; }
  .outro__socials { gap: 12px; }
  .outro__socials a { width: 44px; height: 44px; }

  .footer__main { flex-direction: column; text-align: center; gap: 8px; }
}

/* ---- Small phones ---- */
@media (max-width: 480px) {
  :root { --pad: 18px; }

  .section { padding: 40px var(--pad); }
  .section__head { margin-bottom: 26px; }
  .timeline__item { padding-bottom: 34px; }

  .hero__actions { margin-top: 28px; }
  .btn { padding: 12px 18px; }
  .btn--lg { padding: 14px 22px; font-size: 15px; }

  .hero__stats { gap: 18px 28px; }
  .hero__stats dt { font-size: 12px; }

  .timeline { padding-left: 22px; }
  .timeline__item { padding-left: 20px; }

  .reader { padding: 14px; }
  .reader__panel { max-height: 92vh; }
}

/* Guarantee the reveal animation never leaves content stuck hidden
   on browsers without IntersectionObserver support */
@media (max-width: 820px) {
  .reveal { transition-duration: .5s; }
}
