:root {
  --bg: #09090b;
  --surface: #111115;
  --surface-hover: #16161c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f3ee;
  --muted: #8c8c96;
  --dim: #5c5c66;
  --accent: #ff4d2d;
  --accent-soft: rgba(255, 77, 45, 0.14);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Subtle Architectural Micro-Dot Grid & Cursor Glow */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 25%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 25%, #000 35%, transparent 100%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(640px circle at var(--mx, 65%) var(--my, 28%), rgba(255, 77, 45, 0.065), transparent 60%);
  transition: opacity 0.4s ease;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}

.brand-emblem {
  display: block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand:hover .brand-emblem {
  transform: rotate(-4deg) scale(1.04);
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-muted {
  font-weight: 500;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease;
}

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

.lang-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-opt {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.lang-opt.active {
  background: var(--text);
  color: var(--bg);
}

/* HERO */
.hero {
  padding: clamp(56px, 9vh, 108px) 24px clamp(64px, 10vh, 112px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 28px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 77, 45, 0.75);
  display: inline-block;
  flex-shrink: 0;
}

.live-dot.sm {
  width: 6px;
  height: 6px;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.85rem, 6.2vw, 4.8rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--text);
  margin-bottom: 24px;
}

.title-accent {
  color: rgba(244, 243, 238, 0.72);
}

.vermilion-period {
  color: var(--accent);
}

.hero-lead {
  font-size: 1.05rem;
  line-height: 1.68;
  color: var(--muted);
  max-width: 510px;
  margin-bottom: 34px;
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 44px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
}

.btn-primary:hover {
  background: #ffffff;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.meta-v {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
}

.meta-sep {
  width: 1px;
  height: 26px;
  background: var(--border);
}

/* ICONIC STUDIO ARTIFACT (Precision Interactive Monolith) */
.hero-visual {
  display: flex;
  justify-content: center;
}

.artifact-scene {
  perspective: 1100px;
  width: 100%;
  max-width: 400px;
}

.artifact-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.06;
  border-radius: 22px;
  cursor: pointer;
  outline: none;
  transform-style: preserve-3d;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}

.artifact-card:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

/* Glowing Vermilion Inner Core (Revealed cleanly when bitten) */
.artifact-core {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, #ff5b37 0%, #d93518 100%);
  border: 1px solid rgba(255, 130, 100, 0.5);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px;
}

.core-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(9, 9, 11, 0.24) 1px, transparent 1px);
  background-size: 10px 10px;
}

.core-code {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #09090b;
  background: rgba(244, 243, 238, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Anodized Dark Titanium Front Plate */
.artifact-plate {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: linear-gradient(160deg, #16161c 0%, #0e0e12 100%);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  transition: clip-path 0.36s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease;
}

/* Engaged Surgical Bite State — Clean Geometric Corner Bite! */
.artifact-card.bitten .artifact-plate {
  clip-path: polygon(
    0% 0%,
    64% 0%,
    68% 11%,
    75% 8%,
    81% 19%,
    89% 16%,
    100% 27%,
    100% 100%,
    0% 100%
  );
  border-color: rgba(255, 77, 45, 0.45);
}

.plate-spec {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(300px circle at var(--px, 50%) var(--py, 30%), rgba(255, 255, 255, 0.07), transparent 65%);
}

.plate-top,
.plate-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mono-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.status-tag {
  color: var(--muted);
  transition: color 0.2s;
}

.artifact-card.bitten .status-tag {
  color: var(--accent);
}

.interactive-hint {
  color: var(--muted);
  transition: color 0.2s;
}

.artifact-card:hover .interactive-hint {
  color: var(--text);
}

.emblem-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-svg {
  width: 78%;
  height: auto;
  display: block;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.artifact-card.bitten .hero-svg {
  transform: scale(1.035);
}

.mark-ember {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.artifact-card.bitten .mark-ember {
  opacity: 1;
}

.fang-cutout,
.fang-highlight {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: 166px 114px;
}

.artifact-card.bitten .fang-cutout,
.artifact-card.bitten .fang-highlight {
  transform: translateX(-5px) scale(1.12);
}

.mark-fang-l,
.mark-fang-r {
  transition: transform 0.22s ease;
  transform-origin: 110px 148px;
}

.artifact-card.bitten .mark-fang-l,
.artifact-card.bitten .mark-fang-r {
  transform: scaleY(1.35);
}

/* SECTIONS */
.section {
  padding: 56px 24px;
}

.section-header {
  margin-bottom: 32px;
}

.section-index {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  max-width: 560px;
}

/* BENTO GRID */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.bento-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.card-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--dim);
}

.card-ico {
  color: var(--muted);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

.matrix-wrap {
  margin-top: auto;
  padding-top: 10px;
}

#dot-matrix {
  width: 100%;
  height: 32px;
  display: block;
  border-radius: 6px;
  background: #09090c;
  border: 1px solid var(--border);
}

/* CONTACT BAND */
.contact-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.contact-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.contact-sub {
  font-size: 0.94rem;
  color: var(--muted);
  max-width: 440px;
}

.contact-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px 13px 20px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.16s, transform 0.12s;
}

.email-pill:hover {
  border-color: var(--accent);
}

.email-pill:active {
  transform: scale(0.985);
}

.copy-badge {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-hover);
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.email-pill.copied .copy-badge {
  background: var(--accent);
  color: #fff;
}

.mail-direct {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.mail-direct:hover {
  color: var(--text);
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--dim);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text);
}

.dot-sep {
  color: var(--dim);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    order: -1;
  }
  .artifact-scene {
    max-width: 310px;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .contact-right {
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }
  .meta-sep {
    display: none;
  }
  .email-pill {
    font-size: 0.82rem;
  }
}
