:root {
  --bg: #faf6ee;
  --bg-alt: #fff6de;
  --ink: #171310;
  --ink-soft: #5c564d;
  --ink-faint: #948d81;
  --white: #ffffff;
  --yellow: #ffcc02;
  --red: #ff4433;
  --orange: #ff7a1a;
  --line: #171310;
  --radius: 22px;
  --maxw: 1120px;
  --font-head: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em; }

em { font-family: var(--font-head); font-style: italic; font-weight: 500; }

/* ---------- CUSTOM CURSOR ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
  display: none;
}
.cursor-dot { width: 8px; height: 8px; background: var(--white); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 2px solid var(--white);
  transition: width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s ease;
}
.cursor-ring.cursor-hover { width: 64px; height: 64px; background: rgba(255, 255, 255, 0.18); }
body.custom-cursor, body.custom-cursor a, body.custom-cursor button { cursor: none; }
body.custom-cursor .cursor-dot, body.custom-cursor .cursor-ring { display: block; }

/* ---------- CURSOR GLOW ---------- */
.hero-glow, .contact-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 560px; height: 560px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(10px);
}
.hero-glow { background: radial-gradient(circle, rgba(255, 204, 2, 0.4), rgba(255, 122, 26, 0.14) 45%, transparent 72%); }
.contact-glow { background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12) 45%, transparent 72%); }
.hero:hover .hero-glow, .contact-section:hover .contact-glow { opacity: 1; }

/* ---------- DECORATIVE SHAPES ---------- */
.shape { position: absolute; pointer-events: none; user-select: none; z-index: 1; will-change: transform; }
.shape-star { font-size: 2.2rem; line-height: 1; }
.shape-dot { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--ink); background: var(--yellow); }
.shape-ring { width: 60px; height: 60px; border-radius: 50%; border: 4px solid var(--red); }

.hero-shape-1 { top: 18%; left: 6%; color: var(--red); transform: rotate(-8deg); }
.hero-shape-2 { top: 72%; left: 10%; background: var(--orange); }
.hero-shape-3 { bottom: 10%; left: 46%; }

.contact-shape-1 { top: 14%; left: 8%; color: var(--ink); }
.contact-shape-2 { bottom: 16%; right: 10%; color: var(--ink); font-size: 3rem; }
.contact-shape-3 { top: 24%; right: 16%; background: var(--ink); border-color: var(--white); }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
.logo span { font-style: italic; color: var(--red); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  background: var(--yellow);
  border: 2px solid var(--line);
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--red); color: var(--white) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.hero-text h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.8rem);
  line-height: 1.1;
  margin-bottom: 22px;
  font-weight: 600;
}
.accent-wrap { position: relative; display: inline-block; font-style: italic; color: var(--red); }
.squiggle { position: absolute; left: 0; bottom: -12px; width: 100%; height: 14px; color: var(--yellow); }
.hero-sub {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2.5px solid var(--line);
  box-shadow: 4px 4px 0 var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
.btn:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--line); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--red); }
.btn-ghost { background: var(--white); color: var(--ink); }
.btn-ghost:hover { background: var(--yellow); }
.btn-dark { background: var(--white); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn-dark:hover { background: var(--ink); color: var(--white); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

.hero-photo { position: relative; justify-self: center; }
.blob {
  position: absolute;
  width: 320px;
  height: 320px;
  top: 50%; left: 50%;
  margin-top: -160px;
  margin-left: -160px;
  transform: rotate(-10deg);
  color: var(--yellow);
  z-index: 1;
}
.photo-frame {
  position: relative;
  z-index: 2;
  width: 250px;
  height: 300px;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px 24px;
  transform: rotate(3deg);
  box-shadow: 8px 8px 0 var(--ink);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.badge {
  position: absolute;
  z-index: 3;
  background: var(--white);
  border: 2.5px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.badge-1 { top: 4%; left: -12%; transform: rotate(-6deg); background: var(--orange); }
.badge-2 { bottom: 2%; right: -14%; transform: rotate(4deg); background: var(--yellow); }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  animation: bob 2.2s ease-in-out infinite;
  z-index: 2;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- SECTIONS ---------- */
.section { padding: 110px 24px; position: relative; z-index: 2; }
.section.alt { background: var(--bg-alt); }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.section-inner.narrow { max-width: 720px; }

.kicker {
  display: inline-block;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
  background: var(--yellow);
  border: 2px solid var(--line);
  padding: 5px 14px;
  border-radius: 999px;
}
#journey .kicker { background: var(--red); color: var(--white); }
#projects .kicker { background: var(--orange); }
#references .kicker { background: var(--red); color: var(--white); }
#life .kicker { background: var(--orange); }
.kicker-light { background: var(--white); color: var(--ink); }

.section h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-bottom: 28px;
}
.section-lead {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: -12px 0 36px;
}

/* ---------- ABOUT ---------- */
.about-grid { display: grid; gap: 18px; margin-bottom: 32px; }
.about-grid p { color: var(--ink-soft); font-size: 1.05rem; }
.about-grid strong { color: var(--ink); }

.quote {
  border-left: 4px solid var(--red);
  padding: 6px 0 6px 22px;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink);
  margin: 32px 0;
}
.quote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.stat {
  background: var(--white);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: 5px 5px 0 var(--yellow);
}
.stat:nth-child(2) { box-shadow: 5px 5px 0 var(--red); }
.stat:nth-child(3) { box-shadow: 5px 5px 0 var(--orange); }
.stat:nth-child(4) { box-shadow: 5px 5px 0 var(--yellow); }
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* ---------- TIMELINE ---------- */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 3px solid var(--line);
}
.tl-item {
  position: relative;
  padding-bottom: 44px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -42px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--line);
}
.tl-item:nth-child(3n+2)::before { background: var(--red); }
.tl-item:nth-child(3n+3)::before { background: var(--orange); }

.tl-year {
  font-family: var(--font-head);
  font-weight: 700;
  font-style: italic;
  color: var(--red);
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.tl-content h3 { font-size: 1.2rem; margin-bottom: 8px; }
.tl-content p { color: var(--ink-soft); max-width: 62ch; }

/* ---------- PROJECTS ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--white);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 6px 6px 0 var(--yellow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:nth-child(3n+2) { box-shadow: 6px 6px 0 var(--red); }
.card:nth-child(3n+3) { box-shadow: 6px 6px 0 var(--orange); }
.card:hover {
  transform: translate(-3px, -3px);
}
.card:hover { box-shadow: 9px 9px 0 var(--yellow); }
.card:nth-child(3n+2):hover { box-shadow: 9px 9px 0 var(--red); }
.card:nth-child(3n+3):hover { box-shadow: 9px 9px 0 var(--orange); }
.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  background: var(--bg-alt);
  border: 1.5px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- SKILLS ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.skill-group h3 {
  font-size: 1rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-body);
}
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tags span {
  background: var(--white);
  border: 2px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 500;
}

/* ---------- REFERENCES ---------- */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.ref-card {
  background: var(--white);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  border-top: 8px solid var(--yellow);
}
.ref-card:nth-child(3n+2) { border-top-color: var(--red); }
.ref-card:nth-child(3n+3) { border-top-color: var(--orange); }
.ref-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.ref-card p { color: var(--ink-soft); font-size: 0.8rem; }

/* ---------- LIFE ---------- */
.life-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.life-col h3 {
  font-size: 1rem;
  color: var(--ink-soft);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  font-family: var(--font-body);
}
.life-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.life-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--ink);
}
.emoji {
  font-size: 1.3rem;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2.5px solid var(--line);
  border-radius: 50%;
}
.life-list li:nth-child(3n+2) .emoji { background: #ffe1de; }
.life-list li:nth-child(3n+3) .emoji { background: #ffe9d2; }
.life-list li:nth-child(3n+1) .emoji { background: #fff3c2; }

/* ---------- CONTACT ---------- */
.contact-section {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: var(--orange);
  color: var(--ink);
}
.contact-section h2 { color: var(--ink); }
.contact-section .section-lead { margin-left: auto; margin-right: auto; color: #3a2a15; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--ink-faint);
  font-size: 0.85rem;
  border-top: 2px solid var(--line);
  background: var(--bg);
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; }
  .hero-photo { order: 1; margin-bottom: 20px; }
  .hero-actions { justify-content: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .ref-grid { grid-template-columns: repeat(3, 1fr); }
  .life-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: 62px; left: 0; right: 0;
    background: rgba(250, 246, 238, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 2px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 0; width: 100%; }
  .nav-cta { margin-top: 8px; text-align: center; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .project-grid { grid-template-columns: 1fr; }
  .ref-grid { grid-template-columns: repeat(2, 1fr); }
  .badge { display: none; }
  .photo-frame { width: 200px; height: 240px; }
  .blob { width: 240px; height: 240px; }
  .shape { display: none; }
}
