:root {
  --bg-dark: #050510;
  --bg-surface: rgba(22, 24, 38, 0.7);
  --bg-card: rgba(17, 17, 26, 0.75);
  --accent: #7f5af0;
  --accent-soft: rgba(127, 90, 240, 0.25);
  --text-primary: #f8f9ff;
  --text-secondary: rgba(238, 240, 255, 0.78);
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  color: var(--text-primary);
  background: radial-gradient(circle at top, #111233, #04040a 60%);
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(127, 90, 240, 0.2), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(50, 220, 255, 0.15), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(255, 118, 171, 0.18), transparent 45%);
  filter: blur(40px);
  opacity: 0.7;
  z-index: -1;
  pointer-events: none;
}

img,
iframe {
  max-width: 100%;
  display: block;
  border: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.section {
  padding: 6rem clamp(1.5rem, 5vw, 4rem);
  max-width: 1100px;
  margin: 0 auto;
}

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

.section-heading h2 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  margin: 0.5rem 0 0;
}

.demo-banner {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 2rem));
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(127, 90, 240, 0.9), rgba(62, 205, 255, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.demo-banner strong {
  color: #fff;
}

.demo-banner span[aria-hidden='true'] {
  font-size: 1.15rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.lead {
  max-width: 60ch;
}

.site-header {
  position: fixed;
  top: calc(1.5rem + 3.2rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 2rem));
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: rgba(5, 6, 20, 0.65);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.logo span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(248, 249, 255, 0.8);
  transition: color 0.3s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.nav-line {
  display: block;
  width: 1.5rem;
  height: 2px;
  margin: 0.25rem 0;
  background: rgba(255, 255, 255, 0.85);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.nav-toggle.is-open .nav-line:nth-of-type(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open .nav-line:nth-of-type(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-line:nth-of-type(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: left;
  max-width: 620px;
  padding: clamp(2rem, 6vw, 4rem) 0;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

.hero h1 span {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(127, 90, 240, 0.75);
}

.hero .lead {
  margin-bottom: 2rem;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn.primary {
  background: linear-gradient(135deg, #7f5af0, #57c7ff);
  color: #0a0820;
  box-shadow: 0 15px 40px rgba(95, 121, 255, 0.4);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  transform: translateY(-2px) scale(1.02);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn.ghost:hover,
.btn.ghost:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.scroll-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: rgba(255, 255, 255, 0.9);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(200%);
    opacity: 0;
  }
}

.about {
  background: rgba(8, 10, 25, 0.65);
  border-radius: 32px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
}

.about-card {
  background: rgba(5, 6, 22, 0.75);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.skill-list li {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  width: fit-content;
  font-size: 0.95rem;
}

.profile {
  display: grid;
  gap: 1rem;
}

.profile div {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.5rem;
}

.profile dt {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.5);
}

.profile dd {
  margin: 0;
  color: #fff;
}

.works {
  backdrop-filter: blur(12px);
}

.works-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.work-card {
  background: rgba(6, 8, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(127, 90, 240, 0.4);
}

.work-thumbnail {
  position: relative;
  aspect-ratio: 16 / 10;
  background: rgba(127, 90, 240, 0.2);
  overflow: hidden;
}

.work-thumbnail iframe {
  width: 100%;
  height: 100%;
  filter: saturate(1.1);
}

.work-body {
  padding: 1.8rem;
  display: grid;
  gap: 1rem;
}

.contact {
  background: rgba(10, 12, 30, 0.65);
  border-radius: 32px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
}

.contact-list li {
  display: grid;
  gap: 0.2rem;
}

.contact-list span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.55);
}

.contact-form {
  display: grid;
  gap: 1.1rem;
  background: rgba(5, 6, 20, 0.75);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.site-footer {
  padding: 3rem 1.5rem 4rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal[aria-hidden='false'] {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 15, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: min(960px, 90vw);
  aspect-ratio: 16 / 9;
  background: rgba(3, 5, 18, 0.9);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.modal-content iframe {
  width: 100%;
  height: 100%;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 960px) {
  .demo-banner {
    font-size: 0.85rem;
    padding: 0.65rem 1.15rem;
  }

  .site-header {
    padding: 0.9rem 1.25rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-card,
  .contact-form {
    padding: 1.75rem;
  }
}

@media (max-width: 780px) {
  .demo-banner {
    width: calc(100% - 1.5rem);
    font-size: 0.8rem;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    border-radius: 20px;
  }

  .site-header {
    top: calc(1rem + 3.1rem);
    width: calc(100% - 1.5rem);
    border-radius: 20px;
  }

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

  .site-nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    flex-direction: column;
    background: rgba(5, 6, 22, 0.92);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    min-width: 220px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .site-nav[data-visible='true'] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.5rem 0;
  }

  .hero {
    padding-top: 6rem;
  }

  .hero-content {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }
}

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

  .hero h1 {
    font-size: clamp(2.2rem, 7vw, 2.8rem);
  }

  .modal-content {
    width: 92vw;
  }
}
