/* ========== Tokens ========== */
:root {
  --bg: #0b0d12;
  --bg-elevated: #12151c;
  --bg-card: #161a24;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f3f7;
  --text-muted: #9aa3b5;
  --text-soft: #6b7385;
  --accent: #c8f542;
  --accent-dim: rgba(200, 245, 66, 0.12);
  --accent-2: #7dd3fc;
  --warm: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --max: 1120px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* ========== Atmosphere ========== */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
}

.glow-1 {
  width: 520px;
  height: 520px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(200, 245, 66, 0.14), transparent 70%);
}

.glow-2 {
  width: 480px;
  height: 480px;
  bottom: 10%;
  left: -120px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.1), transparent 70%);
}

/* ========== Header ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(11, 13, 18, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s;
}

.header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(11, 13, 18, 0.9);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-cta {
  background: var(--accent) !important;
  color: #0b0d12 !important;
  font-weight: 600 !important;
  margin-left: 8px;
}

.nav-cta:hover {
  filter: brightness(1.05);
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ========== Layout ========== */
main {
  position: relative;
  z-index: 1;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 12vw, 120px) clamp(20px, 4vw, 48px);
}

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

.section-label.light {
  color: rgba(200, 245, 66, 0.85);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 18ch;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 48ch;
  margin-bottom: 48px;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #0b0d12;
}

.btn-primary:hover {
  filter: brightness(1.06);
}

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

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost-light {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1rem;
}

/* ========== Hero ========== */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(48px, 10vw, 100px)) clamp(20px, 4vw, 48px) clamp(64px, 10vw, 100px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(200, 245, 66, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(200, 245, 66, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(200, 245, 66, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(200, 245, 66, 0);
  }
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero-title .line {
  display: block;
}

.hero-title .accent {
  color: var(--accent);
  font-style: italic;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 42ch;
  margin-bottom: 36px;
  line-height: 1.65;
}

.hero-sub strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 64px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 520px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* ========== About ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.about-copy h2 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  max-width: 18ch;
}

.about-copy p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.about-copy em {
  color: var(--accent);
  font-style: italic;
  font-family: var(--serif);
  font-size: 1.15em;
}

.about-copy strong {
  color: var(--text);
  font-weight: 600;
}

.about-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.about-card-inner {
  background: linear-gradient(160deg, var(--bg-card), #10141c);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 32px 28px;
  text-align: center;
}

.avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), #8bc34a);
  color: #0b0d12;
  box-shadow: 0 12px 40px rgba(200, 245, 66, 0.2);
}

.about-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.about-card .role {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.quick-facts {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quick-facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.quick-facts li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.quick-facts span {
  color: var(--text-soft);
}

.quick-facts strong {
  font-weight: 600;
  text-align: right;
}

/* ========== Skills ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s;
}

.skill-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.skill-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(200, 245, 66, 0.08), var(--bg-card) 50%);
  border-color: rgba(200, 245, 66, 0.22);
}

.skill-icon {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.9;
}

.skill-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
}

.skill-card.featured .tags span {
  background: var(--accent-dim);
  border-color: rgba(200, 245, 66, 0.2);
  color: #d4f76a;
}

/* ========== Experience ========== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.exp-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(24px, 4vw, 40px);
  transition: border-color 0.25s;
}

.exp-card:hover {
  border-color: var(--border-strong);
}

.exp-company {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--accent);
}

.exp-role {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: 999px;
}

.exp-body h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.25;
}

.exp-body > p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 1rem;
}

.exp-body ul {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-body ul li {
  position: relative;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.exp-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* ========== Approach ========== */
.approach .steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  position: relative;
  overflow: hidden;
}

.step::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.6;
}

.step-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.9;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========== Contact ========== */
.contact {
  padding-bottom: clamp(80px, 12vw, 120px);
}

.contact-panel {
  background: linear-gradient(145deg, #1a2210 0%, #12151c 45%, #0f1620 100%);
  border: 1px solid rgba(200, 245, 66, 0.18);
  border-radius: calc(var(--radius) + 12px);
  padding: clamp(40px, 7vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-panel::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(200, 245, 66, 0.12), transparent 65%);
  pointer-events: none;
}

.contact-panel h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 auto 16px;
  max-width: 16ch;
  position: relative;
}

.contact-panel > p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 40ch;
  margin: 0 auto 32px;
  position: relative;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
}

.contact-note {
  font-size: 0.9rem;
  color: var(--text-soft);
  position: relative;
}

/* ========== Footer ========== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px clamp(20px, 4vw, 48px);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* ========== Reveal animations ========== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    position: static;
  }

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

  .skill-card.featured {
    grid-column: span 2;
  }

  .exp-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .approach .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .menu-btn {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 20px 24px;
    background: rgba(11, 13, 18, 0.96);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s;
  }

  .nav.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 14px 16px;
  }

  .nav-cta {
    margin-left: 0 !important;
    text-align: center;
    margin-top: 8px;
  }

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

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

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .approach .steps {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pulse {
    animation: none;
  }
}
