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

:root {
  --bg: #0b0f1a;
  --bg2: #111827;
  --bg3: #1a2235;
  --accent: #4ade80;
  --accent2: #22d3ee;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: rgba(255,255,255,0.08);
  --card: rgba(255,255,255,0.04);
  --overlay: rgba(255,255,255,0.05);
  --nav-bg: rgba(11,15,26,0.85);
}

:root[data-theme="light"] {
  --bg: #f7f8fa;
  --bg2: #eef1f5;
  --bg3: #e4e8ee;
  --accent: #15803d;
  --accent2: #0e7490;
  --text: #10151f;
  --muted: #55606e;
  --border: rgba(15,23,42,0.10);
  --card: rgba(15,23,42,0.03);
  --overlay: rgba(15,23,42,0.05);
  --nav-bg: rgba(247,248,250,0.85);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 5vw;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.85rem;
  letter-spacing: 0.05em; transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.theme-toggle {
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 50%; width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; line-height: 1; transition: border-color 0.2s, color 0.2s;
  padding: 0; flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 10rem 5vw 6rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(74,222,128,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,222,128,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow {
  position: absolute; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(74,222,128,0.08) 0%, transparent 70%);
  top: 10%; right: -10%; z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 3rem;
  width: 100%;
}
.hero-content { flex: 1; max-width: 600px; }
.hero-photo {
  flex-shrink: 0;
  position: relative;
  width: 450px; height: 450px;
  margin-right: 4rem;
}
.hero-photo-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
}
.hero-photo-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.hero-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  border: 1px solid rgba(74,222,128,0.3);
  padding: 0.3rem 0.9rem;
  border-radius: 2rem;
  margin-bottom: 2rem;
  letter-spacing: 0.08em;
}
h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.08;
  font-weight: 400;
  margin-bottom: 1.5rem;
}
h1 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem; color: var(--muted);
  max-width: 520px; margin-bottom: 2.5rem; line-height: 1.8;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  border-radius: 0.4rem;
  font-size: 0.88rem; font-weight: 500; text-decoration: none;
  transition: all 0.2s; cursor: pointer; border: none;
  font-family: 'DM Sans', sans-serif;
}
.btn-primary {
  background: var(--accent); color: #0b0f1a;
}
.btn-primary:hover { background: #86efac; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── SECTIONS ── */
section { padding: 6rem 5vw; min-height: calc(100vh - 70px); }
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; color: var(--accent);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400; margin-bottom: 3rem; line-height: 1.2;
}
.divider { border: none; border-top: 1px solid var(--border); }

/* ── ABOUT ── */
#about { background: var(--bg2); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}
.about-text p { color: var(--muted); margin-bottom: 1.2rem; font-size: 1rem; }
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.stat-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 1.5rem;
}
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2.4rem; color: var(--accent); line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label { font-size: 0.82rem; color: var(--muted); }

/* ── SKILLS ── */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.skill-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 1.5rem 1.75rem;
  transition: border-color 0.2s;
}
.skill-card:hover { border-color: rgba(74,222,128,0.3); }
.skill-card h3 {
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem; font-weight: 500;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; color: var(--muted);
  background: var(--overlay);
  border: 1px solid var(--border);
  padding: 0.25rem 0.7rem; border-radius: 0.25rem;
}

/* ── EXPERIENCE ── */
#experience { background: var(--bg2); }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0.4rem; bottom: 0;
  width: 1px; background: var(--border);
}
.tl-item { position: relative; margin-bottom: 3.5rem; }
.tl-item::before {
  content: ''; position: absolute; left: -2rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); top: 0.45rem;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.2);
}
.tl-period {
  font-family: 'DM Mono', monospace;
  font-size: 0.73rem; color: var(--accent); margin-bottom: 0.3rem;
}
.tl-role {
  font-size: 1.05rem; font-weight: 500; margin-bottom: 0.2rem;
}
.tl-org { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }
.tl-bullets { list-style: none; }
.tl-bullets li {
  color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem;
  padding-left: 1.1rem; position: relative;
}
.tl-bullets li::before {
  content: '→'; position: absolute; left: 0; color: var(--accent); font-size: 0.75rem;
}
.highlight { color: var(--accent); font-weight: 500; }

/* ── PROJECTS ── */
.pub-list { display: flex; flex-direction: column; gap: 1.25rem; }
.pub-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 1.5rem 1.75rem;
  display: flex; gap: 1.5rem; align-items: flex-start;
  transition: border-color 0.2s;
}
.pub-card:hover { border-color: rgba(74,222,128,0.3); }
.pub-year {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; color: var(--accent);
  min-width: 48px; padding-top: 0.2rem;
}
.pub-title { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.35rem; }
.pub-venue { font-size: 0.82rem; color: var(--muted); }
.pub-badge {
  display: inline-block; font-size: 0.7rem;
  padding: 0.15rem 0.6rem; border-radius: 2rem;
  margin-left: 0.5rem; vertical-align: middle;
}
.badge-sub { background: var(--overlay); color: var(--muted); border: 1px solid var(--border); }
.badge-prep { background: rgba(34,211,238,0.1); color: var(--accent2); border: 1px solid rgba(34,211,238,0.2); }
.badge-pub { background: rgba(74,222,128,0.12); color: var(--accent); border: 1px solid rgba(74,222,128,0.25); }

/* ── AWARDS ── */
#awards { background: var(--bg2); }
.awards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.award-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.award-icon {
  width: 36px; height: 36px; border-radius: 0.5rem;
  background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px;
}
.award-name { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.2rem; }
.award-org { font-size: 0.78rem; color: var(--muted); }

/* ── MEDIA LIST ── */
.media-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.media-list li {
  padding-left: 1.1rem;
  position: relative;
  font-size: 0.9rem;
}
.media-list li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--accent); font-size: 0.75rem;
  top: 0.2rem;
}
.media-list a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.media-list a:hover { color: var(--accent); }
.media-name {
  display: inline;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}
.media-sub {
  display: inline;
  font-size: 0.9rem;
  color: var(--muted);
}
.media-sub::before { content: ' · '; }

/* ── CONTACT ── */
.contact-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.contact-text p { color: var(--muted); font-size: 1rem; margin-bottom: 1.5rem; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-link {
  display: flex; align-items: center; gap: 1rem;
  text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 0.6rem; padding: 1rem 1.25rem;
  transition: all 0.2s;
}
.contact-link:hover { border-color: rgba(74,222,128,0.4); color: var(--accent); }
.contact-link svg { flex-shrink: 0; opacity: 0.6; }
.contact-link:hover svg { opacity: 1; }
.cl-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.1rem; }
.cl-value { font-size: 0.9rem; font-weight: 500; }

/* ── FOOTER ── */
footer {
  text-align: center; padding: 2.5rem 5vw;
  border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--muted);
  font-family: 'DM Mono', monospace;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .about-grid, .contact-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .nav-links { display: none; }
  .hero-photo { display: none; }
  section { min-height: auto; }
}
