/* ==========================================
   Design Tokens
   ========================================== */
:root {
  --bg: #0a0a0f;
  --surface: #14141b;
  --border: #1e1e2a;
  --accent: #7c3aed;
  --accent-light: #a855f7;
  --text: #e4e4e7;
  --text-secondary: #a1a1aa;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --radius-card: 8px;
  --radius-tag: 4px;
  --radius-pill: 9999px;
  --max-width: 1100px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #c084fc;
}

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

ul {
  list-style: none;
}

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

/* ==========================================
   Scroll Anchor
   ========================================== */
.scroll-anchor {
  position: relative;
  top: calc(var(--nav-height) * -1);
}

/* ==========================================
   Animations
   ========================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   Navbar
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s;
}

.navbar--scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: 0 1px 0 var(--border);
  backdrop-filter: blur(12px);
}

.navbar__container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.navbar__logo:hover {
  color: var(--accent-light);
}

.navbar__links {
  display: flex;
  gap: 32px;
}

.navbar__links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--text);
}

.navbar__links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 1px;
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

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

.navbar__toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.navbar__toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
  text-decoration: none;
}

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

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
}

.btn--primary:hover {
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.4);
  color: #fff;
}

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

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.btn--small {
  padding: 6px 16px;
  font-size: 13px;
}

/* ==========================================
   Hero
   ========================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 96px 24px 64px;
}

.hero__container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 64px;
}

.hero__content {
  flex: 1;
}

.hero__name {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.hero__title {
  font-size: 18px;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero__intro {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 540px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__image {
  flex-shrink: 0;
}

.hero__image img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border);
  box-shadow: 0 0 60px rgba(124, 58, 237, 0.15);
}

/* ==========================================
   Section
   ========================================== */
.section {
  padding: 96px 24px;
}

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

.section__container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
}

/* ==========================================
   Timeline (Education)
   ========================================== */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  padding-bottom: 40px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.timeline__item:first-child .timeline__dot {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
}

.timeline__content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline__header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.timeline__subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 4px;
}

.timeline__meta {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ==========================================
   Badge
   ========================================== */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--accent {
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.badge--secondary {
  background: rgba(161, 161, 170, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(161, 161, 170, 0.2);
}

/* ==========================================
   Card (generic)
   ========================================== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
}

.section--alt .card {
  background: var(--surface);
  border-color: var(--border);
}

.card__header {
  margin-bottom: 8px;
}

.card__header h3 {
  font-size: 18px;
  font-weight: 600;
}

.card__meta {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.card__subtitle {
  color: var(--accent-light);
  font-size: 14px;
  margin-bottom: 16px;
}

.card__desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 8px;
}

.card__list {
  margin-top: 12px;
  padding-left: 20px;
  list-style: disc;
}

.card__list li {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.card__list li::marker {
  color: var(--accent);
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  /*border-top: 1px solid var(--border);*/
}

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

.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.pub-card__content {
  padding: 28px 32px;
}

.pub-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pub-card__header h3 {
  font-size: 17px;
  font-weight: 600;
  flex: 1;
  min-width: 200px;
}

.pub-card__venue {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
}

.pub-card__desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.pub-card__links {
  display: flex;
  gap: 8px;
}

/* ==========================================
   Projects
   ========================================== */
.projects__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.section--alt .project-card {
  background: var(--surface);
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.08);
}

.project-card__title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-card__desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent-light);
  border-radius: var(--radius-tag);
  font-size: 12px;
  font-weight: 500;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.project-card__link:hover {
  color: var(--accent-light);
}

/* ==========================================
   Skills
   ========================================== */
.skills__grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.skills__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

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

.pill {
  display: inline-block;
  padding: 6px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s;
}

.pill:hover {
  border-color: var(--accent);
}

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

/* ==========================================
   Footer
   ========================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer__copy {
  color: var(--text-secondary);
  font-size: 13px;
}

.footer__top {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.footer__top:hover {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
}

/* ==========================================
   Responsive — Tablet (768px)
   ========================================== */
@media (min-width: 768px) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .awards__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================
   Responsive — Desktop (1024px)
   ========================================== */
@media (min-width: 1024px) {
  .hero__name {
    font-size: 64px;
  }
}

/* ==========================================
   Responsive — Mobile (< 768px)
   ========================================== */
@media (max-width: 767px) {
  .navbar__toggle {
    display: flex;
  }

  .navbar__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .navbar__links.open {
    display: flex;
  }

  .navbar__links a {
    display: block;
    padding: 12px 24px;
    font-size: 15px;
  }

  .navbar__links a.active::after {
    display: none;
  }

  .hero__container {
    flex-direction: column-reverse;
    text-align: center;
    gap: 32px;
  }

  .hero__name {
    font-size: 36px;
  }

  .hero__title {
    font-size: 16px;
  }

  .hero__intro {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__buttons {
    justify-content: center;
  }

  .hero__image img {
    width: 200px;
    height: 200px;
  }

  .section {
    padding: 64px 24px;
  }

  .section__title {
    font-size: 26px;
    margin-bottom: 32px;
  }

  .pub-card__content {
    padding: 20px;
  }

  .footer__top {
    position: static;
    transform: none;
    margin: 24px auto 0;
  }
}
