:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-soft: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --brand: #38bdf8;
  --brand-2: #22c55e;
  --danger: #ef4444;
  --white: #ffffff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.14), transparent 28%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
  width: min(1120px, 92%);
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
  font-size: 1.25rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.section {
  width: min(1120px, 92%);
  margin: 0 auto;
  padding: 86px 0;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  color: var(--brand);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-bottom: 0.7rem;
}

h1,
h2,
h3 {
  line-height: 1.1;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin-bottom: 1rem;
}

h1 span {
  color: var(--brand);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 680px;
}

.hero-actions,
.audio-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.88rem 1.25rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

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

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #031423;
  box-shadow: 0 14px 32px rgba(56, 189, 248, 0.22);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.32);
}

.profile-card,
.card,
.project-card,
.section-audio-controls {
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-card {
  padding: 1.5rem;
  text-align: center;
}

.profile-photo {
  width: 220px;
  height: 220px;
  margin: 0 auto 1.2rem;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(56, 189, 248, 0.45);
}

.profile-card p,
.card p,
.project-card p,
.section-audio-controls p {
  color: var(--muted);
}

.status {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.5rem 0.8rem;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.two-columns,
.academic-grid,
.projects-grid,
.contact-grid {
  display: grid;
  gap: 1.25rem;
}

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

.academic-grid {
  grid-template-columns: repeat(4, 1fr);
}

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

.card {
  padding: 1.4rem;
}

.card ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.section-title {
  margin-bottom: 1.6rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.tags span {
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.11);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 0.84rem;
  font-weight: 700;
}

.project-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.45);
}

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: var(--panel-soft);
}

.project-body {
  padding: 1.3rem;
}

.section-audio-controls {
  margin-top: 1.25rem;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(34, 197, 94, 0.08)),
    rgba(17, 24, 39, 0.78);
}

.audio-label {
  color: #bae6fd !important;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

.voice-selector {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.voice-selector label {
  font-weight: 800;
  color: var(--text);
}

.voice-selector select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0.82rem 0.9rem;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  outline: none;
}

.voice-selector select:focus {
  border-color: rgba(56, 189, 248, 0.65);
}

.voice-selector small {
  color: var(--muted);
  line-height: 1.5;
}

.audio-buttons.compact {
  margin-top: 0.8rem;
  gap: 0.65rem;
}

.audio-buttons.compact .btn {
  padding: 0.72rem 0.95rem;
  font-size: 0.9rem;
}

.audio-status {
  margin-top: 0.85rem;
  font-weight: 700;
}

.contact-item {
  padding: 1rem;
  text-align: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--brand);
  font-weight: 800;
}

footer {
  width: min(1120px, 92%);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
  text-align: center;
}

.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 0.95rem;
  background: var(--brand);
  color: #031423;
  font-weight: 900;
  cursor: pointer;
}

.scroll-top.show {
  display: block;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .hero,
  .two-columns,
  .academic-grid,
  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 4%;
    right: 4%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
  }

  .nav-links.open {
    display: flex;
  }

  .academic-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 64px 0;
  }

  .profile-photo {
    width: 180px;
    height: 180px;
  }

  .audio-buttons.compact .btn {
    width: 100%;
  }
}
