/* ───────────────────────────────────────────────────────────────
   wyp v2 — amber phosphor
   IBM Plex Mono (structure) · Newsreader italic (the human bits)
   ─────────────────────────────────────────────────────────────── */

:root {
  --bg: #0c0a07;
  --bg-2: #110e09;
  --surface: #171310;
  --line: #292218;
  --line-soft: #1d1812;
  --ink: #ede5d4;
  --muted: #8f8571;
  --faint: #55503f;
  /* accent — change these three to retheme the whole site */
  --accent: #9cbf8a;
  --accent-deep: #6b8c58;
  --accent-rgb: 156, 191, 138; /* same as --accent, for translucent glows */
  /* aliases used throughout the codebase */
  --amber: var(--accent);
  --amber-deep: var(--accent-deep);
  --amber-glow: rgba(var(--accent-rgb), 0.16);
  --olive: #b8cc8a;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --serif: "Newsreader", Georgia, serif;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --container: 1400px; /* shared max content width — keeps every section aligned */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: var(--bg); }

a { color: inherit; text-decoration: none; }

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
}

/* ── atmosphere ─────────────────────────────────────────────── */

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 12px var(--amber-glow);
}

/* ── nav ────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.1rem var(--pad);
  background: linear-gradient(rgba(12, 10, 7, 0.92), rgba(12, 10, 7, 0.65) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(#000 75%, transparent);
  -webkit-mask-image: linear-gradient(#000 75%, transparent);
}
/* full-bleed bar, content aligned to the shared container */
.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav-logo em {
  font-family: var(--mono);
  font-style: normal;
  animation: blink 1.1s steps(1) infinite;
}
.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

.nav-links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: 13px;
}
.nav-links a {
  color: var(--muted);
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links sup {
  color: var(--faint);
  font-size: 9px;
  margin-right: 0.3em;
}
.nav-links .nav-cta { color: var(--amber); }
.nav-links .nav-cta:hover { color: var(--ink); }

/* ── hero ───────────────────────────────────────────────────── */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem var(--pad) 4rem;
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 70% 10%, rgba(var(--accent-rgb), 0.06), transparent),
    var(--bg);
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: clamp(2rem, 5vh, 4rem);
  font-size: 13px;
}
.prompt { color: var(--amber); }
.hero-loc { color: var(--faint); font-size: 11px; letter-spacing: 0.08em; }

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 2px;
  background: var(--amber);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-title {
  font-size: clamp(2.6rem, 8.5vw, 7.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.hero-title .line { display: block; }
.hero-title em {
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: none;
  font-size: 1.04em;
}
.amber { color: var(--amber); }

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-top: clamp(2.5rem, 6vh, 5rem);
}
.hero-desc {
  max-width: 46ch;
  color: var(--muted);
  font-size: 14px;
}
.hero-desc a {
  color: var(--ink);
  border-bottom: 1px solid var(--amber-deep);
  transition: color 0.25s, border-color 0.25s;
}
.hero-desc a:hover { color: var(--amber); border-color: var(--amber); }

.hero-scroll {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.25s;
}
.hero-scroll:hover { color: var(--amber); }
.hero-scroll svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ── marquee ────────────────────────────────────────────────── */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1rem 0;
  background: var(--bg-2);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: scroll-x 22s linear infinite;
}
.marquee-track span {
  white-space: nowrap;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  padding-right: 0.5ch;
}
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}

/* ── work: sticky stack ─────────────────────────────────────── */

.work { position: relative; }

.panel {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-top: 1px solid var(--line);
  overflow: hidden;
  will-change: transform;
}
.panel:nth-child(even) { background: var(--bg-2); }

.panel-shade {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.panel-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  position: relative;
}

.panel-index {
  position: absolute;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(12rem, 32vw, 26rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.panel-text { position: relative; z-index: 1; }
.panel-visual { position: relative; z-index: 1; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.6rem;
  font-size: 12px;
}
.panel-no { color: var(--faint); letter-spacing: 0.12em; }
.badge {
  color: var(--amber);
  border: 1px solid var(--amber-deep);
  border-radius: 99px;
  padding: 0.15rem 0.7rem;
  font-size: 11px;
  letter-spacing: 0.05em;
}
.badge-alt { color: var(--olive); border-color: #5a6244; }
.badge-dim { color: var(--muted); border-color: var(--line); } /* sunset projects */

.panel-title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  /* SplitText: avoid kerning shift when splitting into chars */
  font-kerning: none;
  text-rendering: optimizeSpeed;
}

.panel-tag-line {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--amber);
  margin-bottom: 1.1rem;
}

.panel-desc {
  color: var(--muted);
  max-width: 44ch;
  margin-bottom: 1.6rem;
  font-size: 14px;
}

.panel-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.panel-tags li {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
}

.panel-links { display: flex; gap: 1.6rem; }
.panel-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--amber-deep);
  padding-bottom: 0.2rem;
  transition: color 0.25s, border-color 0.25s;
}
.panel-links a:hover { color: var(--amber); border-color: var(--amber); }

/* ── terminal / browser mock ────────────────────────────────── */

.term {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(var(--accent-rgb), 0.04),
    0 0 60px -20px var(--amber-glow);
  position: relative;
}
.term::after {
  /* CRT scanlines */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    transparent 0 2px,
    rgba(0, 0, 0, 0.14) 2px 3px
  );
  opacity: 0.5;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
}
.term-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.term-bar i:first-child { background: var(--amber-deep); }
.term-bar span {
  margin-left: 0.6rem;
  font-size: 11px;
  color: var(--faint);
}

.term-body {
  padding: 1.4rem 1.5rem;
  font-size: clamp(11px, 1.1vw, 13.5px);
  line-height: 1.9;
  white-space: nowrap;
  overflow: hidden;
}

/* syntax — warm CRT */
.k  { color: var(--amber); }
.s  { color: var(--olive); }
.f  { color: #e8c995; }
.c  { color: var(--faint); }
.ok { color: var(--olive); }

/* kanban mock (whipped) */
.kanban {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.8rem;
  white-space: normal;
}
.kcol b {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.kcard {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.kcard.live {
  border-color: var(--amber-deep);
  color: var(--ink);
  box-shadow: 0 0 18px -6px var(--amber-glow);
}
.kcard .ok { display: block; font-size: 10px; margin-top: 0.25rem; }

/* website mock (stayora / extension) */
.site { white-space: normal; }
.site-hero {
  height: 56px;
  border-radius: 6px;
  background: linear-gradient(120deg, var(--bg-2), var(--line-soft));
  border: 1px solid var(--line-soft);
  margin-bottom: 0.8rem;
}
.site-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.site-card {
  height: 64px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  position: relative;
}
.site-card.picked {
  border: 1px dashed var(--amber);
  box-shadow: 0 0 20px -6px var(--amber-glow);
}
.pick-tip {
  position: absolute;
  top: -2.1rem;
  left: 0;
  white-space: nowrap;
  font-size: 10px;
  color: var(--bg);
  background: var(--amber);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-weight: 600;
}
.site-cta {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--bg);
  background: var(--amber);
  border-radius: 4px;
  padding: 0.35rem 0.8rem;
}
.site-cta.c {
  background: transparent;
  color: var(--olive);
  border: 1px solid var(--line);
}

/* ── about ──────────────────────────────────────────────────── */

.about {
  position: relative;
  z-index: 2; /* rides over the last sticky panel */
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: clamp(5rem, 12vh, 9rem) var(--pad);
}

.sect-label {
  display: block;
  color: var(--amber);
  font-size: 13px;
  margin-bottom: 2.2rem;
}

.about-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.about-inner .sect-label { grid-column: 1 / -1; margin-bottom: 0; }

.about-title {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.about-title em { text-transform: none; }

.about-desc {
  color: var(--muted);
  font-size: 14px;
  max-width: 58ch;
  margin-bottom: 2rem;
}

.philo .c { display: block; margin-bottom: 0.5rem; }
.philo p { color: var(--ink); font-size: 14px; padding: 0.15rem 0; }

/* ── blog ───────────────────────────────────────────────────── */

.blog {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding: 0 var(--pad) clamp(4rem, 10vh, 7rem);
}
.blog .sect-label,
.blog-post { max-width: 1280px; margin-left: auto; margin-right: auto; }

.blog-post {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s, border-color 0.3s;
}
.blog-post:hover { padding-left: 1rem; border-color: var(--amber-deep); }
.blog-date { color: var(--faint); font-size: 12px; white-space: nowrap; }
.blog-title { font-weight: 600; flex: 1; }
.blog-read { color: var(--amber); font-size: 12px; white-space: nowrap; }

/* ── contact ────────────────────────────────────────────────── */

.contact {
  position: relative;
  z-index: 2;
  background:
    radial-gradient(ellipse 70% 60% at 50% 110%, rgba(var(--accent-rgb), 0.08), transparent),
    var(--bg-2);
  border-top: 1px solid var(--line);
  min-height: 90svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(5rem, 14vh, 10rem) var(--pad);
}
.contact .sect-label { margin-bottom: 1.5rem; }

.contact-title {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-transform: uppercase;
  overflow: hidden; /* masks the line rise */
  margin-bottom: 1.6rem;
}
.contact-title span { display: block; }
.contact-title em { text-transform: none; }

.contact-desc {
  color: var(--muted);
  font-size: 14px;
  max-width: 52ch;
  margin-bottom: 2.6rem;
}

.contact-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}
.btn {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s;
}
.btn:hover {
  color: var(--ink);
  border-color: var(--muted);
  transform: translateY(-2px);
}
.btn-accent {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg);
}
.btn-accent:hover {
  /* keep the amber fill — just lift and add a soft glow */
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg);
  box-shadow: 0 8px 30px -8px var(--amber-glow);
}

/* ── footer ─────────────────────────────────────────────────── */

.footer {
  position: relative;
  z-index: 2;
  background: var(--bg-2);
  padding: 1.4rem var(--pad);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--faint);
}
/* full-bleed bar, content aligned to the shared container */
.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a { color: var(--muted); transition: color 0.25s; }
.footer-links a:hover { color: var(--amber); }

/* ── responsive ─────────────────────────────────────────────── */

@media (max-width: 920px) {
  .panel-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 5.5rem var(--pad) 4rem;
    align-content: center;
  }
  .panel-index {
    right: auto;
    left: var(--pad);
    top: 3.2rem;
    transform: none;
    font-size: clamp(7rem, 24vw, 11rem);
  }
  .panel { align-items: stretch; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .about-inner { grid-template-columns: 1fr; }
  .blog-post { flex-wrap: wrap; gap: 0.4rem 1.5rem; }
  .blog-title { flex-basis: 100%; order: 3; }
}

@media (max-width: 560px) {
  .nav-links sup { display: none; }
  .hero-loc { display: none; }
  .term-body { font-size: 10px; padding: 1rem; }
  .kanban, .site-row { grid-template-columns: 1fr 1fr; }
  .kcol:last-child { display: none; }
  .site-card:last-child { display: none; }
  .pick-tip { font-size: 9px; }

  /* phones: let full-height sections grow to fit their content instead of
     cramming everything into one screen. dropping the 100svh floor +
     centering is what relieves the overflow. */
  .hero {
    min-height: auto;
    justify-content: flex-start;
    padding: 5.5rem var(--pad) 3rem;
  }
  /* the sticky-stack is desktop choreography; on phones panels just flow */
  .panel {
    position: relative;
    min-height: auto;
    overflow: visible;
  }
  .contact {
    min-height: auto;
    padding: clamp(3.5rem, 12vh, 6rem) var(--pad);
  }
}

/* ── reduced motion ─────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .hero-scroll svg { animation: none; }
  .cursor, .nav-logo em { animation: none; }
}
