/* ============================================
   BASE — Reset, Variables, Typography
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Default: Ash & Crimson — "Typeset" / "Ink on void" */
  --bg-primary: #FAFAFA;
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;
  --text-primary: #18181B;
  --text-secondary: #52525B;
  --text-muted: #71717A;
  --accent: #9F1239;
  --accent-light: #BE123C;
  --accent-cyan: #881337;
  --accent-gradient: linear-gradient(135deg, #9F1239, #881337);
  --border: #E4E4E7;
  --shadow: 0 1px 3px rgba(24,24,27,0.06);
  --shadow-lg: 0 10px 30px rgba(159,18,57,0.08);
  --navbar-bg: rgba(250,250,250,0.85);
  --navbar-shadow: 0 1px 3px rgba(24,24,27,0.06);
  --pill-bg: #FFF1F2;
  --pill-text: #9F1239;
  --input-bg: #F4F4F5;
  --timeline-line: #D4D4D8;
  --hero-dot: rgba(159,18,57,0.04);
  --scrollbar-track: #F4F4F5;
  --scrollbar-thumb: #D4D4D8;
  --footer-bg: #F4F4F5;
  --modal-overlay: rgba(24,24,27,0.5);
}

[data-theme="dark"] {
  /* Default dark: Ash & Crimson — "Ink on void" */
  --bg-primary: #09090B;
  --bg-secondary: #18181B;
  --bg-card: #18181B;
  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-muted: #52525B;
  --accent: #FB7185;
  --accent-light: #FDA4AF;
  --accent-cyan: #F43F5E;
  --accent-gradient: linear-gradient(135deg, #FB7185, #F43F5E);
  --border: #27272A;
  --shadow: 0 1px 3px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 30px rgba(251,113,133,0.06);
  --navbar-bg: rgba(9,9,11,0.92);
  --navbar-shadow: 0 1px 3px rgba(0,0,0,0.5);
  --pill-bg: rgba(251,113,133,0.1);
  --pill-text: #FDA4AF;
  --input-bg: #18181B;
  --timeline-line: #27272A;
  --hero-dot: rgba(251,113,133,0.04);
  --scrollbar-track: #18181B;
  --scrollbar-thumb: #27272A;
  --footer-bg: #09090B;
  --modal-overlay: rgba(0,0,0,0.8);
}

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

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Subtle noise grain overlay for tactile feel */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.3;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--accent-light); }

img { max-width: 100%; display: block; }

ul { list-style: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

/* ---------- Utilities ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  overflow: hidden;
}

.section-header {
  margin-bottom: 50px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-left: 18px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 2px;
  background: var(--accent-gradient);
  animation: accentBarGrow 0.6s ease forwards;
  transform-origin: top;
}

@keyframes accentBarGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* ---------- Varied Section Reveals ---------- */
/* Slide from left */
.reveal-slide-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal-slide-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up from center */
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Slide from right */
.reveal-slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal-slide-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Scroll Progress Bar ---------- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 10000;
  width: 0%;
  transition: width 0.1s linear;
}

/* ---------- Fade-up Animation ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent-gradient);
  color: #FFF;
  box-shadow: 0 4px 15px rgba(159,18,57,0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(159,18,57,0.4);
  color: #FFF;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

/* ---------- Tech Chips (shared) ---------- */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-chip {
  padding: 4px 12px;
  background: var(--pill-bg);
  color: var(--pill-text);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}
