:root {
  --bg: #0b1220;
  --bg-soft: #101a2d;
  --surface: rgba(17, 24, 39, 0.82);
  --surface-strong: #121d2d;
  --card: rgba(12, 18, 31, 0.7);
  --card-alt: rgba(18, 26, 40, 0.9);
  --border: rgba(148, 163, 184, 0.18);
  --text: #ecf3ff;
  --text-soft: #b6c4d9;
  --text-muted: #8ea3bf;
  --primary: #71d0ff;
  --primary-strong: #4bb4fb;
  --accent: #9f7aea;
  --success: #5ee6a8;
  --shadow: 0 24px 80px rgba(9, 15, 25, 0.45);
  --hero-glow: rgba(113, 208, 255, 0.18);
  --hero-glow-strong: rgba(159, 122, 234, 0.18);
  --section-bg: transparent;
  --section-alt: rgba(12, 17, 28, 0.75);
  --btn-shadow: rgba(75, 180, 251, 0.35);
  --nav-bg: rgba(7, 11, 18, 0.75);
  --resume-note-bg: rgba(255, 255, 255, 0.04);
}

html[data-theme='light'] {
  --bg: #f4f7fb;
  --bg-soft: #edf3fb;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-strong: #ffffff;
  --card: rgba(255, 255, 255, 0.9);
  --card-alt: rgba(246, 249, 255, 0.98);
  --border: rgba(148, 163, 184, 0.25);
  --text: #172234;
  --text-soft: #3d4c60;
  --text-muted: #677a92;
  --primary: #0d6efd;
  --primary-strong: #0b57d6;
  --accent: #7c4dff;
  --success: #11845b;
  --shadow: 0 18px 50px rgba(50, 67, 89, 0.12);
  --hero-glow: rgba(13, 110, 253, 0.12);
  --hero-glow-strong: rgba(124, 77, 255, 0.15);
  --section-alt: rgba(244, 247, 251, 0.85);
  --btn-shadow: rgba(13, 110, 253, 0.18);
  --nav-bg: rgba(255, 255, 255, 0.75);
  --resume-note-bg: rgba(13, 110, 253, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top left, var(--hero-glow) 0%, transparent 35%),
    radial-gradient(circle at top right, var(--hero-glow-strong) 0%, transparent 30%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(113, 208, 255, 0.8);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--primary);
  color: #05111b;
  padding: 0.7rem 1rem;
  border-radius: 0.55rem;
  z-index: 2000;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 6rem 0;
}

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

.section-label {
  display: inline-block;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  font-size: 0.72rem;
  margin-bottom: 1rem;
}

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

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.15;
  max-width: 780px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #081521;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 10px 24px var(--btn-shadow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--text-soft);
  font-size: 0.96rem;
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #091421;
  border-color: transparent;
  box-shadow: 0 15px 30px var(--btn-shadow);
}

.btn-secondary {
  background: rgba(113, 208, 255, 0.08);
  border-color: rgba(113, 208, 255, 0.2);
}

.btn-ghost {
  background: transparent;
}

.btn-small {
  min-height: 40px;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  margin: 0.22rem 0;
}

.hero {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2rem;
  align-items: center;
}

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

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
  margin-bottom: 0.7rem;
}

.hero h2 {
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 620px;
  margin-bottom: 1.5rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.badge-row span {
  background: rgba(113, 208, 255, 0.08);
  border: 1px solid rgba(113, 208, 255, 0.15);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.84rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

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

.social-links a {
  color: var(--text-soft);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
  color: var(--text);
  border-color: var(--primary);
}

.hero-panel {
  background: linear-gradient(180deg, rgba(19, 30, 48, 0.92), rgba(10, 17, 29, 0.86));
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

html[data-theme='light'] .hero-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(236, 242, 250, 0.96));
}

.panel-glow {
  position: absolute;
  inset: auto auto -120px -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(113, 208, 255, 0.42), transparent 60%);
  pointer-events: none;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-soft);
  font-size: 0.82rem;
  margin-bottom: 1.4rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 16px rgba(94, 230, 168, 0.8);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.avatar {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #071722;
  box-shadow: 0 10px 20px rgba(113, 208, 255, 0.15);
}

.profile-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.1rem;
}

.profile-card p {
  color: var(--text-soft);
}

.mini-list {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  color: var(--text-soft);
  margin-bottom: 1.5rem;
}

.focus-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.focus-stack span {
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(159, 122, 234, 0.08);
  border: 1px solid rgba(159, 122, 234, 0.18);
  color: var(--text-soft);
  font-size: 0.78rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.about-copy {
  display: grid;
  gap: 1rem;
  color: var(--text-soft);
  font-size: 1.02rem;
}

.about-copy strong {
  color: var(--text);
}

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

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  font-size: clamp(1.2rem, 2vw, 1.9rem);
  margin-bottom: 0.3rem;
}

.stat-card span {
  color: var(--text-soft);
}

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

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  padding: 1.3rem;
  box-shadow: var(--shadow);
}

.skill-card h3 {
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: rgba(113, 208, 255, 0.09);
  border: 1px solid rgba(113, 208, 255, 0.12);
  font-size: 0.8rem;
  color: var(--text-soft);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.skill-tag:hover {
  transform: translateY(-2px);
  border-color: rgba(113, 208, 255, 0.3);
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), rgba(255, 255, 255, 0));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 1.2rem;
  align-items: start;
}

.timeline-dot {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 6px rgba(113, 208, 255, 0.12);
  margin-top: 0.5rem;
  z-index: 1;
}

.timeline-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.timeline-header h3 {
  font-size: 1.35rem;
  margin-bottom: 0.18rem;
}

.job-title {
  color: var(--primary);
  font-weight: 600;
}

.job-duration {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.job-meta {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.timeline-content ul,
.project-highlights {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.timeline-content li,
.project-highlights li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-soft);
}

.timeline-content li::before,
.project-highlights li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 1.3rem;
  line-height: 1;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 1.3rem 1.35rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(113, 208, 255, 0.28);
}

.project-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.project-bullet {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 18px rgba(113, 208, 255, 0.4);
}

.project-tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.project-card h3 {
  font-size: 1.42rem;
  margin-bottom: 0.8rem;
}

.project-description {
  color: var(--text-soft);
  margin-bottom: 1rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.1rem;
}

.tech-stack span {
  background: rgba(113, 208, 255, 0.08);
  border: 1px solid rgba(113, 208, 255, 0.15);
  color: var(--text-soft);
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.74rem;
}

.project-actions {
  display: flex;
  justify-content: flex-start;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem;
}

.education-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow);
}

.education-period {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.education-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

.education-card p {
  color: var(--text-soft);
}

.contact-section {
  padding-bottom: 5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.contact-details {
  display: grid;
  gap: 0.8rem;
}

.contact-item {
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  background: rgba(113, 208, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.contact-item .label {
  font-size: 0.77rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.contact-item a,
.contact-item span {
  color: var(--text-soft);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.04);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 1rem;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #061621;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 16px 36px var(--btn-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.resume-note {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  max-width: 360px;
  background: var(--resume-note-bg);
  border: 1px solid var(--border);
  color: var(--text-soft);
  border-radius: 0.9rem;
  padding: 0.8rem 1rem;
  backdrop-filter: blur(8px);
  font-size: 0.82rem;
  line-height: 1.5;
  box-shadow: var(--shadow);
}

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

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

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .contact-grid,
  .skills-grid,
  .projects-grid,
  .education-grid {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    position: absolute;
    top: 72px;
    left: 1rem;
    right: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .nav-toggle {
    display: inline-block;
  }

  .nav-resume {
    width: 100%;
  }

  .theme-toggle {
    margin-top: 0.3rem;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4.5rem 0;
  }

  .hero {
    padding-top: 3rem;
  }

  .cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .timeline-header {
    flex-direction: column;
  }

  .resume-note {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 1rem 0;
  }
}
