/* ═══════════════════════════════════════════════
   Design Tokens
   ═══════════════════════════════════════════════ */
:root {
  --primary:        #F9C74F;
  --primary-light:  #FFF9E6;
  --accent:         #F4A261;
  --bg:             #FFFFFF;
  --surface:        #FDFDF7;
  --text-primary:   #1A1A2E;
  --text-secondary: #4A4A68;
  --border:         #F0E9C8;

  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-pill: 999px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --shadow-md:  0 8px 24px rgba(0,0,0,.10);
  --shadow-lg:  0 16px 40px rgba(0,0,0,.14);

  --transition: 0.3s ease;

  --container: min(1100px, 100% - 3rem);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-secondary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

/* ═══════════════════════════════════════════════
   Utility
   ═══════════════════════════════════════════════ */
.container {
  width: var(--container);
  margin-inline: auto;
}

/* ═══════════════════════════════════════════════
   Scroll-reveal animation
   ═══════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.visible {
  animation: fadeUp 0.6s ease forwards;
}

/* stagger children when parent gets .visible */
.reveal.visible:nth-child(2) { animation-delay: 0.10s; }
.reveal.visible:nth-child(3) { animation-delay: 0.20s; }
.reveal.visible:nth-child(4) { animation-delay: 0.30s; }

/* ═══════════════════════════════════════════════
   Section shared styles
   ═══════════════════════════════════════════════ */
.section {
  padding-block: clamp(4rem, 10vw, 7rem);
}

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text-primary);
  margin-bottom: 2.5rem;
}

/* ═══════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  transition: box-shadow var(--transition), transform var(--transition), background-color var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background-color: var(--primary);
  color: var(--text-primary);
  border-color: var(--primary);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249,199,79,.3);
  transform: translateY(-2px);
}

.btn--ghost {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--primary);
  color: var(--text-primary);
  box-shadow: 0 0 0 4px rgba(249,199,79,.25);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════════ */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255,255,255,.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--transition);
}

.nav-wrapper.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color var(--transition);
}

.nav__logo:hover { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: calc(100svh - 64px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-light);
}

/* Floating blobs */
.hero__blobs { position: absolute; inset: 0; pointer-events: none; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: drift 12s ease-in-out infinite alternate;
}

.blob--1 {
  width: clamp(280px, 40vw, 520px);
  height: clamp(280px, 40vw, 520px);
  background: radial-gradient(circle, #F9C74F 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation-duration: 14s;
}

.blob--2 {
  width: clamp(200px, 28vw, 380px);
  height: clamp(200px, 28vw, 380px);
  background: radial-gradient(circle, #F4A261 0%, transparent 70%);
  bottom: 5%;
  left: -8%;
  animation-duration: 10s;
  animation-direction: alternate-reverse;
}

.blob--3 {
  width: clamp(140px, 18vw, 260px);
  height: clamp(140px, 18vw, 260px);
  background: radial-gradient(circle, #FFF3B0 0%, transparent 70%);
  top: 40%;
  left: 30%;
  animation-duration: 16s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -20px) scale(1.06); }
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-block: 5rem;
}

.hero__eyebrow {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 1rem;
}

/* Animated underline on the highlighted name */
.hero__name-highlight {
  position: relative;
  display: inline-block;
}

.hero__name-highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 0;
  height: 6px;
  background-color: var(--primary);
  border-radius: 3px;
  z-index: -1;
  animation: underlineGrow 1s 0.5s ease forwards;
}

@keyframes underlineGrow {
  to { width: 100%; }
}

.hero__role {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ═══════════════════════════════════════════════
   About
   ═══════════════════════════════════════════════ */
.about { background-color: var(--bg); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__bio p + p { margin-top: 1rem; }

.skills__heading {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  background-color: var(--primary);
  color: var(--text-primary);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0;
  transform: scale(0.85);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skill-tag.popped {
  animation: tagPop 0.4s ease forwards;
}

.skill-tag:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px rgba(249,199,79,.4);
}

/* AI-stack tags — amber outline + bold to distinguish from regular tags */
.skill-tag--ai {
  border: 2px solid var(--accent);
  font-weight: 600;
}

@keyframes tagPop {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════════════
   Resume
   ═══════════════════════════════════════════════ */
.resume {
  background-color: var(--surface);
}

.resume__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

/* Timeline */
.timeline { position: relative; }

.timeline__heading {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.timeline__line {
  position: absolute;
  top: 3rem;
  left: 6px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  border-radius: 2px;
}

.timeline__entry {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
}

.timeline__dot {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
  margin-top: 4px;
}

.timeline__role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.timeline__meta {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.timeline__desc {
  font-size: 0.88rem;
  line-height: 1.6;
}

.resume__download {
  margin-top: 2.5rem;
  text-align: center;
}

/* ═══════════════════════════════════════════════
   Social / Contact
   ═══════════════════════════════════════════════ */
.social { background-color: var(--bg); text-align: center; }

.social__tagline {
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

.social__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  justify-items: center;
}

.social__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.75rem 1.25rem;
  background-color: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  width: 100%;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}

.social__card:hover,
.social__card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

/* Featured GitHub card */
.social__card--featured {
  grid-column: span 2;
  flex-direction: row;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 2.5rem;
  background-color: var(--primary-light);
  border-color: var(--primary);
}

.social__card--featured .social__label {
  font-size: 1.1rem;
}

.social__icon { color: var(--text-primary); }

.social__label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.social__handle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════ */
.footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: 1.75rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__credit {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer__nav {
  display: flex;
  gap: 1.5rem;
}

.footer__link {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer__link:hover { color: var(--text-primary); }

/* ═══════════════════════════════════════════════
   Responsive — 768px (tablet / mobile)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Nav */
  .nav__hamburger { display: flex; }

  .nav__links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, box-shadow 0.35s ease;
    box-shadow: none;
  }

  .nav__links.open {
    max-height: 240px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
  }

  .nav__link {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  .nav__link::after { display: none; }

  /* About */
  .about__grid { grid-template-columns: 1fr; gap: 2rem; }

  /* Resume */
  .resume__grid { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Social */
  .social__grid { grid-template-columns: 1fr; }
  .social__card--featured { grid-column: span 1; }

  /* Footer */
  .footer__inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .social__card--featured { flex-direction: column; }

  .hero__ctas { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════
   Reduced motion
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
