/* ==========================================================================
   Tokens
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Outfit:wght@400;500;600;700&display=swap");

:root {
  --bg-deep: #06060a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-strong: rgba(16, 18, 28, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.12);

  --text: #f0f1f5;
  --text-muted: #989cab;
  --text-soft: #6b7080;

  --accent: #34d3d8;
  --accent-dim: rgba(52, 211, 216, 0.14);
  --accent-2: #a78bfa;
  --accent-2-dim: rgba(167, 139, 250, 0.12);

  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 4rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #5eead4;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ambient background */
.bg-base {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% -10%, black, transparent);
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
}

.bg-glow--1 {
  width: min(70vw, 480px);
  height: min(70vw, 480px);
  top: -12%;
  left: -8%;
  background: var(--accent-2);
}

.bg-glow--2 {
  width: min(60vw, 420px);
  height: min(60vw, 420px);
  bottom: 10%;
  right: -10%;
  background: var(--accent);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out), backdrop-filter 0.25s;
}

.site-header.is-scrolled {
  background: var(--surface-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.header-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  color: var(--text);
  background: linear-gradient(145deg, var(--accent-dim), var(--accent-2-dim));
  border: 1px solid var(--border-bright);
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
}

.logo-mark:hover {
  color: var(--text);
  transform: translateY(-1px);
  border-color: rgba(52, 211, 216, 0.35);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle__bars {
  width: 1.25rem;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  box-shadow: 0 -6px 0 var(--text), 0 6px 0 var(--text);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

.nav-list a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.nav-list a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-list a.is-active {
  color: var(--accent);
  background: var(--accent-dim);
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-list {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--pad) 1rem;
    background: var(--surface-strong);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform-origin: top;
    transform: scaleY(0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }

  .nav.is-open .nav-list {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-list a {
    padding: 0.75rem 0;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-list li:last-child a {
    border-bottom: 0;
  }
}

/* ==========================================================================
   Sections & typography
   ========================================================================== */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 4.5vw, 3rem) var(--pad);
}

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

.section-title {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  color: var(--text);
}

.section-lead {
  margin: -0.5rem 0 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.about p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.about p:last-child {
  margin-bottom: 0;
}

.about strong {
  color: var(--text);
  font-weight: 600;
}

.about__footnote {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.what-copy p {
  margin: 0 0 1.15rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.72;
}

.what-copy p:last-child {
  margin-bottom: 0;
}

.what-copy__close {
  margin-top: 0.25rem;
  color: var(--text);
  font-size: 1rem;
  opacity: 0.92;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
  min-height: min(82vh, 720px);
  padding-top: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  max-width: 42ch;
}

.hero__title {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.hero__name {
  background: linear-gradient(120deg, var(--text) 0%, var(--text) 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 0 0 1.35rem;
  max-width: 48ch;
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

.c-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.5rem;
  margin-bottom: 1.5rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.c-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .c-status__dot {
    animation: none;
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(0.92); }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}

.btn--primary {
  background: linear-gradient(135deg, #2dd4bf, #22d3ee);
  color: #041014;
  box-shadow: 0 4px 24px rgba(45, 212, 191, 0.25);
}

.btn--primary:hover {
  color: #041014;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(45, 212, 191, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-bright);
}

.btn--ghost:hover {
  color: var(--text);
  background: var(--surface);
  border-color: rgba(52, 211, 216, 0.35);
}

.hero__visual {
  display: flex;
  justify-content: center;
}

@media (min-width: 900px) {
  .hero__visual {
    justify-content: flex-end;
  }
}

.hero-card {
  position: relative;
  padding: 4px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(52, 211, 216, 0.45), rgba(167, 139, 250, 0.35), rgba(52, 211, 216, 0.2));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 48px -24px rgba(0, 0, 0, 0.8);
}

.hero-card__shine {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: shine 6s ease-in-out infinite;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-card__shine {
    animation: none;
  }
}

@keyframes shine {
  0%, 100% { background-position: 130% 0; }
  50% { background-position: -30% 0; }
}

.hero-card__photo {
  position: relative;
  width: min(280px, 78vw);
  height: auto;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 1;
  background: var(--surface);
}

/* ==========================================================================
   Projects
   ========================================================================== */
.project {
  position: relative;
  margin-bottom: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.project--featured {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.project__top {
  display: block;
}

.project__shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .project__shots {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }
}

.project__brand {
  margin-bottom: 1rem;
}

.project__logo {
  max-height: 44px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  filter: brightness(1.05);
}

.project__name {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.project__subline {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-soft);
  letter-spacing: -0.01em;
}

.project__desc {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.project__desc--tight {
  margin-bottom: 1.25rem;
}

.project__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  line-height: 1.25;
}

.meta-pill--muted {
  color: var(--text-soft);
}

.meta-pill--live {
  border-color: rgba(52, 211, 216, 0.28);
  background: var(--accent-dim);
  color: #7ee8dc;
}

.meta-pill--action {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text);
  border-color: rgba(52, 211, 216, 0.35);
  background: var(--accent-dim);
  transition: border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.meta-pill--action:hover {
  color: var(--text);
  border-color: rgba(52, 211, 216, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -12px rgba(45, 212, 191, 0.35);
}

.meta-pill--demo {
  border-color: rgba(167, 139, 250, 0.4);
  background: var(--accent-2-dim);
}

.meta-pill--demo:hover {
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 8px 20px -12px rgba(167, 139, 250, 0.3);
}

.meta-pill__k {
  font-weight: 600;
  color: var(--text);
}

.meta-pill__v {
  font-size: 0.75rem;
  color: var(--text-soft);
}

.project__demo-note {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 52ch;
}

.project__demo-note a {
  font-weight: 600;
}

.shot-tile {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.shot-tile:hover {
  border-color: rgba(52, 211, 216, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -20px rgba(52, 211, 216, 0.35);
}

.shot-tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.shot__label {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: rgba(6, 6, 10, 0.82);
  color: var(--text);
  border: 1px solid var(--border);
}

.project--soon {
  padding-top: 2.5rem;
  border-style: dashed;
  background: var(--surface);
}

.soon-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: var(--accent-2-dim);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.35);
}

/* ==========================================================================
   Stack
   ========================================================================== */
.stack-panel {
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.55);
}

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

@media (min-width: 520px) {
  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
}

@media (min-width: 1024px) {
  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.stack-card {
  position: relative;
  margin: 0;
  padding: 1.2rem 1.25rem 1.3rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(6, 6, 10, 0.45);
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s, border-color 0.28s;
  overflow: hidden;
}

.stack-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.55;
  pointer-events: none;
}

.stack-grid > li:nth-child(3n + 2)::before {
  opacity: 0.45;
  filter: hue-rotate(-12deg);
}

.stack-grid > li:nth-child(3n + 3)::before {
  opacity: 0.4;
  filter: hue-rotate(18deg);
}

@media (min-width: 1024px) {
  .stack-grid > li:last-child::before {
    opacity: 0.65;
    filter: hue-rotate(24deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .stack-card {
    animation: stack-card-glow 5.5s ease-in-out infinite;
  }

  @keyframes stack-card-glow {
    0%,
    100% {
      border-color: var(--border);
    }
    50% {
      border-color: rgba(52, 211, 216, 0.22);
    }
  }

  .stack-grid > li:nth-child(2) {
    animation-delay: 0.55s;
  }

  .stack-grid > li:nth-child(3) {
    animation-delay: 1.1s;
  }

}

.stack-card:hover {
  animation-play-state: paused;
  transform: translateY(-4px);
  border-color: rgba(52, 211, 216, 0.28);
  box-shadow: 0 16px 36px -20px rgba(0, 0, 0, 0.65);
}

.stack-card:hover::before {
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .stack-card {
    animation: none;
  }

  .stack-card:hover {
    transform: none;
  }
}

.stack-card__label {
  display: block;
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

.stack-card__value {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.52;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.section--contact {
  padding-bottom: clamp(2.5rem, 6vw, 3.75rem);
}

.contact-intro {
  margin-bottom: 1.75rem;
}

.contact-intro p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.contact-intro p:last-child {
  margin-bottom: 0;
}

.contact-intro strong {
  color: var(--text);
  font-weight: 600;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-list li {
  border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
  border-bottom: 0;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.35rem;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.contact-row:hover {
  background: var(--surface);
}

.contact-row:hover .contact-row__value {
  color: var(--accent);
}

.contact-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.contact-row:hover .contact-icon {
  color: var(--accent);
  border-color: rgba(52, 211, 216, 0.25);
}

.contact-row__main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.contact-row__label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-soft);
}

.contact-row__value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.15s ease;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--pad) 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-soft);
  text-align: center;
}

.site-footer__copy {
  margin: 0;
}

.site-footer a {
  color: var(--text-muted);
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
