:root {
  color-scheme: dark;
  --ink: #0f1115;
  --mint: #6ee7b7;
  --soft-mint: rgba(110, 231, 183, 0.16);
  --panel: #151a21;
  --panel-2: #1b222b;
  --line: rgba(255, 255, 255, 0.12);
  --glow: rgba(110, 231, 183, 0.5);
  --text: #f9fafb;
  --text-strong: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.72);
  --text-soft: rgba(255, 255, 255, 0.6);
  --surface-1: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.03);
  --surface-3: rgba(255, 255, 255, 0.08);
  --hero-glow-1: rgba(110, 231, 183, 0.12);
  --hero-glow-2: rgba(110, 231, 183, 0.14);
  --hero-line: rgba(255, 255, 255, 0.04);
  --loader-bg: #0b0d11;
  --bg-glow: rgba(110, 231, 183, 0.05);
  --on-mint: #051b12;
}

body[data-theme="light"] {
  color-scheme: light;
  --ink: #f6f7fb;
  --mint: #0f766e;
  --soft-mint: rgba(15, 118, 110, 0.16);
  --panel: #ffffff;
  --panel-2: #f0f3f7;
  --line: rgba(15, 23, 42, 0.12);
  --glow: rgba(15, 118, 110, 0.35);
  --text: #0f172a;
  --text-strong: rgba(15, 23, 42, 0.92);
  --text-muted: rgba(15, 23, 42, 0.72);
  --text-soft: rgba(15, 23, 42, 0.6);
  --surface-1: rgba(15, 23, 42, 0.05);
  --surface-2: rgba(15, 23, 42, 0.03);
  --surface-3: rgba(15, 23, 42, 0.07);
  --hero-glow-1: rgba(15, 118, 110, 0.14);
  --hero-glow-2: rgba(15, 118, 110, 0.12);
  --hero-line: rgba(15, 23, 42, 0.05);
  --loader-bg: #eef2f6;
  --bg-glow: rgba(15, 118, 110, 0.08);
  --on-mint: #f5fffb;
}

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

body {
  background: radial-gradient(circle at top, var(--bg-glow), transparent 55%),
    var(--ink);
  color: var(--text);
  overflow-x: hidden;
}

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

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

.container {
  width: min(1120px, 90vw);
  margin: 0 auto;
}

.section {
  padding: 120px 0;
  position: relative;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--mint);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, var(--hero-glow-1), transparent 55%),
    radial-gradient(circle at 80% 10%, var(--hero-glow-2), transparent 50%),
    linear-gradient(120deg, var(--hero-line), transparent 60%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-eyebrow {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-soft);
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
}

.hero-headline {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  color: var(--mint);
}

.hero-subhead {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.button {
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button.primary {
  background: var(--mint);
  color: var(--on-mint);
  box-shadow: 0 20px 40px rgba(110, 231, 183, 0.18);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px var(--glow);
}

.button.ghost {
  border-color: var(--line);
  color: var(--text-strong);
  background: var(--surface-1);
}

.button.ghost:hover {
  border-color: var(--mint);
  color: var(--mint);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--text-soft);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.95rem;
}

.nav a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.nav a:hover {
  color: var(--mint);
}

.nav .cta {
  padding: 10px 18px;
  border: 1px solid color-mix(in srgb, var(--mint) 60%, transparent);
  border-radius: 999px;
  color: var(--mint);
}

.theme-toggle {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-strong);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--mint) 50%, transparent);
  color: var(--mint);
}

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

.about-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.accent {
  color: var(--mint);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.service-card {
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
  transition: transform 0.3s ease, border 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(110, 231, 183, 0.4);
}

.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--soft-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mint);
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.service-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

.work-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 10px 5vw 10px;
  scroll-snap-type: x mandatory;
}

.work-scroll::-webkit-scrollbar {
  height: 6px;
}

.work-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.work-card {
  min-width: min(420px, 80vw);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  scroll-snap-align: center;
  transition: transform 0.3s ease, border 0.3s ease;
}

.work-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--mint) 55%, transparent);
}

.work-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.work-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

.work-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-card .tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--line);
}

.work-card .work-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.work-card a {
  color: var(--mint);
  font-weight: 600;
}

.flagship {
  background: radial-gradient(circle at 30% 20%, var(--hero-glow-1), transparent 60%),
    var(--surface-1);
  border-color: color-mix(in srgb, var(--mint) 45%, transparent);
}

.work-label {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.7rem;
  color: var(--mint);
}

.experience-list {
  display: grid;
  gap: 16px;
}

.experience-item {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.experience-item h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.experience-item p {
  color: var(--text-muted);
  line-height: 1.6;
}

.stack-grid {
  display: grid;
  gap: 20px;
}

.stack-group {
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.stack-group h4 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--mint);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-row span {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  font-size: 0.85rem;
  color: var(--text-strong);
}

.contact {
  padding-bottom: 140px;
}

.contact-card {
  padding: 40px;
  border-radius: 30px;
  background: linear-gradient(140deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line);
  display: grid;
  gap: 24px;
}

.contact-sub {
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-weight: 500;
}

.contact-links a {
  color: var(--mint);
}

.contact-form {
  display: grid;
  gap: 12px;
}

.form-status {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-status.success {
  color: var(--mint);
}

.form-status.error {
  color: #f87171;
}

.contact-form input,
.contact-form textarea {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(110, 231, 183, 0.6);
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.4);
}

.footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

#loader {
  position: fixed;
  inset: 0;
  background: var(--loader-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: loaderFade 1.2s ease 1.6s forwards;
}

#loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.loader-name {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--text);
}

.loader-line {
  width: 120px;
  height: 2px;
  background: var(--mint);
  display: block;
}

#cursor,
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1000;
  mix-blend-mode: screen;
}

#cursor {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  transform: translate(-50%, -50%);
}

#cursor-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(110, 231, 183, 0.6);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
}

.js .reveal {
  opacity: 0;
  transform: translateY(30px);
}

@keyframes loaderFade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .section {
    padding: 90px 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .work-card {
    min-width: 75vw;
  }

  #cursor,
  #cursor-ring {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.6rem;
  }

  .hero-headline {
    font-size: 1.4rem;
  }
}
