:root {
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", "Geist_Mono", ui-monospace, monospace;

  --bg: #00000c;
  --surface: rgba(0, 0, 10, 0.94);
  --border: rgba(255, 255, 255, 0.06);
  --border-md: rgba(255, 255, 255, 0.1);

  --text-hi:    rgba(255, 255, 255, 0.9);
  --text-mid:   rgba(255, 255, 255, 0.5);
  --text-lo:    rgba(255, 255, 255, 0.22);
  --text-faint: rgba(255, 255, 255, 0.14);

  --accent: rgba(210, 155, 80, 0.7);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: #fff;
  font-family: var(--sans);
  overflow-x: hidden;
  line-height: 1.5;
}

/* touch-action: pan-y lets vertical scrolling pass through the canvas */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
  touch-action: pan-y;
}

#site {
  position: relative;
  z-index: 10;
}

#loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease;
}

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

.loader-ring {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(210, 155, 80, 0.75);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Nav ─────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 58px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 10, 0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-hi);
  user-select: none;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-link {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-lo);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text-hi);
  background: rgba(255, 255, 255, 0.05);
}

/* Restyled to match dark space theme — amber accent instead of plain white */
.nav-cta {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 175, 100, 0.80);
  background: rgba(210, 155, 80, 0.07);
  border: 1px solid rgba(210, 155, 80, 0.22);
  padding: 8px 18px;
  border-radius: 100px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-cta:hover {
  background: rgba(210, 155, 80, 0.14);
  border-color: rgba(210, 155, 80, 0.50);
  color: rgba(240, 200, 130, 0.95);
}

/* ── Hero ────────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.hero-name {
  font-family: var(--sans);
  font-size: clamp(64px, 13vw, 152px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.93);
  text-shadow:
    0 0 80px rgba(200, 140, 55, 0.22),
    0 0 200px rgba(170, 100, 30, 0.1),
    0 3px 16px rgba(0, 0, 0, 0.9);
  margin-bottom: 20px;
  position: relative;
  z-index: 5;
  animation: fadeUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
  /* Parallax transform applied by JS — will-change avoids layout thrash */
  will-change: transform;
}

.hero-sub {
  font-family: var(--mono);
  font-size: clamp(11px, 1.4vw, 15px);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-lo);
  margin-bottom: 52px;
  position: relative;
  z-index: 5;
  animation: fadeUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
  will-change: transform;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 5;
  animation: fadeUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
  will-change: transform;
}

.btn-primary {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  background: #fff;
  color: #000;
  padding: 14px 28px;
  border-radius: 6px;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.87);
  transform: translateY(-1px);
}

.btn-outline {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-mid);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 14px 28px;
  border-radius: 6px;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-hi);
  transform: translateY(-1px);
}

/* Centered absolutely; width:max-content prevents any wrapping mis-alignment */
.cursor-hint {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  will-change: transform;
  opacity: 1;
}

.cursor-hint span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.hint-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
  animation: lineBob 2.4s ease-in-out infinite;
}

/* ── Content wrap ────────────────────────────────────────────── */
.content-wrap {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.sec-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 100px 64px;
}

.sec-rule {
  border: none;
  height: 1px;
  background: var(--border);
  max-width: 1160px;
  margin: 0 auto;
}

.sec-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 22px;
}

.sec-title {
  font-family: var(--sans);
  font-size: clamp(26px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.14;
  color: var(--text-hi);
  margin-bottom: 24px;
  max-width: 580px;
}

.sec-body {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.88;
  color: rgba(255, 255, 255, 0.36);
  max-width: 500px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.chip {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 7px 14px;
  border-radius: 100px;
  cursor: default;
  transition: color 0.2s, border-color 0.2s;
}

.chip:hover {
  color: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.24);
}

/* ── Project grid ────────────────────────────────────────────── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-md);
  border: 1px solid var(--border-md);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 48px;
}

.proj-card {
  background: var(--bg);
  padding: 44px 40px;
  position: relative;
  cursor: pointer;
  /* Tilt transition — fast in, slow out */
  transition: background 0.25s, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  /* Ensure GPU compositing for tilt + stagger */
  will-change: transform;
  transform-style: preserve-3d;
}

.proj-card:hover {
  background: rgba(255, 255, 255, 0.025);
  /* transform set dynamically by JS tilt handler */
}

.proj-card::after {
  content: "↗";
  position: absolute;
  top: 42px; right: 40px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.12);
  transition: color 0.2s, transform 0.2s;
}

.proj-card:hover::after {
  color: rgba(255, 255, 255, 0.55);
  transform: translate(3px, -3px);
}

/* Vertical stagger: even cards start offset, animate in on reveal */
.proj-card:nth-child(even) {
  transition: background 0.25s, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.7s ease, --stagger 0.7s ease;
}

.proj-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.15);
  margin-bottom: 28px;
}

.proj-title {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 10px;
}

/* Coming-soon badge replaces description */
.coming-soon-badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  margin-bottom: 8px;
}

.coming-soon-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(210, 155, 80, 0.55);
  flex-shrink: 0;
  animation: csDotPulse 2.8s ease-in-out infinite;
}

@keyframes csDotPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%       { opacity: 1.00; transform: scale(1.3); }
}

.proj-tags {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 24px;
}

.proj-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.2);
}

/* ── Contact ─────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 48px;
}

.c-group { margin-bottom: 26px; }

.c-label {
  font-family: var(--mono);
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 10px;
}

.c-input {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 13px 16px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.72);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.c-input::placeholder { color: rgba(255, 255, 255, 0.13); }
.c-input:focus { border-color: rgba(255, 255, 255, 0.22); }
.c-textarea { min-height: 120px; resize: vertical; }

.btn-send {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #000;
  border: none;
  cursor: pointer;
  padding: 13px 24px;
  border-radius: 6px;
  transition: background 0.2s, transform 0.2s;
}

.btn-send:hover {
  background: rgba(255, 255, 255, 0.87);
  transform: translateY(-1px);
}

.ci-item { margin-bottom: 28px; }

.ci-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.18);
  margin-bottom: 7px;
}

.ci-val {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-mid);
}

.ci-val a {
  color: var(--text-mid);
  text-decoration: none;
  display: block;
  transition: color 0.2s;
}

.ci-val a:hover { color: var(--text-hi); }

.availability-badge {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  color: rgba(90, 210, 100, 0.75);
  display: flex;
  align-items: center;
  gap: 8px;
}

.avail-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(90, 210, 100, 0.8);
  flex-shrink: 0;
  animation: dotGlow 2.5s ease-in-out infinite;
}

@keyframes dotGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(90, 210, 100, 0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(90, 210, 100, 0); }
}

/* ── Footer ──────────────────────────────────────────────────── */
#footer {
  position: relative;
  z-index: 10;
  background:
    /* Wide inner hot-spot (stays flat even on narrow viewports) */
    radial-gradient(ellipse 160% 80% at 50% 100%, rgba(230,108,35,0.88) 0%, rgba(160,65,18,0.65) 22%, rgba(55,22,8,0.45) 48%, transparent 68%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(255,185,75,0.75) 0%, rgba(200,88,28,0.45) 28%, transparent 55%),
    linear-gradient(to bottom, #0a0a0a 0%, #0e0a05 45%, #180d04 68%, #070303 100%);
}

#footer::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255,155,55,0.35) 18%,
    rgba(255,205,100,0.92) 50%,
    rgba(255,155,55,0.35) 82%,
    transparent 100%
  );
}

.ft-topbar {
  height: 56px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ft-logo {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
  text-decoration: none;
}

.ft-toplinks {
  display: flex;
  gap: 4px;
}

.ft-toplink {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.ft-toplink:hover {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.05);
}

.ft-cta { font-size: 10px; padding: 7px 16px; }

.ft-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 48px 48px 56px;
  max-width: 1200px;
  gap: 0;
}

.ft-col-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
  margin-bottom: 18px;
}

.ft-link {
  font-family: var(--sans);
  display: block;
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.ft-link:hover { color: rgba(255, 255, 255, 0.9); }

.ft-spacer { height: 180px; }

.ft-bottom {
  padding: 18px 48px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ft-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.04em;
}

/* ── Legal pages ─────────────────────────────────────────────── */
.legal-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 48px 100px;
}

.legal-back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-lo);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 40px;
  transition: color 0.2s;
}

.legal-back:hover { color: var(--text-hi); }

.legal-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.legal-title {
  font-family: var(--sans);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-hi);
  margin-bottom: 10px;
}

.legal-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-lo);
  letter-spacing: 0.06em;
  margin-bottom: 48px;
}

.legal-section {
  margin-bottom: 36px;
}

.legal-section h2 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
}

.legal-section p,
.legal-section li {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(255,255,255,0.40);
}

.legal-section ul {
  padding-left: 20px;
  margin-top: 10px;
}

.legal-section li { margin-bottom: 6px; }

.legal-section a {
  color: rgba(210,155,80,0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-section a:hover { color: rgba(210,155,80,1); }

.legal-divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* ── Reveal animations ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes lineBob {
  0%, 100% { transform: scaleY(1);   opacity: 0.4; }
  50%       { transform: scaleY(0.4); opacity: 0.12; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  #nav { padding: 0 20px; }
  .nav-links { display: none; }

  .hero-name { font-size: clamp(52px, 16vw, 96px); }

  .sec-inner { padding: 64px 24px; }
  .sec-rule  { margin: 0; }

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

  .ft-topbar, .ft-bottom { padding: 12px 24px; }
  .ft-cols {
    grid-template-columns: repeat(2, 1fr);
    padding: 40px 24px;
    gap: 32px;
  }
  .ft-spacer { height: 100px; }

  /* Footer gradient: use viewport-relative widths so it stays wide and flat,
     not a small circle blob on narrow screens */
  #footer {
    background:
      radial-gradient(ellipse 300% 80% at 50% 100%, rgba(230,108,35,0.88) 0%, rgba(160,65,18,0.65) 22%, rgba(55,22,8,0.45) 48%, transparent 68%),
      radial-gradient(ellipse 200% 44% at 50% 100%, rgba(255,185,75,0.75) 0%, rgba(200,88,28,0.45) 28%, transparent 55%),
      linear-gradient(to bottom, #0a0a0a 0%, #0e0a05 45%, #180d04 68%, #070303 100%);
  }

  .legal-wrap { padding: 100px 24px 80px; }
}

@media (max-width: 480px) {
  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .ft-cols { grid-template-columns: 1fr; }
}
