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

:root {
  --bg-0: #070b17;
  --bg-1: #0f172a;
  --surface: #111a2f;
  --surface-2: #17233f;
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #4f8dff;
  --accent: #8b5cf6;
  --border: #26314a;
  --success: #22c55e;
  --radius: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at top right, rgba(79, 141, 255, 0.15), transparent 38%), var(--bg-0);
  color: var(--text);
  font-family: "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

.container {
  width: min(1200px, 100% - 3rem);
  margin: 0 auto;
}

.section {
  padding: 6rem 0;
  scroll-margin-top: 5.5rem;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.03));
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: 2.8rem;
}

.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

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

/* Navigation */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(8, 12, 25, 0.82);
  backdrop-filter: blur(12px);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
}

.nav-container {
  width: min(1250px, 100% - 2rem);
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  text-decoration: none;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-right: auto;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 4px auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

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

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(20, 30, 53, 0.6);
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.48rem 0.88rem;
  border-radius: 999px;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #dbeafe;
  background: linear-gradient(90deg, rgba(79, 141, 255, 0.28), rgba(139, 92, 246, 0.3));
}

.social-links {
  display: flex;
  gap: 0.8rem;
}

.social-link {
  color: var(--muted);
  transition: color 0.25s ease, transform 0.25s ease;
}

.social-link:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-top: 5rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 141, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 141, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: -2;
  animation: grid-slide 20s linear infinite;
}

@keyframes grid-slide {
  from { transform: translate(0, 0); }
  to { transform: translate(44px, 44px); }
}

.orb,
.shape {
  position: absolute;
  pointer-events: none;
}

.orb {
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite;
}

.orb1 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(79, 141, 255, 0.9), transparent 65%);
  top: -140px;
  right: -60px;
}

.orb2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.7), transparent 65%);
  bottom: 0;
  left: -60px;
  animation-delay: -9s;
}

.orb3 {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.5), transparent 70%);
  top: 55%;
  left: 62%;
  animation-delay: -5s;
}

.shape {
  border: 1px solid rgba(148, 163, 184, 0.28);
  animation: spin 24s linear infinite;
}

.shape1 {
  width: 210px;
  height: 210px;
  border-radius: 40% 60% 55% 45%;
  top: 17%;
  left: 10%;
}

.shape2 {
  width: 140px;
  height: 140px;
  border-radius: 56% 44% 38% 62%;
  bottom: 13%;
  right: 20%;
  animation-direction: reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(28px, -22px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #f8fafc, #93c5fd 40%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: #cbd5e1;
  font-size: clamp(1rem, 2.7vw, 1.3rem);
  margin: 0 auto 2rem;
  max-width: 660px;
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.hero-social-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(17, 26, 47, 0.72);
  color: #dbeafe;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.hero-social-button:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.8);
  background: rgba(79, 141, 255, 0.2);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.cta-button,
.cta-secondary,
.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.9rem 1.4rem;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cta-button,
.contact-button {
  background: linear-gradient(110deg, var(--primary), var(--accent));
  color: #f8fbff;
}

.cta-secondary {
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(17, 26, 47, 0.72);
}

.cta-button:hover,
.cta-secondary:hover,
.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* Content sections */
.about-content,
.research-list,
.contact-content {
  max-width: 850px;
  margin: 0 auto;
}

.about-text,
.project-description,
.research-description,
.contact-text,
.timeline-item p,
.cert-meta,
.cert-note {
  color: var(--muted);
}

.about-text {
  font-size: 1.07rem;
  margin-bottom: 1rem;
}

.tag {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  padding: 0.38rem 0.78rem;
  font-size: 0.85rem;
  color: #bfdbfe;
  background: rgba(79, 141, 255, 0.12);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.project-card,
.research-item,
.edu-card {
  background: linear-gradient(160deg, rgba(23, 35, 63, 0.85), rgba(17, 26, 47, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover,
.research-item:hover,
.edu-card:hover {
  transform: translateY(-4px);
  border-color: rgba(147, 197, 253, 0.6);
}

.project-header,
.research-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.project-title,
.research-title {
  font-size: 1.18rem;
}

.project-year,
.timeline-meta,
.research-meta {
  color: #cbd5e1;
  font-size: 0.86rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0;
}

.project-link {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}

.project-link:hover {
  color: #bfdbfe;
}

/* Skills icon section */
.skills-icon-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.skill-icon-pill {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(79, 141, 255, 0.12);
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.skill-icon-pill:hover {
  transform: translateY(-3px);
  border-color: rgba(147, 197, 253, 0.65);
  background: rgba(79, 141, 255, 0.2);
}

.skill-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.skill-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0b1224;
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.35rem 0.45rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.skill-icon-pill:hover .skill-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Education + certifications */
.education-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
}

.edu-heading {
  margin-bottom: 1rem;
}

.timeline {
  position: relative;
  padding-left: 0.7rem;
  display: grid;
  gap: 1.2rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.8rem;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--primary), var(--accent));
  margin-top: 0.42rem;
  box-shadow: 0 0 0 5px rgba(79, 141, 255, 0.13);
}

.cert-grid {
  display: grid;
  gap: 0.8rem;
}

.cert-item {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(7, 11, 23, 0.45);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.85rem;
  align-items: center;
}

.cert-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  background: #0b1224;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.cert-content {
  display: grid;
  gap: 0.25rem;
}

.cert-name {
  color: #e2e8f0;
  font-weight: 600;
}

.cert-link {
  display: inline-block;
  width: fit-content;
  margin-top: 0.3rem;
  text-decoration: none;
  color: #93c5fd;
  font-size: 0.88rem;
  font-weight: 600;
}

.cert-link:hover {
  color: #bfdbfe;
}

.cert-note {
  margin-top: 0.9rem;
  font-size: 0.85rem;
}

.research-list {
  display: grid;
  gap: 1rem;
}

.research-status {
  white-space: nowrap;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
  height: fit-content;
}

.contact-content {
  text-align: center;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.contact-button.secondary {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.38);
  color: #dbeafe;
}

.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 1.7rem 0;
  color: var(--muted);
  text-align: center;
}

/* Responsive */
@media (max-width: 990px) {
  .education-layout {
    grid-template-columns: 1fr;
  }
}

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

  .nav-container {
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-links {
    width: 100%;
    order: 10;
    border-radius: 14px;
    justify-content: flex-start;
    flex-wrap: wrap;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border: 1px solid transparent;
    transition: max-height 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
  }

  .nav-links.open {
    max-height: 250px;
    padding: 0.55rem;
    border-color: rgba(148, 163, 184, 0.2);
    margin-top: 0.2rem;
  }

  .hero {
    padding-top: 6rem;
  }

  .section {
    padding: 4.8rem 0;
  }

  .cert-item {
    grid-template-columns: 1fr;
  }
}
