/* ═══════════════════════════════════════════
   styles.css  —  aiwithvi.com
   ═══════════════════════════════════════════ */

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

/* ── TOKENS ─────────────────────────────── */
:root {
  --ink:          #0d0d0f;
  --ink2:         #3a3a40;
  --ink3:         #767680;
  --surface:      #f8f7f4;
  --surface2:     #f0efe9;
  --surface3:     #e8e7df;
  --accent:       #1a1aff;
  --accent-light: #e8e8ff;
  --amber:        #d97706;
  --amber-light:  #fef3c7;
  --teal:         #0d7377;
  --teal-light:   #e0f5f5;
  --coral:        #c94444;
  --coral-light:  #fde8e8;
  --border:       rgba(13,13,15,0.1);
  --border-strong:rgba(13,13,15,0.2);
  --radius:       12px;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'Outfit', sans-serif;
  --mono:  'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── ANIMATIONS ─────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-20px); }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.2); }
  50%     { box-shadow: 0 0 0 8px rgba(34,197,94,0.1); }
}

.fade-up   { animation: fadeUp 0.7s cubic-bezier(0.22,1,0.36,1) both; }
.fade-up-1 { animation-delay: 0.10s; }
.fade-up-2 { animation-delay: 0.22s; }
.fade-up-3 { animation-delay: 0.36s; }
.fade-up-4 { animation-delay: 0.48s; }
.fade-up-5 { animation-delay: 0.60s; }

/* ── SHARED SECTION PATTERNS ────────────── */
section { padding: 100px 48px; }

.section-label {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink3); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before {
  content: ''; display: inline-block;
  width: 24px; height: 1px; background: var(--ink3);
}
.section-heading {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 48px;
  max-width: 600px;
}
.section-heading em { font-style: italic; color: var(--accent); }

/* ── NAV ─────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: rgba(248,247,244,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
}
.nav-logo {
  font-family: var(--mono); font-size: 15px; font-weight: 500;
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 13.5px; color: var(--ink3); text-decoration: none;
  font-weight: 400; transition: color 0.15s; letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--ink); }
.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 4px; color: var(--ink); font-size: 22px; line-height: 1;
}
.nav-cta {
  font-size: 13px; font-weight: 500; padding: 8px 20px;
  background: var(--ink); color: var(--surface);
  border-radius: 40px; text-decoration: none;
  transition: background 0.15s, transform 0.1s; letter-spacing: 0.01em;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

/* ── HERO ────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 48px 80px;
  position: relative; overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 60%, black 30%, transparent 80%);
}
.hero-orb {
  position: absolute; top: 10%; right: -5%;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #c8c8ff 0%, #e8e8ff 45%, transparent 70%);
  opacity: 0.5; z-index: 0;
  animation: float 8s ease-in-out infinite;
}
.hero-orb2 {
  position: absolute; bottom: 5%; left: -8%;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle at 60% 60%, #a7f3d0 0%, #d1fae5 45%, transparent 70%);
  opacity: 0.4; z-index: 0;
  animation: float 10s ease-in-out infinite reverse;
}
.hero-eyebrow {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before {
  content: ''; display: inline-block;
  width: 32px; height: 1px; background: var(--accent);
}
.hero-heading {
  position: relative; z-index: 1;
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.0; letter-spacing: -0.02em;
  color: var(--ink); max-width: 820px; margin-bottom: 28px;
}
.hero-heading em { font-style: italic; color: var(--accent); }
.hero-sub {
  position: relative; z-index: 1;
  font-size: 17px; font-weight: 300; color: var(--ink2);
  max-width: 560px; line-height: 1.65; margin-bottom: 44px;
}
.hero-actions {
  position: relative; z-index: 1;
  display: flex; gap: 14px; align-items: center;
}
.btn-primary {
  padding: 14px 32px; background: var(--ink); color: var(--surface);
  border-radius: 40px; text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: all 0.15s; letter-spacing: 0.01em;
}
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }
.btn-ghost {
  padding: 14px 28px; border: 1px solid var(--border-strong);
  color: var(--ink2); border-radius: 40px; text-decoration: none;
  font-size: 14px; transition: all 0.15s;
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.hero-stat-row {
  position: relative; z-index: 1;
  margin-top: 64px;
  display: flex; gap: 48px;
  border-top: 0.5px solid var(--border);
  padding-top: 32px;
}
.hero-stat-val { font-family: var(--serif); font-size: 28px; color: var(--ink); }
.hero-stat-lbl { font-size: 12px; color: var(--ink3); margin-top: 2px; font-family: var(--mono); }

/* ── TICKER ──────────────────────────────── */
.ticker-wrap {
  background: var(--ink); padding: 12px 0;
  overflow: hidden; white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  animation: ticker 28s linear infinite;
}
.ticker-item {
  font-family: var(--mono); font-size: 11.5px;
  color: rgba(248,247,244,0.55);
  padding: 0 24px; letter-spacing: 0.05em;
}
.ticker-item span { color: rgba(248,247,244,0.25); margin-right: 24px; }

/* ── ABOUT ───────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
}
.about-text p { font-size: 16px; color: var(--ink2); line-height: 1.75; margin-bottom: 20px; }
.about-text p strong { color: var(--ink); font-weight: 500; }
.about-cards { display: flex; flex-direction: column; gap: 14px; }
.about-card {
  border: 0.5px solid var(--border-strong); border-radius: var(--radius);
  padding: 20px 22px; background: white;
  display: flex; align-items: flex-start; gap: 16px;
  transition: border-color 0.15s, transform 0.15s;
}
.about-card:hover { border-color: var(--accent); transform: translateX(4px); }
.about-card-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.about-card-title { font-size: 13.5px; font-weight: 500; margin-bottom: 3px; }
.about-card-desc  { font-size: 12.5px; color: var(--ink3); line-height: 1.5; }

/* ── SYLLABUS ────────────────────────────── */
.progress-banner {
  background: var(--surface2); border: 0.5px solid var(--border-strong);
  border-radius: var(--radius); padding: 20px 24px;
  display: flex; align-items: center; gap: 24px; margin-bottom: 48px;
  flex-wrap: wrap;
}
.progress-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #22c55e; flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.2);
  animation: pulse 2s ease-in-out infinite;
}
.progress-text { flex: 1; min-width: 180px; font-size: 13.5px; color: var(--ink2); }
.progress-text strong { color: var(--ink); font-weight: 500; }
.progress-bar-wrap { flex: 1; min-width: 120px; }
.progress-bar-label {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink3); margin-bottom: 6px; text-align: right;
}
.progress-bar { height: 4px; background: var(--surface3); border-radius: 4px; overflow: hidden; }
.progress-bar-fill {
  height: 100%; background: var(--accent); border-radius: 4px;
  transition: width 0.6s ease;
}
.weeks-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.week-tile {
  border: 0.5px solid var(--border-strong); border-radius: var(--radius);
  padding: 22px; background: white; position: relative; overflow: hidden;
  cursor: pointer; transition: all 0.2s;
}
.week-tile:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(26,26,255,0.08);
}
.week-tile::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--tile-color, var(--accent));
}
.week-num {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--ink3); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 10px;
}
.week-title  { font-size: 13.5px; font-weight: 500; color: var(--ink); line-height: 1.4; margin-bottom: 8px; }
.week-badge  {
  display: inline-block; font-size: 10px; padding: 3px 9px;
  border-radius: 20px; font-family: var(--mono); font-weight: 500;
  border: 0.5px solid var(--border-strong); color: var(--ink3); margin-top: 10px;
}
.week-status {
  position: absolute; top: 18px; right: 16px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--surface3);
}
.week-status.active   { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
.week-status.upcoming { background: var(--surface3); }

/* ── WRITINGS ────────────────────────────── */
.articles-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.article-card {
  border: 0.5px solid var(--border-strong); border-radius: var(--radius);
  background: white; overflow: hidden; transition: all 0.2s; cursor: pointer;
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.08); }
.article-card.featured { grid-column: span 2; display: flex; flex-direction: row; }
.article-img {
  height: 200px; background: var(--surface2);
  position: relative; overflow: hidden; flex-shrink: 0;
}
.article-card.featured .article-img { width: 240px; height: auto; }
.article-img-pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 20px 20px;
}
.article-img-label {
  position: absolute; bottom: 12px; left: 12px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  background: var(--ink); color: var(--surface);
  padding: 4px 10px; border-radius: 20px; letter-spacing: 0.06em;
}
.article-body { padding: 22px; }
.article-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); margin-bottom: 10px;
}
.article-title   { font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--ink); margin-bottom: 10px; }
.article-excerpt { font-size: 13px; color: var(--ink3); line-height: 1.6; margin-bottom: 16px; }
.article-meta    { font-family: var(--mono); font-size: 11px; color: var(--ink3); display: flex; gap: 16px; }

/* featured article body flex */
.article-card.featured .article-body {
  display: flex; flex-direction: column; justify-content: center;
}
.article-card.featured .article-title { font-size: 18px; }

/* ── STACK ───────────────────────────────── */
.stack-section { background: var(--ink); }
.stack-section .section-label        { color: rgba(248,247,244,0.4); }
.stack-section .section-label::before{ background: rgba(248,247,244,0.4); }
.stack-section .section-heading      { color: var(--surface); }
.stack-section .section-heading em   { color: #a5a5ff; }
.stack-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); overflow: hidden;
}
.stack-cell { padding: 28px 24px; background: var(--ink); transition: background 0.15s; }
.stack-cell:hover { background: #1a1a22; }
.stack-cell-cat  {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(248,247,244,0.35); margin-bottom: 12px;
}
.stack-cell-name { font-size: 15px; font-weight: 500; color: var(--surface); margin-bottom: 6px; }
.stack-cell-desc { font-size: 12px; color: rgba(248,247,244,0.45); line-height: 1.5; }

/* ── NEWSLETTER ──────────────────────────── */
.newsletter-section { background: var(--accent-light); text-align: center; }
.newsletter-section .section-label   { justify-content: center; }
.newsletter-section .section-heading { margin: 0 auto 16px; }
.newsletter-sub {
  font-size: 16px; color: var(--ink2); font-weight: 300;
  max-width: 480px; margin: 0 auto 32px;
}
.newsletter-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.newsletter-form input {
  flex: 1; padding: 13px 18px;
  border: 1px solid var(--border-strong); border-radius: 40px;
  font-family: var(--sans); font-size: 14px;
  background: white; color: var(--ink); outline: none;
  transition: border-color 0.15s;
}
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button {
  padding: 13px 28px; background: var(--ink); color: var(--surface);
  border: none; border-radius: 40px; font-family: var(--sans);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background 0.15s;
}
.newsletter-form button:hover { background: var(--accent); }
.newsletter-note { font-size: 11.5px; color: var(--ink3); margin-top: 12px; font-family: var(--mono); }

/* ── FOOTER ──────────────────────────────── */
footer {
  border-top: 0.5px solid var(--border); padding: 48px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--ink3); flex-wrap: wrap; gap: 16px;
}
.footer-logo { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--ink); }
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 24px; }
footer a { color: var(--ink3); text-decoration: none; transition: color 0.15s; }
footer a:hover { color: var(--ink); }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }

  section { padding: 72px 24px; }

  .hero { padding: 0 24px 64px; }
  .hero-orb  { width: 300px; height: 300px; }
  .hero-orb2 { width: 220px; height: 220px; }
  .hero-stat-row { gap: 28px; flex-wrap: wrap; }

  .about-grid   { grid-template-columns: 1fr; gap: 40px; }
  .weeks-grid   { grid-template-columns: repeat(2, 1fr); }
  .articles-grid{ grid-template-columns: 1fr; }
  .article-card.featured { flex-direction: column; grid-column: span 1; }
  .article-card.featured .article-img { width: 100%; height: 180px; }
  .stack-grid   { grid-template-columns: repeat(2, 1fr); }

  footer { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 540px) {
  .weeks-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
  .hero-stat-row { gap: 20px; }
}
