:root {
  --bg: #060816;
  --bg-secondary: rgba(10, 15, 30, 0.72);
  --surface: rgba(14, 20, 38, 0.72);
  --surface-strong: rgba(12, 18, 34, 0.92);
  --surface-border: rgba(148, 163, 184, 0.14);
  --text: #f7fbff;
  --text-muted: #aebbd0;
  --heading: #ffffff;
  --accent: #7dd3fc;
  --accent-strong: #7c3aed;
  --accent-soft: rgba(125, 211, 252, 0.12);
  --shadow: 0 28px 90px rgba(2, 6, 23, 0.4);
  --gradient:
    radial-gradient(circle at 10% 10%, rgba(124, 58, 237, 0.28), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(125, 211, 252, 0.14), transparent 24%),
    linear-gradient(180deg, #07101d 0%, #04070e 100%);
}

:root.light-theme {
  --bg: #f3f7fb;
  --bg-secondary: rgba(255, 255, 255, 0.82);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-border: rgba(15, 23, 42, 0.08);
  --text: #152033;
  --text-muted: #5a6881;
  --heading: #09111f;
  --accent: #2563eb;
  --accent-strong: #7c3aed;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --gradient:
    radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.12), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(124, 58, 237, 0.08), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #edf3fa 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text);
  background: var(--gradient);
  min-height: 100vh;
}

body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
}

body::before {
  width: 24rem;
  height: 24rem;
  left: -8rem;
  top: 3rem;
  background: rgba(124, 58, 237, 0.16);
}

body::after {
  content: '';
  width: 22rem;
  height: 22rem;
  right: -6rem;
  top: 16rem;
  background: rgba(125, 211, 252, 0.1);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 84px;
}

.hero {
  padding-top: 4px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 54px;
  padding: 14px 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  background: rgba(10, 15, 30, 0.58);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
  position: sticky;
  top: 18px;
  z-index: 20;
}

:root.light-theme .topbar {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 23, 42, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: white;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.06em;
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a,
.project-links a,
.hero-card-links a {
  color: var(--text);
  text-decoration: none;
}

.nav-links > a:not(.button) {
  color: var(--text-muted);
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links > a:not(.button):hover,
.project-links a:hover,
.hero-card-links a:hover {
  color: var(--heading);
}

.nav-links > a:not(.button):hover {
  background: rgba(255, 255, 255, 0.06);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 44px;
  align-items: start;
}

.hero-copy,
.glass-card,
.project-card,
.cta-card,
.hero-card {
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.eyebrow,
.section-kicker,
.card-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
h3 {
  color: var(--heading);
  margin-top: 0;
}

h1 {
  font-size: clamp(4rem, 4.2vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  margin: 16px 0 24px;
  max-width: 10ch;
}

.lead {
  color: var(--text-muted);
  font-size: 1.16rem;
  line-height: 1.9;
  max-width: 54ch;
}

.hero-actions,
.cta-actions,
.project-links,
.hero-card-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-actions {
  margin: 36px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: white;
  box-shadow: 0 18px 40px rgba(76, 29, 149, 0.28);
}

.button-secondary {
  background: linear-gradient(180deg, var(--accent-soft), rgba(255, 255, 255, 0.02));
  color: var(--heading);
  border-color: var(--surface-border);
}

.quick-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0;
  margin: 30px 0 0;
}

.quick-stats li {
  padding: 22px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--surface-border);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.quick-stats li:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.22);
}

.stat-value {
  display: block;
  color: var(--heading);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.hero-card {
  border-radius: 34px;
  padding: 34px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(13, 21, 42, 0.94), rgba(13, 21, 42, 0.7)),
    var(--surface-strong);
}

:root.light-theme .hero-card {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
    var(--surface-strong);
  border-color: rgba(15, 23, 42, 0.08);
}

.hero-card-glow {
  position: absolute;
  inset: auto -50px -70px auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.2), transparent 68%);
}

.hero-card h2 {
  font-size: 2.1rem;
  line-height: 1.08;
  margin-bottom: 16px;
  max-width: 13ch;
}

.hero-card p {
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

.hero-card-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 0;
}

.hero-card-links-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 1.2rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-card-links-icons a:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

:root.light-theme .hero-card-links-icons a {
  background: rgba(15, 23, 42, 0.03);
}

.hero-links-box {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

:root.light-theme .hero-links-box {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.01));
}

.hero-links-label {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.section {
  padding-top: 120px;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0;
  max-width: 13ch;
}

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

.glass-card,
.project-card,
.cta-card {
  border-radius: 30px;
}

.about-card,
.project-card,
.cta-card {
  padding: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.about-card p,
.project-card p,
.cta-card p {
  color: var(--text-muted);
  line-height: 1.8;
}

.about-card:hover,
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.24);
}

.project-card {
  grid-column: span 6;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent), #3b82f6);
}

.featured-project {
  grid-column: span 12;
  padding: 36px;
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(124, 58, 237, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(125, 211, 252, 0.08), transparent 28%),
    var(--surface-strong);
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--heading);
  font-size: 0.84rem;
  font-weight: 700;
}

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

.project-card h3 {
  font-size: 1.58rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.project-stack {
  margin-top: 18px;
}

.section-cta {
  padding-bottom: 32px;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 36px;
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.08), transparent 24%),
    linear-gradient(315deg, rgba(124, 58, 237, 0.12), transparent 28%),
    var(--surface-strong);
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 88px;
  height: 48px;
  padding: 4px;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--heading);
  cursor: pointer;
  font: inherit;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}


.theme-toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  box-shadow: 0 10px 24px rgba(76, 29, 149, 0.22);
  transition: transform 0.22s ease;
}

.theme-toggle-option {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--heading);
}

.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  transform: translateX(100%);
}

.theme-icon {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.42;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.theme-toggle[aria-pressed="false"] .theme-icon-dark,
.theme-toggle[aria-pressed="true"] .theme-icon-light {
  opacity: 1;
}

.theme-toggle[aria-pressed="false"] .theme-icon-light,
.theme-toggle[aria-pressed="true"] .theme-icon-dark {
  opacity: 0.42;
}

@media (max-width: 980px) {
  .hero-content,
  .about-grid,
  .cta-card {
    grid-template-columns: 1fr;
  }

  .project-card,
  .featured-project {
    grid-column: span 12;
  }

  .cta-card {
    align-items: flex-start;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-bottom: 40px;
  }

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

  .nav-links {
    justify-content: flex-start;
  }

  .hero-card,
  .about-card,
  .project-card,
  .cta-card {
    padding: 24px;
  }

  .theme-toggle {
    align-self: flex-start;
  }

  .featured-project {
    padding: 28px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.6rem, 10vw, 4rem);
  }

  .hero-card h2,
  .section-heading h2 {
    max-width: none;
  }

  .section {
    padding-top: 84px;
  }
}