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

html,
body {
  height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #050509;
  color: #f7f7ff;
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ---------- COLORS & TOKENS ---------- */
:root {
  --bg: #050509;
  --bg-elevated: rgba(18, 18, 28, 0.95);
  --accent-blue: #6cc4ff;
  --accent-purple: #9a5bff;
  --accent-gradient: linear-gradient(
    120deg,
    var(--accent-blue),
    var(--accent-purple)
  );
  --text-main: #f7f7ff;
  --text-muted: #a3a7c2;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --glass-bg: rgba(10, 10, 20, 0.7);
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.75);
  --transition-fast: 180ms ease-out;
  --transition-med: 240ms ease-out;
  --container-width: 1100px;
}

/* ---------- BACKGROUND EFFECTS ---------- */

#bg-particles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.bg-gradient {
  position: fixed;
  inset: -20%;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(108, 196, 255, 0.12),
      transparent 50%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(154, 91, 255, 0.16),
      transparent 55%
    );
  opacity: 0.9;
  z-index: -2;
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  z-index: -1;
}

/* ---------- LAYOUT ---------- */

main {
  position: relative;
  z-index: 1;
}

.section {
  padding: 5.5rem 1.5rem;
}

.section:nth-of-type(1) {
  padding-top: 7.5rem;
}

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

/* ---------- NAVBAR ---------- */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0.9rem;
  z-index: 50;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nav-inner {
  width: min(1120px, 100% - 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(
      120deg,
      rgba(108, 196, 255, 0.18),
      rgba(154, 91, 255, 0.12)
    ),
    rgba(5, 5, 10, 0.88);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: #050509;
}

.logo-text {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 999px;
  transition: width var(--transition-med);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link:hover::after {
  width: 100%;
}

.nav.scrolled .nav-inner {
  background: rgba(5, 5, 10, 0.96);
}

/* mobile nav toggle */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform var(--transition-med), opacity var(--transition-med);
}

/* ---------- HERO ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.3fr);
  gap: 3.5rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent-blue);
  margin-bottom: 0.8rem;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.hero-name {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.hero-subtitle {
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  color: var(--text-muted);
  min-height: 1.4em;
  margin-bottom: 1.5rem;
  white-space: nowrap;
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s infinite;
}

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

.hero-desc {
  max-width: 36rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.btn.primary {
  background-image: var(--accent-gradient);
  color: #050509;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 1);
}

.btn.ghost {
  background: rgba(12, 12, 18, 0.7);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn.ghost:hover {
  background: rgba(18, 18, 28, 0.9);
  transform: translateY(-1px);
}

/* hero tags */

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.tag {
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  background: rgba(12, 12, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* hero right side */

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-card {
  padding: 1.5rem 1.6rem;
}

.hero-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.hero-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.hero-card-body {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-pill {
  flex: 1;
  min-width: 12rem;
  padding: 0.75rem 0.9rem;
}

.pill-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.pill-value {
  font-size: 0.85rem;
}

/* glass morph */

.glass {
  background: var(--glass-bg);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

/* ---------- SECTION HEADERS ---------- */

.section-header {
  margin-bottom: 2.4rem;
}

.section-title {
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ---------- ABOUT ---------- */

.about-grid {
  display: grid;
  gap: 1rem;
  padding: 1.6rem 1.8rem;
}

.about-list {
  list-style: none;
  margin-top: 0.6rem;
  color: var(--text-muted);
}

.about-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.35rem;
}

.about-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-blue);
  font-family: "JetBrains Mono", monospace;
}

.about-extra {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ---------- SKILLS ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.2rem;
}

.skill-card {
  padding: 1.2rem 1.3rem;
}

.skill-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.skill-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- EXPERIENCE ---------- */

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

.experience-card {
  padding: 1.5rem 1.6rem;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.exp-role {
  font-size: 1.05rem;
}

.exp-company {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.exp-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

.exp-list {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.exp-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.3rem;
}

.exp-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: var(--accent-purple);
}

/* ---------- PROJECTS ---------- */

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

.project-card {
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-med), box-shadow var(--transition-med),
    border-color var(--transition-med), background var(--transition-med);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 0 0,
    rgba(108, 196, 255, 0.18),
    transparent 55%
  );
  opacity: 0;
  transition: opacity var(--transition-med), transform var(--transition-med);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(15, 15, 26, 0.95);
}

.project-card:hover::before {
  opacity: 1;
  transform: translate3d(8px, -6px, 0);
}

.project-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-blue);
  margin-bottom: 0.6rem;
}

.project-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.project-tech {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent-purple);
}

/* ---------- RESEARCH ---------- */

.research-grid {
  display: grid;
  gap: 1.3rem;
  padding: 1.5rem 1.7rem;
}

.research-item h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.research-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- ACTIVITIES ---------- */

.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
}

.activity-card {
  padding: 1.4rem 1.6rem;
}

.activity-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.3rem;
}

.activity-org {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.activity-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- RESUME ---------- */

.resume-card {
  padding: 1.6rem 1.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.resume-card p {
  max-width: 32rem;
  color: var(--text-muted);
}

/* ---------- CONTACT ---------- */

.contact-grid {
  padding: 1.6rem 1.8rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
  gap: 1.5rem;
}

.contact-text p {
  color: var(--text-muted);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.contact-link {
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--accent-blue);
  padding-bottom: 0.2rem;
  border-bottom: 1px dashed rgba(108, 196, 255, 0.4);
  transition: color var(--transition-fast), border-color var(--transition-fast),
    transform var(--transition-fast);
}

.contact-link:hover {
  color: var(--accent-purple);
  border-color: rgba(154, 91, 255, 0.6);
  transform: translateX(2px);
}

/* ---------- FOOTER ---------- */

.footer {
  padding: 1.5rem 1.5rem 2.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
}

.footer-meta {
  font-family: "JetBrains Mono", monospace;
}

/* ---------- REVEAL ANIMATIONS ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}

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

.reveal.delay-1 {
  transition-delay: 120ms;
}

.reveal.delay-2 {
  transition-delay: 220ms;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    order: -1;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .section {
    padding-inline: 1.25rem;
  }

  .nav-inner {
    padding-inline: 1rem;
  }

  .nav-links {
    position: absolute;
    inset-inline: 0.75rem;
    top: calc(100% + 0.6rem);
    background: rgba(8, 8, 16, 0.98);
    backdrop-filter: blur(18px);
    border-radius: 18px;
    padding: 0.8rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
    transform-origin: top center;
    transform: scaleY(0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease-out, transform 180ms ease-out;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: scaleY(1);
  }

  .nav-toggle {
    display: flex;
  }

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

  .hero-title {
    font-size: clamp(2.1rem, 9vw, 2.6rem);
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .resume-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .section {
    padding-block: 4.2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
