:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-soft: #111832;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --muted: #a8b3cf;
  --accent: #8dd8ff;
  --accent-strong: #a78bfa;
  --line: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius-large: 32px;
  --radius-medium: 22px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(141, 216, 255, 0.22), transparent 32rem),
    radial-gradient(circle at 85% 12%, rgba(167, 139, 250, 0.2), transparent 30rem),
    linear-gradient(135deg, #070a13 0%, var(--bg) 55%, #101629 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent);
}

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

.page-shell {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 18px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 72px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 12, 26, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #07101f;
  background: linear-gradient(135deg, var(--accent), #f0f9ff);
}

.nav-links {
  gap: 6px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.section-grid,
.about-section,
.skills-section {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 48px;
  align-items: center;
}

.hero {
  position: relative;
  width: 100vw;
  min-height: calc(100svh - 160px);
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  letter-spacing: -0.06em;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(4rem, 9vw, 7.6rem);
  line-height: 0.88;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 0.98;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.hero-name {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 600;
}

.hero-name span {
  color: var(--text);
}

.hero-text,
.about-section > p,
.contact-card p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-text {
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button.primary {
  color: #07101f;
  background: linear-gradient(135deg, var(--accent), #f0f9ff);
  box-shadow: 0 14px 34px rgba(141, 216, 255, 0.22);
}

.button.secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 80px, var(--max-width));
  margin: 0 auto;
  padding: 60px 0;
}

.hero-copy {
  max-width: 560px;
}

.splat-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
}

.splat-stage::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(
      to right,
      rgba(7, 10, 19, 0.85) 0%,
      rgba(7, 10, 19, 0.55) 38%,
      rgba(7, 10, 19, 0.12) 65%,
      transparent 100%
    ),
    linear-gradient(
      to top,
      rgba(7, 10, 19, 0.6) 0%,
      transparent 32%
    );
}

.splat-viewer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.splat-viewer canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.splat-status,
.splat-error {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(7, 12, 27, 0.76);
  font-size: 0.88rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.splat-error {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.36);
}

.loader-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(141, 216, 255, 0.9);
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.78);
    opacity: 0.55;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}


.about-section,
.skills-section,
.contact-section,
.section-heading {
  padding: 92px 0 0;
}

.about-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 720px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 34px;
}

.project-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--card);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.18);
}

.project-card {
  padding: 26px;
  min-height: 300px;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(141, 216, 255, 0.42);
  background: var(--card-strong);
}

.project-card.featured {
  background:
    linear-gradient(145deg, rgba(141, 216, 255, 0.2), rgba(167, 139, 250, 0.16)),
    var(--card);
}

.project-number {
  margin-bottom: 42px;
  color: var(--accent);
  font-weight: 900;
}

.project-card p {
  color: var(--muted);
  line-height: 1.75;
}

.project-card span {
  display: inline-flex;
  margin-top: 18px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skills-list span {
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 700;
}

.contact-section {
  padding-bottom: 80px;
}

.contact-card {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: clamp(28px, 6vw, 64px);
  background:
    radial-gradient(circle at top right, rgba(141, 216, 255, 0.28), transparent 24rem),
    var(--card);
}

.contact-card p {
  max-width: 650px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    border-radius: 28px;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .section-grid,
  .about-section,
  .skills-section,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 100svh;
  }

  .hero-content {
    padding: 40px 0 60px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 28px, var(--max-width));
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .nav-links a {
    padding: 8px 10px;
  }

  h1 {
    font-size: clamp(3.4rem, 19vw, 4.5rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
