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

/* Variables */
:root {
  --bg: #0d0d0d;
  --surface: #141414;
  --border: #222;
  --text: #d8d8d8;
  --muted: #888;
  --accent: #7b7bff;
  --accent-dim: rgba(123, 123, 255, 0.12);
  --green: #3ddc84;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Courier New', Courier, monospace;
  --max-width: 740px;
}

html { scroll-behavior: smooth; font-size: 18.5px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

strong { color: #fff; }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--green);
}

/* ── Nav ───────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.2s;
}
nav a:hover,
nav a.active { color: var(--green); text-decoration: none; }

/* ── Layout ────────────────────────────────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}
section:last-child { border-bottom: none; }

/* ── Section headers ───────────────────────────────── */
.section-header {
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.section-subheader {
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.prompt-symbol {
  color: var(--accent);
  font-family: var(--mono);
  user-select: none;
}

.section-cmd { color: var(--green); }

/* ── Hero ──────────────────────────────────────────── */
#hero {
  padding-top: 7rem;
  padding-bottom: 7rem;
}

.prompt-line {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  height: 1.4rem;
}

.typed { color: var(--green); }

.cursor {
  display: inline-block;
  color: var(--green);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

#hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.sub-tagline {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #aaa;
  margin-bottom: 0.5rem;
}

.location {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 2rem;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.5rem 1.2rem;
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; text-decoration: none; }

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

/* ── About ─────────────────────────────────────────── */
#about p {
  max-width: 62ch;
  color: var(--text);
  margin-bottom: 1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

.skill-group h3 {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.skill-group ul {
  list-style: none;
}

.skill-group li {
  font-size: 0.9rem;
  color: #e8a44a;
  padding: 0.15rem 0;
  font-family: var(--mono);
}
.skill-group li::before {
  content: '- ';
  color: var(--muted);
}

.credentials {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.5rem !important;
}

.personal-line {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0 !important;
}

/* ── Research ──────────────────────────────────────── */
.research-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.research-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.research-item:last-child { border-bottom: none; }

.research-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.research-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  border: 1px solid;
}

.badge-thesis {
  color: var(--accent);
  border-color: var(--accent);
}

.badge-ieee {
  color: #3572a5;
  border-color: #3572a5;
}

.badge-book {
  color: var(--green);
  border-color: var(--green);
}

.research-venue {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #aaa;
  flex: 1;
}

.research-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.2s;
}
.research-link:hover { color: var(--accent); text-decoration: none; }

.research-title {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.research-desc {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
  max-width: 62ch;
  margin-bottom: 0.4rem;
}

.research-stack {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #e8a44a;
}

/* ── Talks ─────────────────────────────────────────── */
.talks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.talks-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.talk-event {
  color: #aaa;
  font-size: 0.78rem;
  min-width: 10rem;
  flex-shrink: 0;
  transition: color 0.2s;
  text-decoration: none;
}
.talk-event:hover { color: var(--accent); }

.talk-title {
  color: var(--text);
  transition: color 0.2s;
  text-decoration: none;
}
.talk-title:hover { color: var(--accent); }

/* ── Contact ───────────────────────────────────────── */
#contact > p {
  color: #aaa;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.contact-label {
  color: #aaa;
  min-width: 6rem;
  font-size: 0.8rem;
}

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

/* ── Footer ────────────────────────────────────────── */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  display: flex;
  gap: 0.5rem;
}

.muted { color: var(--muted); }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 600px) {
  nav { padding: 0.7rem 1rem; }
  nav a { font-size: 0.7rem; }
  .nav-logo { font-size: 0.8rem; }
  nav ul { gap: 0.8rem; }
  .talk-event { min-width: 0; }
  .talks-list li { flex-direction: column; gap: 0.2rem; }
}
