/* ═══════════════════════════════════════════════════════════════
   AUKEUS
   1 tokens   2 base   3 nav   4 hero (wordmark + line)   5 sections
   6 cards    7 about  8 contact + footer   9 responsive/motion
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. TOKENS ─────────────────────────────────────────────────── */
:root {
  --bg:        #000;
  --fg:        #fff;
  --text:      #b4b4b4;
  --muted:     #6e6e6e;
  --line:      rgba(255, 255, 255, 0.12);
  --line-hot:  rgba(255, 255, 255, 0.38);
  --panel:     rgba(255, 255, 255, 0.02);

  --mono: 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --maxw: 1080px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-gap: clamp(96px, 14vh, 180px);
}

/* ── 2. BASE ───────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;               /* a wide glitch frame never scrolls the page */
  -webkit-font-smoothing: antialiased;
}

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

/* Faint ambient particles behind everything. */
#pageParticles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 4px;
}

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

/* Scroll-reveal. Elements start hidden only if JS is running. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.22,.61,.36,1);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ── 3. NAV ────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px var(--gutter);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(to bottom, rgba(0,0,0,.92), rgba(0,0,0,0));
  backdrop-filter: blur(2px);
}

.nav-brand {
  color: var(--fg);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.2em;
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--fg); }

.nav-email {
  color: var(--muted);
  cursor: pointer;
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-email:hover { color: var(--fg); }

.copy-toast {
  position: fixed;
  top: 52px;
  right: var(--gutter);
  z-index: 101;
  padding: 7px 15px;
  background: #000;
  color: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.copy-toast.show { opacity: 1; }

/* When triggered by a click, JS sets left/top to the pointer and adds
   this class so the toast sits centred just below the cursor. */
.copy-toast.at-cursor {
  right: auto;
  transform: translateX(-50%);
}

/* ── 4. HERO (WORDMARK + LINE) ─────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px var(--gutter) 72px;
}

@keyframes breathe {
  0%, 100% { opacity: 0.68; }
  50%      { opacity: 1; }
}

/* THE WORDMARK — now the hero centrepiece: big, spotlit, glowing. */
.tagline {
  position: relative;
  z-index: 1;
  color: var(--fg);
  font-size: clamp(24px, 6.4vw, 74px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  height: 1.2em;
  white-space: nowrap;
  text-align: center;
  text-shadow:
    0 0 8px  rgba(255,255,255,0.55),
    0 0 22px rgba(255,255,255,0.35),
    0 0 48px rgba(255,255,255,0.18);
}

/* Spotlight pool anchored to the text, breathing gently. */
.tagline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190%;
  height: 380%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
    rgba(255,255,255,0.14) 0%,
    rgba(255,255,255,0.05) 42%,
    rgba(255,255,255,0)    70%);
  z-index: -1;
  pointer-events: none;
  animation: breathe 7s ease-in-out infinite;
}

/* Fade the wordmark in on load (only when JS is active). */
.js .tagline { opacity: 0; transition: opacity 2.8s ease; }
.js .tagline.is-visible { opacity: 1; }

.tagline .cursor { animation: blink 0.7s step-end infinite; }

@keyframes blink { 50% { opacity: 0; } }

/* THE LINE — a lit bar that sheds particles (drawn on the canvas
   that fills the box above it). Widen/narrow via the width below. */
.hero-line {
  position: relative;
  z-index: 0;
  width: min(640px, 84vw);
  height: 64px;
  margin-top: 8px;
  display: flex;
  align-items: flex-end;      /* bar sits at the bottom, sparks rise into the gap */
  justify-content: center;
}

#lineParticles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-line-bar {
  position: relative;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right,
    rgba(255,255,255,0)   0%,
    rgba(255,255,255,0.9) 20%,
    rgba(255,255,255,0.9) 80%,
    rgba(255,255,255,0)   100%);
  box-shadow:
    0 0 12px rgba(255,255,255,0.7),
    0 0 30px rgba(255,255,255,0.32);
  transform-origin: center;
}

/* Draw the line out from the centre as the wordmark fades in. */
.js .hero-line-bar {
  transform: scaleX(0);
  transition: transform 2.6s cubic-bezier(.16,.84,.3,1);
}
.js .hero-line.is-drawn .hero-line-bar { transform: scaleX(1); }

/* The three glitch links under the line. */
.hero-links {
  display: flex;
  gap: clamp(20px, 4.5vw, 44px);
  margin-top: 14px;
}

.hero-link {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.2s, text-shadow 0.2s;
}
.hero-link:hover,
.hero-link.is-active {
  color: var(--fg);
  text-shadow: 0 0 12px rgba(255,255,255,0.5);
}

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  line-height: 0.9;          /* room so the V's sit apart, tips near */
}

/* Three V's that light up top-to-bottom, over and over. */
.chev {
  color: var(--fg);
  opacity: 0.16;
  animation: chevWave 1.7s ease-in-out infinite;
}
.chev:nth-child(1) { animation-delay: 0s; }
.chev:nth-child(2) { animation-delay: 0.16s; }
.chev:nth-child(3) { animation-delay: 0.32s; }

@keyframes chevWave {
  0%, 55%, 100% { opacity: 0.16; text-shadow: none; }
  27%           { opacity: 1;    text-shadow: 0 0 10px rgba(255,255,255,0.75); }
}

/* ── 5. SECTIONS ───────────────────────────────────────────────── */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-gap) var(--gutter);
  scroll-margin-top: 70px;
}

.section-head { margin-bottom: 52px; }

.eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.section-head h2 {
  color: var(--fg);
  font-size: clamp(26px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow:
    0 0 7px  rgba(255,255,255,0.45),
    0 0 20px rgba(255,255,255,0.30),
    0 0 44px rgba(255,255,255,0.16);
}

.section-note {
  margin-top: 14px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 14px;
}

/* ── CENTERED TEXT-BOX SECTION (type: "centered") ───────────────
   A glitch title sitting in the middle of the screen, everything
   stacked and centred. Used by the contact section. */
.section-centered {
  min-height: 82vh;
  padding-top: clamp(40px, 8vh, 90px);
  padding-bottom: clamp(40px, 8vh, 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.centered-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 46ch;
}

.centered-inner h2 {
  color: var(--fg);
  font-size: clamp(30px, 5.4vw, 58px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow:
    0 0 8px  rgba(255,255,255,0.50),
    0 0 22px rgba(255,255,255,0.32),
    0 0 48px rgba(255,255,255,0.18);
}

.copy-title { cursor: pointer; }

.centered-line {
  max-width: 42ch;
  color: var(--muted);
}

/* The clickable email address shown below a centered title. */
.centered-email {
  font-family: var(--mono);
  font-size: clamp(15px, 2.2vw, 22px);
  letter-spacing: 0.04em;
  color: var(--fg);
  cursor: pointer;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-hot);
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
}
.centered-email:hover {
  border-color: var(--fg);
  text-shadow: 0 0 14px rgba(255,255,255,0.5);
}

.centered-inner .mail-btn { margin-top: 0; }
.centered-inner .links { margin-top: 0; justify-content: center; }

/* ── 6. CARDS ──────────────────────────────────────────────────── */
.grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 16px;
}

/* Wrap a card in <a class="card-link"> to make the whole tile clickable */
.card-link { display: block; color: inherit; }

.card {
  position: relative;
  padding: 22px;
  background: var(--bg);
  border: 1px solid transparent;
  transition: background 0.25s, border-color 0.4s ease;
}
.card:hover { background: var(--panel); }
.card.built { border-color: rgba(255,255,255,0.28); }

/* Overlay the grid draws its boxes into: a glowing line sweeps in from
   the left, drops a vertical line down each box side as it crosses, and
   reveals the top/bottom edges in its wake. It fades out once the CSS
   borders (.built) take over, which also keeps them right on resize. */
.grid-build {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.4s ease;
}
.grid-build line {
  stroke: rgba(255,255,255,0.85);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.55));
}
.grid-build line.grid-build-beam {
  stroke: rgba(255,255,255,0.5);
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.85));
}

.card-media {
  aspect-ratio: 4 / 3;
  margin-bottom: 20px;
  overflow: hidden;
  background: #050505;
}

.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.35s, transform 0.6s cubic-bezier(.22,.61,.36,1);
}
.card:hover .card-media img { filter: none; transform: scale(1.03); }

/* Empty-slot placeholder. Delete .is-empty once a real image is in. */
.card-media.is-empty {
  display: grid;
  place-items: center;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,0.035) 0 1px,
    transparent 1px 9px);
}
.card-media.is-empty span {
  color: rgba(255,255,255,0.22);
  font-size: 28px;
}

.card-title {
  color: var(--fg);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  list-style: none;
}

.tags li {
  padding: 3px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── 7. ABOUT ──────────────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.about-body p + p { margin-top: 18px; }
.about-body p { max-width: 58ch; }

.side-label {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.stack { list-style: none; }

.stack li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13.5px;
}
.stack li:last-child { border-bottom: 1px solid var(--line); }

/* The works-with items drop in one after another when About reveals. */
.js .stack li {
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.22,.61,.36,1);
}
.about.is-in .stack li {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 0.4s + 0.1s);
}

/* ── 8. CONTACT + FOOTER ───────────────────────────────────────── */
.section-contact { padding-bottom: clamp(64px, 10vh, 120px); }

.contact-line {
  max-width: 44ch;
  color: var(--muted);
}

.mail-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 26px;
  padding: 16px 24px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: inherit;
  font-size: clamp(15px, 2.4vw, 22px);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.mail-btn:hover {
  border-color: var(--line-hot);
  box-shadow: 0 0 40px rgba(255,255,255,0.07);
}

.mail-btn-hint {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
  list-style: none;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.links a {
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.links a:hover { color: var(--fg); border-bottom-color: var(--line-hot); }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: clamp(16px, 3vw, 28px);
}
.footer-links a {
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--fg); }

/* ── 9. RESPONSIVE + MOTION ────────────────────────────────────── */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav { gap: 16px; padding: 14px var(--gutter); font-size: 11px; }
  .nav-links { gap: 14px; }
  .nav-email { display: none; }
  .tagline { letter-spacing: 0.05em; }
  .hero-line { height: 48px; }
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tagline::before,
  .chev,
  .tagline .cursor { animation: none; }
  .chev { opacity: 0.5; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .js .stack li { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}
