/* =========================================================
   SAM CRISSEY — PORTFOLIO V2
   Self-hosted fonts
   ========================================================= */
@font-face { font-family:'Sora'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/sora-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family:'Sora'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/sora-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family:'Sora'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/sora-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family:'IBM Plex Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'IBM Plex Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --bg: #08090d;
  --bg-alt: #0d0f16;
  --panel: rgba(255,255,255,0.035);
  --panel-hi: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.09);
  --border-hi: rgba(255,255,255,0.18);

  --text-hi: #f2f4f8;
  --text: #aeb4c2;
  --text-dim: #6c7486;

  /* Signature gradient: electric blue -> violet */
  --accent-1: #4d7fff;
  --accent-2: #9a5cff;
  --accent-grad: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --accent-glow: rgba(107, 108, 255, 0.28);

  --live: #35d68a;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 16px;
  --content-w: 640px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-hi);
  margin: 0;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-1);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--accent-1);
  flex-shrink: 0;
}

.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================================================
   GLASS PANEL UTILITY
   ========================================================= */
.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
}
.glass-hover { transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease; }
.glass-hover:hover {
  background: var(--panel-hi);
  border-color: var(--border-hi);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -20px var(--accent-glow);
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 9, 13, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img {
  height: 42px; width: auto;
  opacity: 1;
  filter: drop-shadow(0 0 10px var(--accent-glow)) drop-shadow(0 0 2px rgba(154,92,255,0.5));
}
.nav-brand-text { font-family: var(--font-display); font-size: 15px; color: var(--text-hi); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-hi); background: var(--panel-hi); }
.nav-cta {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--bg) !important;
  background: var(--accent-grad);
  padding: 9px 20px;
  border-radius: 999px;
  margin-left: 8px;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { filter: brightness(1.1); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  width: 32px; height: 24px;
  position: relative;
  background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span {
  position: absolute; left: 0; right: 0; height: 1px;
  background: var(--text-hi);
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.nav-toggle span:nth-child(1) { top: 2px; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { top: 20px; }
.nav-toggle.is-open span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.is-open { max-height: 400px; }
  .nav-links a, .nav-cta { border-radius: 0; padding: 18px var(--gutter); margin: 0; text-align: center; }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-size: 14.5px; font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--border-hi);
  color: var(--text-hi);
  transition: all 0.25s ease;
  background: transparent;
}
.btn:hover { border-color: var(--accent-1); background: var(--panel-hi); }
.btn-solid {
  background: var(--accent-grad);
  border: none;
  color: #fff;
}
.btn-solid:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }

/* Utility */
.mono { font-family: var(--font-mono); }
section { position: relative; z-index: 1; padding: 110px 0; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; margin-bottom: 48px; flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.section-head .sub { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); max-width: 320px; }

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a:hover { color: var(--accent-1); }
