/* ===================================================================
   Jason Cooper — Portfolio
   Static, dependency-free stylesheet. Dark-first with a light theme.
   =================================================================== */

:root {
  --bg: #0b1120;
  --bg-alt: #0f172a;
  --bg-card: #131c30;
  --surface: #1a2540;
  --text: #e7ecf5;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --border: rgba(148, 163, 184, 0.16);
  --accent: #2dd4bf;
  --accent-2: #6366f1;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --shadow: 0 20px 50px -25px rgba(0, 0, 0, 0.7);
  --radius: 16px;
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-alt: #eef2f8;
  --bg-card: #ffffff;
  --surface: #ffffff;
  --text: #0f1b2d;
  --text-muted: #4a5a72;
  --text-faint: #8290a6;
  --border: rgba(15, 27, 45, 0.1);
  --accent: #0d9488;
  --accent-2: #4f46e5;
  --accent-soft: rgba(13, 148, 136, 0.1);
  --shadow: 0 20px 50px -28px rgba(15, 27, 45, 0.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  border: 1px solid transparent; transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.btn--small { padding: 8px 16px; font-size: 0.85rem; }
.btn--primary { background: var(--accent); color: #04211d; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px var(--accent); }
.btn--ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.nav__brand { font-family: 'Inter', sans-serif; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.nav__brand span { color: var(--accent); }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 0.92rem; color: var(--text-muted); font-weight: 500;
  position: relative; transition: color 0.2s var(--ease);
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.25s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  font-size: 1.1rem; line-height: 1; transition: all 0.25s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: rotate(20deg); }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s var(--ease); }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 120px 0 90px; overflow: hidden; }
.hero__inner { position: relative; z-index: 2; max-width: 820px; }
.hero__eyebrow {
  display: inline-block; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent); padding: 6px 14px; border: 1px solid var(--accent-soft);
  background: var(--accent-soft); border-radius: 999px; margin-bottom: 26px;
}
.hero__title {
  font-family: 'Inter', sans-serif; font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(3rem, 8vw, 5.5rem); line-height: 1.04; margin-bottom: 22px;
}
.hero__tagline { font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--text-muted); max-width: 680px; margin-bottom: 40px; }
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700;
}

.hero__stats { display: flex; flex-wrap: wrap; gap: 40px; margin-bottom: 44px; }
.stat { display: flex; flex-direction: column; }
.stat__num { font-family: 'Inter', sans-serif; font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--text); }
.stat__label { font-size: 0.85rem; color: var(--text-faint); margin-top: 6px; max-width: 130px; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__glow {
  position: absolute; top: -10%; right: -8%; width: 640px; height: 640px; z-index: 1;
  background: radial-gradient(circle at center, var(--accent) 0%, transparent 62%);
  opacity: 0.16; filter: blur(20px); pointer-events: none; border-radius: 50%;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.section--ai { background: var(--bg-alt); }
.section__kicker {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.section__title {
  font-family: 'Inter', sans-serif; font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.1; margin-bottom: 14px;
}
.section__title--center { text-align: center; }
.section__lead {
  color: var(--text-muted); font-size: 1.08rem; max-width: 680px; margin: 0 auto 48px;
  text-align: center;
}

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 50px; align-items: start; margin-top: 10px; }
.about__body p { color: var(--text-muted); margin-bottom: 18px; }
.about__body strong { color: var(--text); font-weight: 600; }
.about__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.about__chips li {
  font-size: 0.85rem; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-soft);
}

/* ---------- Cards (AI) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.card__icon {
  width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.4rem;
  border-radius: 12px; background: var(--accent-soft); margin-bottom: 18px;
}
.card h3 { font-size: 1.12rem; margin-bottom: 10px; letter-spacing: -0.01em; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; position: relative; margin-top: 20px; padding-left: 4px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--accent), transparent);
}
.timeline__item { position: relative; display: grid; grid-template-columns: 230px 1fr; gap: 30px; padding: 0 0 44px 36px; }
.timeline__item::before {
  content: ''; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.timeline__meta { display: flex; flex-direction: column; gap: 4px; }
.timeline__date { font-size: 0.82rem; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; }
.timeline__co { font-size: 0.95rem; color: var(--text-faint); font-weight: 500; }
.timeline__content h3 { font-size: 1.22rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.timeline__content > p { color: var(--text-muted); margin-bottom: 14px; }
.timeline__content ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.timeline__content ul li { position: relative; padding-left: 20px; color: var(--text-muted); font-size: 0.94rem; }
.timeline__content ul li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 16px; }
.skills__group h3 {
  font-size: 1.05rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
  color: var(--text);
}
.taglist { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.taglist li {
  font-size: 0.86rem; padding: 7px 13px; border-radius: 10px; background: var(--bg-card);
  border: 1px solid var(--border); color: var(--text-muted); transition: all 0.2s var(--ease);
}
.taglist li:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Contact ---------- */
.section--contact { text-align: center; padding-bottom: 110px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--text-faint); font-size: 0.86rem; }

/* ---------- Reveal animation ---------- */
.reveal, .section__kicker, .section__title, .section__lead,
.card, .timeline__item, .skills__group, .about__body, .about__grid > h2 {
  opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.is-visible { opacity: 1 !important; transform: none !important; }

/* stagger cards / timeline */
.card:nth-child(2) { transition-delay: 0.08s; }
.card:nth-child(3) { transition-delay: 0.16s; }
.card:nth-child(5) { transition-delay: 0.08s; }
.card:nth-child(6) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .section__kicker, .section__title, .section__lead,
  .card, .timeline__item, .skills__group, .about__body, .about__grid > h2 {
    opacity: 1; transform: none; transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .about__grid { grid-template-columns: 1fr; gap: 24px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: 1fr; gap: 26px; }
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 680px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.is-open {
    display: flex; flex-direction: column; gap: 18px; position: absolute;
    top: 66px; left: 0; right: 0; background: var(--bg-alt); padding: 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav__actions .btn--small { display: none; }
  .cards { grid-template-columns: 1fr; }
  .hero { padding: 80px 0 70px; }
  .hero__stats { gap: 26px; }
  .stat__num { font-size: 2.1rem; }
  .section { padding: 70px 0; }
  .footer__inner { flex-direction: column; gap: 8px; text-align: center; }
}
