:root {
  --bg: #0b0e14;
  --bg-alt: #10141d;
  --surface: #151a24;
  --text: #e7ebf3;
  --text-dim: #9aa4b8;
  --border: #232a38;
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --max-width: 960px;
  --radius: 10px;
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --bg-alt: #f2f3f5;
  --surface: #ffffff;
  --text: #1a1d23;
  --text-dim: #5a6270;
  --border: #e4e6ea;
  --accent: #0f9488;
  --accent-dim: #0d7d73;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
:root[data-theme="light"] .site-header {
  background: rgba(250, 250, 250, 0.85);
}

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

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.nav a:hover {
  color: var(--text);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Hero */
.hero {
  padding: 96px 0 72px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #06251f;
}
.btn-primary:hover {
  opacity: 0.9;
}

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

/* Sections */
.section {
  padding: 72px 0;
}

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

.section-title {
  font-size: 1.6rem;
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}

.about-text {
  color: var(--text-dim);
  max-width: 680px;
  font-size: 1.05rem;
}

.stats-row {
  display: flex;
  gap: 48px;
  margin-top: 40px;
  flex-wrap: wrap;
}

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

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

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

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

.timeline-item {
  border-left: 2px solid var(--border);
  padding-left: 24px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.timeline-date {
  color: var(--text-dim);
  font-size: 0.85rem;
  white-space: nowrap;
}

.timeline-org {
  color: var(--accent-dim);
  font-weight: 600;
  margin: 4px 0 10px;
  font-size: 0.95rem;
}

.timeline-item ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
}

.timeline-item li {
  margin-bottom: 6px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.skill-group h3 {
  font-size: 0.95rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 14px;
  font-weight: 600;
}

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

.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.project-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.project-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0 0 16px;
}

/* Contact */
.contact-sub {
  color: var(--text-dim);
  margin-bottom: 24px;
}

.contact-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-weight: 600;
}

.contact-links a {
  color: var(--accent);
  transition: opacity 0.15s ease;
}
.contact-links a:hover {
  opacity: 0.75;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 640px) {
  .nav {
    display: none;
  }
  .hero {
    padding: 64px 0 48px;
  }
  .section {
    padding: 48px 0;
  }
}
