:root {
  --bg: #0a0b0f;
  --bg-alt: #111318;
  --surface: #161922;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --text-muted: #8b92a5;
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.12);
  --accent-glow: rgba(94, 234, 212, 0.25);
  --gradient-start: #5eead4;
  --gradient-end: #818cf8;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 72px;
  --max-w: 1120px;
}

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

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

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

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

ul {
  list-style: none;
}

/* Header */
.site-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 1.5rem;
  background: rgba(10, 11, 15, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

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

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

.nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.nav-cta {
  padding: 0.5rem 1rem;
  background: var(--accent-dim);
  color: var(--accent) !important;
  border-radius: 8px;
  border: 1px solid rgba(94, 234, 212, 0.2);
}

.nav-cta:hover {
  background: rgba(94, 234, 212, 0.2);
}

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

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--header-h) + 3rem) 1.5rem 4rem;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin-bottom: 2rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--gradient-start), #2dd4bf);
  color: #0a0b0f;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-alt);
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

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

/* Code window */
.hero-visual {
  display: flex;
  justify-content: center;
}

.code-window {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 80px var(--accent-glow);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.code-window-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.code-window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.code-window-bar span:first-child { background: #ff5f57; }
.code-window-bar span:nth-child(2) { background: #febc2e; }
.code-window-bar span:nth-child(3) { background: #28c840; }

.code-block {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-block .kw { color: #c792ea; }
.code-block .type { color: #82aaff; }
.code-block .str { color: #c3e88d; }

/* Sections */
.section {
  padding: 5rem 1.5rem;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

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

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.about-lead {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.about-details p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.timeline-item:first-child {
  padding-top: 0;
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.timeline-meta time {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.timeline-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.timeline-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.timeline-body ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-body li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.skill-group h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

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

.tags span {
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.tags span:hover {
  border-color: rgba(94, 234, 212, 0.3);
  color: var(--text);
}

/* Credentials */
.credentials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.credential-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.credential-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.credential-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.credential-list li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.credential-sub {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.15rem;
}

/* Contact */
.contact-section {
  text-align: center;
}

.contact-inner {
  max-width: 720px;
}

.contact-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.contact-card:hover {
  border-color: rgba(94, 234, 212, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.contact-icon {
  font-size: 1.25rem;
  font-family: var(--font-mono);
  color: var(--accent);
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.contact-value {
  font-size: 0.85rem;
  font-weight: 500;
  word-break: break-all;
}

/* Footer */
.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.site-footer strong {
  color: var(--accent);
  font-weight: 500;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 1rem;
    border-radius: 8px;
  }

  .nav a:hover {
    background: var(--surface);
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.open span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle.open span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--header-h) + 2rem);
  }

  .hero-visual {
    order: -1;
  }

  .code-window {
    max-width: 100%;
  }

  .hero-stats {
    gap: 1.5rem;
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .skills-grid,
  .credentials-grid,
  .contact-links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .code-window { animation: none; }
  .timeline-item { opacity: 1; transform: none; }
  .btn:hover, .contact-card:hover { transform: none; }
}
