/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:         #f5f4f0;
  --bg-alt:     #eeecea;
  --surface:    #ffffff;
  --border:     #dddbd5;
  --text:       #1a1917;
  --text-muted: #706e68;
  --accent:     #1d4ed8;
  --accent-hover: #1e40af;
  --accent-light: #eff3ff;
  --tag-bg:     #e8e6e0;
  --tag-text:   #4a4843;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Geist', system-ui, sans-serif;
  --font-mono:    'Geist Mono', 'Courier New', monospace;

  --max-w: 1100px;
  --nav-h: 68px;
  --radius: 10px;
  --radius-lg: 16px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

img { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(245, 244, 240, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

#navbar.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--tag-bg);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--accent);
  color: #fff;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem 1.5rem;
  gap: 0.25rem;
  border-top: 1px solid var(--border);
}

.nav-mobile a {
  text-decoration: none;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.nav-mobile a:hover { color: var(--text); }

.nav-mobile.open { display: flex; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

/* ============================================================
   BUTTONS & CHIPS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s var(--ease);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s, transform 0.15s var(--ease);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  padding: 0.3rem 0.75rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 5px;
  border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s;
}

.chip:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: #c7d6fb;
}

.chip.chip-sm {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="400"] { transition-delay: 0.4s; }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 5rem;
  padding-left: 2rem;
  padding-right: 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 5rem;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-name em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-links {
  display: flex;
  gap: 1.5rem;
}

.hero-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.hero-links a:hover { color: var(--accent); }

/* Photo */
.hero-photo-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-photo-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  gap: 0.5rem;
  padding: 2rem;
  text-align: center;
}

.photo-placeholder span {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.photo-placeholder p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--border);
  word-break: break-all;
}

/* Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  background: var(--surface);
  padding: 1rem;
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-plus {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-text p:last-child { margin-bottom: 0; }

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.highlight-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.highlight-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.highlight-card strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.highlight-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============================================================
   EXPERIENCE / TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 1.5px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
  padding-left: 2rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 0.45rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--accent);
}

.timeline-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline-location {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.timeline-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
  font-size: 0.8rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: #c7d6fb;
  box-shadow: 0 12px 40px rgba(29, 78, 216, 0.08);
}

.project-card.featured {
  grid-column: span 2;
  border-color: #c7d6fb;
  background: linear-gradient(135deg, #f8f9ff 0%, var(--surface) 60%);
}

.project-card-inner {
  padding: 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid #c7d6fb;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

.project-links-top {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.project-links-top a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.project-links-top a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.project-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-wrap {
  max-width: 680px;
}

.contact-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

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

.contact-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-photo-frame {
    max-width: 320px;
  }

  .hero-photo-wrap {
    order: -1;
    align-items: flex-start;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; }

  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  section { padding: 4rem 0; }

  .hero-name { font-size: 3rem; }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .timeline {
    padding-left: 0.75rem;
  }

  .timeline-item {
    padding-left: 1.5rem;
  }

  .timeline-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
