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

:root {
  --bg: #0a0a0a;
  --bg-card: #111;
  --text: #999;
  --text-bright: #e5e5e5;
  --text-muted: #444;
  --gold: #C5B358;
  --gold-dim: rgba(197, 179, 88, 0.2);
  --gold-glow: rgba(197, 179, 88, 0.08);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --font: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #000; }

a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease); }
a:hover { color: var(--text-bright); }

/* ── Scroll animations ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ═══════════════════════════════════
   HERO
   ═══════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #050505;
}

.hero-game {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-game canvas { display: block; }

/* Subtle vignette over game */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(5,5,5,0.6) 100%);
}

/* Intro — top left */
.hero-intro {
  position: absolute;
  top: clamp(32px, 6vh, 56px);
  left: clamp(24px, 4vw, 48px);
  z-index: 10;
  pointer-events: none;
}

.intro-name {
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--text-bright);
  margin-bottom: clamp(16px, 3vh, 28px);
}

.intro-roles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.intro-roles p {
  font-size: clamp(12px, 1.4vw, 14px);
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text);
  line-height: 1.8;
  text-transform: uppercase;
}

.intro-roles s {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  margin-right: 8px;
}

/* Bottom bar */
.hero-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 48px);
  background: linear-gradient(to top, rgba(5,5,5,0.95) 0%, transparent 100%);
}

.hero-bar-left {
  display: flex;
  gap: 12px;
}

.icon-link {
  color: var(--text-muted);
  transition: all 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(8px);
}

.icon-link:hover {
  color: var(--text-bright);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hero-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-scroll {
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease);
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(8px);
  animation: bounce 2s infinite;
}

.hero-scroll:hover {
  color: var(--text-bright);
  border-color: var(--border-hover);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ═══════════════════════════════════
   SECTIONS
   ═══════════════════════════════════ */
.section {
  padding: clamp(64px, 10vh, 120px) clamp(24px, 4vw, 48px);
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: clamp(32px, 5vh, 48px);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ═══════════════════════════════════
   WORK — 3D tilt cards
   ═══════════════════════════════════ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.work-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.35s var(--ease), border-color 0.25s, transform 0.25s;
}

.work-card:hover {
  border-color: rgba(197, 179, 88, 0.4);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(197, 179, 88, 0.25);
}

.work-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  display: block;
  filter: brightness(0.78) saturate(0.9);
  transition: all 0.45s var(--ease);
}

.work-card:hover .work-card-img {
  filter: brightness(1) saturate(1.05);
  transform: scale(1.04);
}

.work-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.2) 45%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.35s;
}

.work-card:hover .work-card-overlay {
  opacity: 0.7;
}

.work-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
}

.work-card-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

.work-card-tags {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  color: rgba(197, 179, 88, 0.7);
  margin-top: 5px;
  transition: color 0.3s;
}

.work-card:hover .work-card-tags {
  color: rgba(197, 179, 88, 1);
}

.work-card-arrow {
  font-size: 20px;
  color: rgba(255,255,255,0.3);
  transition: all 0.3s var(--ease);
  opacity: 0;
  transform: translate(-6px, 4px);
  flex-shrink: 0;
}

.work-card:hover .work-card-arrow {
  opacity: 1;
  transform: translate(0, 0);
  color: var(--gold);
}

/* Tilt glare */
.tilt-glare-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
}

.tilt-glare {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
}

/* ═══════════════════════════════════
   CAPABILITIES
   ═══════════════════════════════════ */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cap-item {
  background: var(--bg);
  padding: 24px 20px;
  transition: all 0.3s var(--ease);
  position: relative;
}

.cap-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 0;
  background: var(--gold);
  transition: height 0.3s var(--ease);
}

.cap-item:hover {
  background: #111;
}

.cap-item:hover::before {
  height: 2px;
}

.cap-num {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.cap-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text);
  text-transform: uppercase;
  transition: color 0.3s;
}

.cap-item:hover .cap-name {
  color: var(--text-bright);
}

/* ═══════════════════════════════════
   ABOUT
   ═══════════════════════════════════ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-text p {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1.9;
  color: var(--text);
}

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

.about-badges {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--border);
}

.badge {
  padding: 20px 0 20px 28px;
  border-bottom: 1px solid var(--border);
}

.badge:last-child { border-bottom: none; }

.badge-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.5px;
}

.badge-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ═══════════════════════════════════
   CONTACT
   ═══════════════════════════════════ */
.contact-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-headline {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 24px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.contact-btn:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: var(--gold-glow);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(197, 179, 88, 0.08);
}

.contact-btn-primary {
  background: var(--gold);
  color: #0a0a0a;
  border-color: var(--gold);
}

.contact-btn-primary:hover {
  background: var(--gold);
  color: #0a0a0a;
  opacity: 0.9;
  box-shadow: 0 4px 24px rgba(197, 179, 88, 0.15);
}

.contact-info {
  display: flex;
  gap: 32px;
}

.contact-info a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.contact-info a:hover { color: var(--text-bright); }

/* ═══════════════════════════════════
   MODAL
   ═══════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: #111;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 90%;
  max-width: 460px;
  padding: 36px;
  position: relative;
  animation: modalIn 0.4s var(--ease);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}
.modal-close:hover { color: var(--text-bright); border-color: var(--border-hover); }

.modal-body h2 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 24px;
  color: var(--text-bright);
  text-transform: uppercase;
}

.modal-body label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 16px;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-bright);
  transition: all 0.3s var(--ease);
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.modal-body textarea { resize: vertical; min-height: 64px; }
.modal-body select { cursor: pointer; }
.modal-body select option { background: #111; }

.modal-submit {
  width: 100%;
  margin-top: 24px;
  padding: 13px;
  background: var(--gold);
  color: #0a0a0a;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.modal-submit:hover { box-shadow: 0 0 20px var(--gold-glow); }
.modal-submit:disabled { opacity: 0.3; cursor: not-allowed; }

.modal-success { text-align: center; padding: 20px 0; }
.modal-success h2 { color: var(--text-bright); }
.modal-success p { color: var(--text); margin-top: 8px; font-size: 12px; }

/* ═══════════════════════════════════
   FOOTER
   ═══════════════════════════════════ */
.footer {
  padding: 32px clamp(24px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
@media (max-width: 768px) {
  .work-grid { grid-template-columns: 1fr; }

  .cap-grid { grid-template-columns: repeat(2, 1fr); }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-badges { border-left: none; border-top: 1px solid var(--border); }
  .badge { padding: 16px 0; }

  .contact-actions { flex-direction: column; }
  .contact-info { flex-direction: column; gap: 12px; }

  .modal { padding: 24px; width: 95%; }

  .footer { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .cap-grid { grid-template-columns: 1fr; }
}
