/* ═══════════════════════════════════════════════════════
   BASE — Variables, Reset, Typography, Shared Utilities
═══════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ────────────────────────── */
:root {
  --bg:        #080808;
  --bg-alt:    #0d0d0d;
  --bg-card:   rgba(255, 255, 255, 0.03);
  --border:    rgba(255, 255, 255, 0.08);
  --text:      #f0ede6;
  --muted:     #686868;
  --accent:    #64ffda;
  --accent-bg: rgba(100, 255, 218, 0.07);

  --fh: 'Space Grotesk', sans-serif;
  --fb: 'Inter', sans-serif;

  --nav-h:  72px;
  --radius: 12px;
  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Reset ────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

@media (pointer: fine) {
  body { cursor: none; }
}

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

/* ─── Layout ───────────────────────────────────────── */
.section { padding: 128px 0; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ─── Section Labels & Titles ──────────────────────── */
.s-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 52px;
}

.s-num {
  font-family: var(--fh);
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.s-label > span:last-child {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.s-title {
  font-family: var(--fh);
  font-size: clamp(2.75rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.04em;
  margin-bottom: 72px;
}

.s-title em {
  font-style: normal;
  color: var(--accent);
}

/* ─── Scroll Progress Bar ──────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 1002;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
  transition: width 0.08s linear;
}

/* ─── Grain Overlay ────────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  animation: grain 0.35s steps(1) infinite;
}

/* ─── GSAP Animation Initial States ───────────────── */
.reveal-line {
  display: inline-block;
  opacity: 1;
  clip-path: inset(0 0 100% 0);
  perspective: 900px;
}

.reveal-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.reveal-word-inner {
  display: inline-block;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.is-kinetic-title .reveal-word-inner {
  transition: text-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.is-kinetic-title:hover .reveal-word-inner {
  text-shadow: 0 0 20px rgba(100, 255, 218, 0.18);
}

.reveal-p {
  opacity: 0;
  transform: translateY(22px);
}

.reveal-card {
  opacity: 0;
  transform: translateY(32px);
}

/* ─── Utilities ────────────────────────────────────── */
.text-link {
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 960px) {
  .navbar    { padding: 0 28px; }
  .nav-links { display: none; }
  .hero      { padding: calc(var(--nav-h) + 60px) 28px 80px; }
  .container { padding: 0 28px; }
  .section   { padding: 88px 0; }

  .about-layout   { grid-template-columns: 1fr; gap: 48px; }
  .spec-grid      { grid-template-columns: 1fr 1fr; }
  .skills-layout  { grid-template-columns: 1fr 1fr; }
  .projects-grid  { grid-template-columns: 1fr; }

  .contact-title { font-size: clamp(2.75rem, 9vw, 4.5rem); }
}

@media (max-width: 580px) {
  .hero-title    { font-size: clamp(3.25rem, 14vw, 5.5rem); }
  .hero-stats    { gap: 18px; }
  .h-stat-sep    { display: none; }
  .spec-grid     { grid-template-columns: 1fr; }
  .skills-layout { grid-template-columns: 1fr; }
  .hero-btns     { flex-direction: column; align-items: flex-start; }
  .s-title       { font-size: 2.4rem; }
  .footer-row    { flex-direction: column; gap: 8px; text-align: center; }

  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
}
