/* ============ TOKENS ============ */
:root {
  --bg: #fdf8ef;
  --bg-alt: #f6eedf;
  --surface: #ffffff;
  --ink: #1b1a2e;
  --muted: #5d5b72;
  --line: #1b1a2e;
  --coral: #ff6b4a;
  --teal: #2ec4b6;
  --yellow: #ffc93c;
  --violet: #8b5cf6;
  --pink: #ff8fab;
  --radius: 18px;
  --shadow: 5px 5px 0 var(--line);
  --shadow-lg: 8px 8px 0 var(--line);
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #14131f;
  --bg-alt: #1b1a2a;
  --surface: #222135;
  --ink: #f4f1ea;
  --muted: #b4b1c6;
  --line: #000000;
  --shadow: 5px 5px 0 #000;
  --shadow-lg: 8px 8px 0 #000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 40px; }

/* dotted background */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 12%, transparent) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  padding: 14px 26px; border: 2.5px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); cursor: pointer;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--line); }
.btn-primary { background: var(--coral); color: #fff; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.logo-mark {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--coral); color: #fff; border: 2.5px solid var(--line);
  border-radius: 12px; box-shadow: 3px 3px 0 var(--line); transform: rotate(-6deg);
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  font-weight: 500; padding: 8px 14px; border-radius: 999px; border: 2px solid transparent;
  transition: background .2s, border-color .2s;
}
.nav-links a:hover, .nav-links a.active { border-color: var(--line); background: var(--yellow); color: #1b1a2e; }
.nav-actions { display: flex; gap: 10px; }
.icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 2.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  cursor: pointer; box-shadow: 3px 3px 0 var(--line); transition: transform .15s;
}
.icon-btn:hover { transform: translate(-1px, -1px); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
.menu-btn { display: none; }

/* ============ HERO ============ */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-weight: 700; padding: 6px 14px; margin-bottom: 18px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 999px; box-shadow: 3px 3px 0 var(--line);
}
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); letter-spacing: -0.02em; margin-bottom: 14px; }
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::after {
  content: ""; position: absolute; left: -4px; right: -4px; bottom: 6%; height: 34%;
  background: var(--teal); z-index: -1; border-radius: 6px; transform: rotate(-1.5deg);
}
.role { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--coral); margin-bottom: 18px; }
.role .dot { color: var(--muted); margin: 0 6px; }
.lead { font-size: 1.05rem; margin-bottom: 12px; max-width: 60ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }

.hero-visual { display: flex; justify-content: center; }
.photo-frame { position: relative; width: min(340px, 80vw); aspect-ratio: 1; }
.photo-frame::before {
  content: ""; position: absolute; inset: -14px;
  background: linear-gradient(135deg, var(--coral), var(--yellow) 50%, var(--teal));
  border-radius: 42% 58% 55% 45% / 50% 40% 60% 50%;
  border: 2.5px solid var(--line);
  animation: blob 10s ease-in-out infinite;
}
@keyframes blob {
  0%, 100% { border-radius: 42% 58% 55% 45% / 50% 40% 60% 50%; }
  50% { border-radius: 58% 42% 45% 55% / 40% 58% 42% 60%; }
}
.photo {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 50%; border: 3px solid var(--line); background: var(--violet);
  display: grid; place-items: center;
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.initials { font-family: var(--font-head); font-weight: 700; font-size: 6rem; color: #fff; text-shadow: 5px 5px 0 var(--line); }
.badge {
  position: absolute; font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  padding: 8px 16px; border: 2.5px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); color: #1b1a2e;
}
.badge-exp { right: -10px; bottom: 6px; background: var(--yellow); transform: rotate(-4deg); z-index: 2; }
.sticker {
  position: absolute; z-index: 2; font-family: var(--font-head); font-weight: 700; font-size: .85rem;
  padding: 6px 12px; border: 2px solid var(--line); border-radius: 10px; box-shadow: 3px 3px 0 var(--line); color: #1b1a2e;
  animation: float 4s ease-in-out infinite;
}
.s1 { top: 4%; left: -8%; background: var(--pink); transform: rotate(-8deg); }
.s2 { top: 30%; right: -14%; background: var(--teal); animation-delay: -1.3s; }
.s3 { bottom: 18%; left: -12%; background: #fff; animation-delay: -2.6s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.stats {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 64px;
  background: var(--surface); border: 2.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.stats li { padding: 22px 24px; border-right: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent); }
.stats li:last-child { border-right: 0; }
.stats b { font-family: var(--font-head); font-size: 2.4rem; display: block; color: var(--coral); line-height: 1; }
.stats li:nth-child(2) b { color: var(--teal); }
.stats li:nth-child(3) b { color: var(--violet); }
.stats li:nth-child(4) b { color: #e0a800; }
.stats span { font-size: .92rem; color: var(--muted); }

/* ============ MARQUEE ============ */
.marquee {
  margin: 56px 0 0; background: var(--ink); color: var(--bg); overflow: hidden;
  border-block: 2.5px solid var(--line); transform: rotate(-1.2deg);
}
.marquee-track { display: flex; gap: 28px; width: max-content; padding: 14px 0; animation: scroll 28s linear infinite; }
.marquee-track span { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; white-space: nowrap; }
.marquee-track span:nth-child(even) { color: var(--yellow); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============ SECTIONS ============ */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); border-block: 2px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.kicker {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .85rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--coral); margin-bottom: 10px;
}
.section-head h2, .contact-text h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; position: relative; display: inline-block; }
.section-head h2::after {
  content: ""; display: block; height: 10px; margin: 8px auto 0; width: 70%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 5 Q10 0 20 5 T40 5' fill='none' stroke='%23ff6b4a' stroke-width='3'/%3E%3C/svg%3E") repeat-x;
}
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ============ TIMELINE ============ */
.timeline { position: relative; display: grid; gap: 28px; padding-left: 40px; }
.timeline::before {
  content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 3px;
  background: repeating-linear-gradient(to bottom, var(--ink) 0 10px, transparent 10px 18px);
}
.job { position: relative; }
.job.hidden { display: none; }
.job-dot {
  position: absolute; left: -40px; top: 26px; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--line); background: var(--accent);
}
.job.current .job-dot::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--accent);
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(1.5); } }
.job-card {
  background: var(--surface); border: 2.5px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: 6px 6px 0 var(--accent), 6px 6px 0 2.5px var(--line);
  transition: transform .2s, box-shadow .2s;
}
.job-card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--accent), 9px 9px 0 2.5px var(--line); }
.job-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-start; }
.job-company { font-size: 1.35rem; }
.job-role { font-weight: 700; color: var(--coral); font-family: var(--font-head); }
.job-date {
  font-size: .82rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  background: var(--accent); color: #1b1a2e; border: 2px solid var(--line);
}
.job-summary { margin: 12px 0 10px; color: var(--muted); }
.job-points { list-style: none; display: grid; gap: 8px; margin-bottom: 16px; }
.job-points li { position: relative; padding-left: 22px; font-size: .97rem; }
.job-points li::before { content: "▸"; position: absolute; left: 0; color: var(--coral); font-weight: 700; }
.job-points b { font-weight: 700; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-size: .8rem; font-weight: 500; padding: 4px 12px; border-radius: 999px;
  background: var(--bg-alt); border: 1.5px solid var(--line);
}

/* ============ PROJECTS ============ */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.project-card {
  background: var(--surface); border: 2.5px solid var(--line); border-radius: var(--radius); padding: 26px;
  box-shadow: 6px 6px 0 var(--c); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
  outline: 0;
}
.project-card { box-shadow: 6px 6px 0 var(--c), 6px 6px 0 2.5px var(--line); }
.project-card:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 10px 10px 0 var(--c), 10px 10px 0 2.5px var(--line); }
.c-coral { --c: var(--coral); } .c-teal { --c: var(--teal); } .c-yellow { --c: var(--yellow); } .c-violet { --c: var(--violet); }
.p-icon {
  width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.7rem; margin-bottom: 16px;
  background: var(--c); border: 2.5px solid var(--line); border-radius: 14px;
}
.project-card h3 { font-size: 1.3rem; }
.p-sub { font-weight: 700; font-size: .85rem; color: var(--coral); margin-bottom: 10px; }
.project-card > p:not(.p-sub) { color: var(--muted); font-size: .95rem; margin-bottom: 18px; flex: 1; }

/* ============ STACK ============ */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 18px; }
.tech {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 20px 12px; background: var(--surface); border: 2.5px solid var(--line); border-radius: 16px;
  box-shadow: 4px 4px 0 var(--line); transition: transform .2s, box-shadow .2s, background .2s;
}
.tech:hover { transform: translateY(-5px) rotate(-2deg); box-shadow: 6px 9px 0 var(--line); }
.tech:nth-child(4n+1):hover { background: color-mix(in srgb, var(--coral) 22%, var(--surface)); }
.tech:nth-child(4n+2):hover { background: color-mix(in srgb, var(--teal) 22%, var(--surface)); }
.tech:nth-child(4n+3):hover { background: color-mix(in srgb, var(--yellow) 30%, var(--surface)); }
.tech:nth-child(4n):hover { background: color-mix(in srgb, var(--violet) 22%, var(--surface)); }
.tech-ic { width: 48px; height: 48px; display: grid; place-items: center; }
.tech-ic img { width: 44px; height: 44px; object-fit: contain; }
.tech-ic .fallback {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-family: var(--font-head); font-weight: 700; font-size: .85rem;
}
.tech span { font-size: .88rem; font-weight: 500; }
:root[data-theme="dark"] .tech-ic img.invert-dark { filter: invert(1); }

.skills { margin-top: 72px; }
.skills-title { font-size: 1.6rem; text-align: center; margin-bottom: 28px; }
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.skill {
  padding: 20px 22px; border: 2.5px dashed var(--line); border-radius: 16px; background: var(--surface);
}
.skill.wide { grid-column: 1 / -1; }
.skill h4 { font-size: 1.05rem; margin-bottom: 6px; }
.skill p { color: var(--muted); font-size: .95rem; }

/* ============ EDUCATION ============ */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; max-width: 900px; margin-inline: auto; }
.edu-card {
  position: relative; background: var(--surface); border: 2.5px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px 28px; box-shadow: var(--shadow-lg);
}
.edu-year {
  position: absolute; top: -16px; right: 22px; font-family: var(--font-head); font-weight: 700;
  padding: 4px 14px; background: var(--teal); color: #1b1a2e; border: 2.5px solid var(--line); border-radius: 999px;
}
.edu-icon { font-size: 2.2rem; margin-bottom: 10px; }
.edu-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.edu-card p { color: var(--muted); margin-bottom: 14px; }
.gpa {
  display: inline-block; font-weight: 700; font-size: .85rem; padding: 4px 12px; border-radius: 8px;
  background: var(--yellow); color: #1b1a2e; border: 2px solid var(--line);
}

/* ============ CONTACT ============ */
.contact-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  background: var(--surface); border: 3px solid var(--line); border-radius: 28px; padding: 48px;
  box-shadow: 10px 10px 0 var(--coral), 10px 10px 0 3px var(--line);
}
.contact-text p { color: var(--muted); margin: 6px 0 26px; font-size: 1.05rem; }
.contact-list { display: grid; gap: 12px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--bg);
  transition: transform .15s, box-shadow .15s;
}
.contact-card:not(.static):hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--line); }
.contact-card small { display: block; color: var(--muted); font-size: .78rem; }
.contact-card b { font-size: .95rem; word-break: break-word; }
.c-ic {
  flex: none; width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.2rem;
  border: 2px solid var(--line); border-radius: 12px;
}
.ic-green { background: #b8f2c9; } .ic-blue { background: #bfdbfe; } .ic-dark { background: #e5e7eb; }
.ic-coral { background: #ffd0c4; } .ic-yellow { background: #ffe8a3; }

/* ============ FOOTER ============ */
.footer { border-top: 2.5px solid var(--line); padding: 28px 0; background: var(--bg-alt); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: .92rem; }
.to-top {
  width: 40px; height: 40px; display: grid; place-items: center; font-weight: 700;
  border: 2px solid var(--line); border-radius: 12px; background: var(--yellow); color: #1b1a2e; box-shadow: 3px 3px 0 var(--line);
}

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .hero-visual { order: -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(2) { border-right: 0; }
  .stats li:nth-child(-n+2) { border-bottom: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent); }
  .contact-box { grid-template-columns: 1fr; padding: 32px 24px; }
}
@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .nav-links {
    position: absolute; top: 70px; left: 16px; right: 16px; flex-direction: column; padding: 12px;
    background: var(--surface); border: 2.5px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .section { padding: 72px 0; }
  .skills-grid, .edu-grid { grid-template-columns: 1fr; }
  .edu-grid { gap: 36px; }
  .timeline { padding-left: 30px; }
  .timeline::before { left: 8px; }
  .job-dot { left: -30px; width: 22px; height: 22px; }
  .job-card { padding: 22px 20px; }
  .s2 { right: -4%; } .s1 { left: -2%; } .s3 { left: -4%; }
  .initials { font-size: 4.5rem; }
}
