* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0a0a0f;
  --surface: rgba(30, 30, 45, 0.6);
  --surface-strong: rgba(20, 20, 32, 0.75);
  --border: rgba(108, 99, 255, 0.3);
  --text: #f4f4fb;
  --muted: #b3b5c6;
  --accent: #6c63ff;
  --accent-2: #ff6584;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow: 0 18px 60px rgba(10, 10, 15, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(108, 99, 255, 0.22), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(255, 101, 132, 0.18), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(108, 99, 255, 0.16), transparent 55%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 72px 0;
}

.section-title {
  font-size: clamp(2rem, 3vw, 2.75rem);
  text-align: center;
  margin-bottom: 2.6rem;
  background: linear-gradient(135deg, #ffffff, #a7a4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-6px);
  border-color: rgba(108, 99, 255, 0.6);
  box-shadow: 0 24px 60px rgba(15, 15, 30, 0.55);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid rgba(108, 99, 255, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.logo {
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff, #a2a0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo span {
  color: var(--accent-2);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
}

/* Hero */
.hero-section {
  padding-top: 120px;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  margin: 0.6rem 0 0.8rem;
  line-height: 1.05;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  white-space: nowrap;
}

.hero-content {
  max-width: 640px;
}

.hero-title-main {
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.typed-container {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 600;
  min-height: 2.4rem;
  margin-top: 0.2rem;
  color: #c9c5ff;
  letter-spacing: 1px;
}

.typed-text {
  border-right: 2px solid var(--accent);
  padding-right: 6px;
  animation: blink 0.7s infinite;
  background: rgba(108, 99, 255, 0.12);
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-block;
}

@keyframes blink {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: transparent; }
}

.hero-bio {
  color: var(--muted);
  margin-top: 1rem;
  max-width: 520px;
}

.resume-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  border-radius: 40px;
  padding: 12px 26px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-primary,
.btn.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover,
.btn.is-active:hover {
  transform: translateY(-3px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: rgba(108, 99, 255, 0.5);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.15);
  transform: translateY(-3px);
}

.hero-media {
  display: flex;
  justify-content: center;
}

.profile-card {
  position: relative;
  border-radius: 32px;
  padding: 18px;
  background: var(--surface-strong);
  border: 1px solid rgba(108, 99, 255, 0.35);
  box-shadow: var(--shadow);
}

.profile-card img {
  width: min(320px, 70vw);
  aspect-ratio: 1 / 1.2;
  object-fit: cover;
  border-radius: 24px;
}

.profile-glow {
  position: absolute;
  inset: 16px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* Education & Experience */
.card-grid {
  display: grid;
  gap: 1.2rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.glass-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.glass-card h3 span {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--accent-2);
  font-size: 0.95rem;
}

.card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent-2);
  margin-top: 0.5rem;
}

.card-meta i {
  color: var(--accent);
}

/* Role section */
.role-content {
  margin-top: 1.2rem;
}

.role-block {
  background: rgba(18, 18, 30, 0.6);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: 28px;
  padding: 1.8rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(16px);
}

.role-resume {
  display: flex;
  justify-content: center;
  margin-top: 1.6rem;
}

.role-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.role-block-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.role-block-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(108, 99, 255, 0.15);
  color: #d7d6ff;
  font-size: 0.8rem;
  border: 1px solid rgba(108, 99, 255, 0.35);
}

.role-header {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.role-header .section-title {
  text-align: left;
  margin-bottom: 0.6rem;
}

.role-subtitle {
  color: var(--muted);
}

.role-switch {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.role-tab {
  border: 1px solid rgba(108, 99, 255, 0.35);
  background: rgba(25, 25, 40, 0.8);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.role-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.role-tab:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.subsection-title {
  font-size: 1.4rem;
  margin: 2.2rem 0 1rem;
  border-left: 3px solid var(--accent);
  padding-left: 0.8rem;
  color: #e2e2ff;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.skill-card {
  text-align: center;
  background: rgba(25, 25, 40, 0.7);
  border-radius: 20px;
  border: 1px solid rgba(108, 99, 255, 0.2);
  padding: 1.2rem 0.6rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.skill-card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(25, 25, 40, 0.7);
  border-radius: 24px;
  border: 1px solid rgba(108, 99, 255, 0.2);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-media {
  position: relative;
  overflow: hidden;
}

.project-media img {
  height: 220px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid rgba(108, 99, 255, 0.5);
  font-size: 0.75rem;
  color: #e3e1ff;
}

.project-body {
  padding: 1.2rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-card h3 {
  font-size: 1.15rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.project-link {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.project-meta {
  font-size: 0.75rem;
  color: #9c9cc0;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(12, 12, 28, 0.5);
}

.project-card:hover .project-media img {
  transform: scale(1.05);
}

/* Contact */
.contact-section {
  padding-bottom: 120px;
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-title {
  text-align: left;
  margin-bottom: 0.6rem;
}

.contact-left h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.contact-left {
  background: linear-gradient(160deg, rgba(108, 99, 255, 0.18), rgba(20, 20, 32, 0.75));
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  font-weight: 600;
  color: #d6d4ff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-email:hover {
  color: #ffffff;
}

.contact-socials {
  display: flex;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.contact-socials a {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(108, 99, 255, 0.3);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.contact-socials a:hover {
  background: rgba(108, 99, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-4px);
}

.contact-form {
  background: linear-gradient(160deg, rgba(20, 20, 32, 0.9), rgba(108, 99, 255, 0.12));
  border-color: rgba(108, 99, 255, 0.4);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

label {
  font-size: 0.8rem;
  color: var(--muted);
}

input,
textarea {
  background: rgba(20, 20, 32, 0.8);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
}

.submit-btn {
  width: 100%;
  border: none;
  border-radius: 40px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(108, 99, 255, 0.35);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.footer {
  padding: 2rem 1rem 3rem;
  text-align: center;
  color: #9a9bb0;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .role-header {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .role-switch {
    justify-content: flex-start;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    flex-wrap: wrap;
  }
}

@media (max-width: 820px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 4vw;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid rgba(108, 99, 255, 0.3);
    border-radius: 18px;
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    min-width: 210px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 70px 0;
  }

  .hero-title {
    font-size: clamp(2.2rem, 9vw, 3rem);
  }

  .hero-title-main {
    white-space: normal;
  }

  .resume-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .role-tab {
    width: 100%;
    justify-content: center;
  }
}
