/* ─── VARIABLES ─── */
:root {
  --bg: #0a0a0f;
  --bg-card: #111118;
  --bg-card-hover: #181822;
  --text: #e8e5df;
  --text-secondary: #908d85;
  --text-muted: #5a5850;
  --gold: #c8a44e;
  --gold-bright: #d4b464;
  --gold-dim: rgba(200, 164, 78, 0.12);
  --border: #1e1e28;
  --border-hover: #2e2e3a;
  --green: #4ade80;
  --purple: #a78bfa;
  --amber: #fbbf24;
  --blue: #60a5fa;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── GRAIN OVERLAY ─── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

/* Thin coordinate grid */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200, 164, 78, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 164, 78, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 50%, black, transparent);
}

/* Chessboard pattern overlay */
.hero-chess {
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(rgba(200, 164, 78, 0.018) 0% 25%, transparent 0% 50%) 0 0 / 64px 64px;
  mask-image: radial-gradient(ellipse 45% 40% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 45% 40% at 50% 50%, black, transparent);
}

/* Knight-move L-shaped decorative paths */
.knight-path {
  position: absolute;
  pointer-events: none;
}

.knight-path-1 {
  top: 16%;
  right: 12%;
  width: 96px;
  height: 160px;
  border-right: 1px solid rgba(200, 164, 78, 0.1);
  border-bottom: 1px solid rgba(200, 164, 78, 0.1);
  border-radius: 0 0 3px 0;
}

.knight-path-2 {
  bottom: 22%;
  left: 10%;
  width: 64px;
  height: 128px;
  border-left: 1px solid rgba(200, 164, 78, 0.07);
  border-top: 1px solid rgba(200, 164, 78, 0.07);
  border-radius: 3px 0 0 0;
}

/* Floating chess coordinates */
.coord {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: rgba(200, 164, 78, 0.07);
  pointer-events: none;
  user-select: none;
  letter-spacing: 0.05em;
}

.coord-1 { top: 20%; left: 8%; }
.coord-2 { top: 35%; right: 7%; }
.coord-3 { bottom: 28%; right: 14%; }
.coord-4 { bottom: 18%; left: 14%; }

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-headshot {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 32px;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.hero-headshot:hover {
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(200, 164, 78, 0.15);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .accent { color: var(--gold); }

/* Blinking cursor */
.cursor {
  display: inline-block;
  width: 3px;
  height: 0.72em;
  background: var(--gold);
  margin-left: 6px;
  vertical-align: baseline;
  position: relative;
  top: 2px;
  animation: blink 1s step-end infinite;
}

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

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.75;
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .hero { padding: 100px 20px 60px; }

  .hero-headshot {
    width: 96px;
    height: 96px;
    margin-bottom: 24px;
  }

  .knight-path { display: none; }
  .coord { display: none; }
}
