:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #1c1c1c;
  --surface-3: #111111;
  --surface-4: #242424;
  --surface-5: #0b0b0b;
  --text: #e8e6e3;
  --text-muted: #9a9590;
  --accent: #c9a227;
  --accent-soft: rgba(201, 162, 39, 0.15);
  --border: #2d2a26;
  --text-dim: #44444e;
  --transition: 0.25s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-name {
  font-family: "DM Serif Display", serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
}

.navbar-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.navbar-links a.is-active {
  color: var(--accent);
}

/* Main content */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
}

/* Hero */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 4rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.7;
}

.hero-orb--1 {
  width: min(80vw, 520px);
  height: min(80vw, 520px);
  top: -15%;
  left: -10%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.85) 0%, rgba(201, 162, 39, 0.35) 40%, transparent 70%);
}

.hero-orb--2 {
  width: min(60vw, 380px);
  height: min(60vw, 380px);
  top: 20%;
  right: -5%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.7) 0%, rgba(201, 162, 39, 0.25) 45%, transparent 70%);
}

.hero-orb--3 {
  width: min(50vw, 320px);
  height: min(50vw, 320px);
  bottom: -5%;
  left: 30%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.5) 0%, rgba(201, 162, 39, 0.2) 50%, transparent 75%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-role {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.hero-name {
  font-family: "DM Serif Display", serif;
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0;
  line-height: 1.5;
}

.hero-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.hero-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
  line-height: 0;
}

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

.hero-links svg {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

.scroll-indicator {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    animation: hero-enter 1.1s 0.8s ease both;
    transition: color var(--transition);
}

.scroll-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, var(--text-dim), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 4.5rem;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: max(1.5rem, 25vw);
  padding-right: max(1.5rem, 25vw);
}

#summary {
  background: var(--surface-2);
  margin-top: -6rem;
  padding-top: calc(2rem + 4rem);
  padding-bottom: calc(2rem + 4rem);
}

#experience {
  background: var(--surface-3);
}

#skills {
  background: var(--surface-4);
}

#contact {
  background: var(--surface-5);
}

section:last-of-type {
  border-bottom: none;
}

.section-id {
  display: block;
  scroll-margin-top: 4.5rem;
}

h1 {
  font-family: "DM Serif Display", serif;
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 3rem;
}

h2 {
  font-family: "DM Serif Display", serif;
  font-size: 2.25rem;
  font-weight: 400;
  margin: 0 0 1.5rem;
  color: var(--accent);
}

.summary p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  max-width: 60ch;
}

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

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

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-card {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-3);
}

.stat-number {
  font-family: "DM Serif Display", serif;
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1.2;
}

.stat-number.stat-text {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.stat-plus {
  font-family: "DM Serif Display", serif;
  font-size: 1.75rem;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.hero-inner.fade-in {
  animation: fadeIn 1s 0.2s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll-triggered fade-in for job cards and stats */
.job.scroll-fade,
.about-stats.scroll-fade {
  opacity: 0;
  transform: translateY(24px);
}

.job.scroll-fade.is-visible,
.about-stats.scroll-fade.is-visible {
  animation: jobFadeIn 0.6s ease forwards;
}

@keyframes jobFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

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

  .about-stats {
    grid-template-columns: 1fr;
  }
}

/* Experience */
.job {
  margin-bottom: 2.5rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
}

.job:last-child {
  margin-bottom: 0;
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.job-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.job-company {
  font-weight: 500;
  color: var(--accent);
}

.job-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.job ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.job li {
  margin-bottom: 0.5rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 16px;
  }

.timeline-tags span {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 10px;
    letter-spacing: 0.02em;
    transition: color var(--transition), border-color var(--transition);
  }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.skill-group h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.skill-group p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}

/* Contact */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.contact-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.contact-list a:hover {
  color: var(--text);
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.contact-list .contact-icon {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .navbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar-links {
    gap: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  main {
    padding-top: 5rem;
  }

  #summary {
    margin-top: -5rem;
    padding-top: calc(3rem + 5rem);
    padding-bottom: calc(3rem + 5rem);
  }

  .hero-name {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
}
