:root {
  --ink: #0c1016;
  --ink-soft: #151b23;
  --cream: #f7f1e7;
  --sand: #f2e6d4;
  --coral: #ff6f3c;
  --mint: #3fd3c2;
  --sun: #f2b841;
  --glow: rgba(255, 111, 60, 0.35);
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --serif: "Literata", "Georgia", serif;
}

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

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  transition: background 0.6s ease, color 0.6s ease;
}

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

.ambient {
  position: fixed;
  inset: -10% 0 0 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 111, 60, 0.18), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(63, 211, 194, 0.2), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(242, 184, 65, 0.18), transparent 45%),
    repeating-linear-gradient(0deg, rgba(12, 16, 22, 0.04) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(12, 16, 22, 0.035) 0 1px, transparent 1px 48px);
  opacity: 0.9;
  z-index: -2;
  animation: drift 18s ease-in-out infinite alternate;
}

.cursor-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at var(--cursor-x, 20%) var(--cursor-y, 20%), rgba(255, 111, 60, 0.18), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

body.cursor-active .cursor-glow {
  opacity: 1;
}

@keyframes drift {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-30px) scale(1.02);
  }
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(247, 241, 231, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(12, 16, 22, 0.08);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.75rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 5rem 1.75rem;
}

.hero {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  padding-top: 6rem;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: 1.05;
  margin: 1rem 0;
}

.lead {
  font-size: 1.1rem;
  max-width: 540px;
}

.badge {
  display: inline-flex;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.08);
  font-family: var(--mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(12, 16, 22, 0.15);
}

.btn.primary {
  background: var(--ink);
  color: var(--cream);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
  font-family: var(--mono);
}

.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  display: block;
  opacity: 0.6;
}

.meta-value {
  font-size: 0.95rem;
}

.hero-panel {
  display: grid;
  gap: 1.5rem;
}

.panel-card {
  background: var(--sand);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(12, 16, 22, 0.12);
  box-shadow: 0 18px 40px rgba(12, 16, 22, 0.12);
  overflow: hidden;
}

.profile-card {
  display: grid;
  gap: 1.2rem;
  align-items: center;
  grid-template-columns: 120px 1fr;
}

.panel-title {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.profile-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(12, 16, 22, 0.1);
  box-shadow: 0 12px 30px rgba(12, 16, 22, 0.2);
}

.profile-text p {
  margin: 0;
}

.note-card {
  background: linear-gradient(145deg, rgba(255, 111, 60, 0.18), rgba(63, 211, 194, 0.2));
}

.note-sign {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 0.5rem;
}

.section-head p {
  max-width: 620px;
  margin-top: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  background: #fff;
  border-radius: 20px;
  padding: 1.8rem;
  border: 1px solid rgba(12, 16, 22, 0.08);
  box-shadow: 0 10px 30px rgba(12, 16, 22, 0.08);
  transition: box-shadow 0.3s ease;
}

.metrics {
  display: flex;
  margin-top: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metrics span {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.06);
}


.card h3 {
  font-family: var(--display);
  margin-top: 0;
}

.card-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-top: 1.2rem;
  opacity: 0.7;
}

.explain {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(12, 16, 22, 0.2);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.explain-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.6rem 0;
}

.explain button {
  border: 1px solid rgba(12, 16, 22, 0.3);
  background: transparent;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-family: var(--mono);
  cursor: pointer;
  font-size: 0.7rem;
}

.explain-output {
  margin: 0.6rem 0 0;
  color: rgba(12, 16, 22, 0.7);
}

.systems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.system-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 1.6rem;
  border: 1px solid rgba(12, 16, 22, 0.08);
  box-shadow: 0 10px 25px rgba(12, 16, 22, 0.06);
}

.system-card h3 {
  font-family: var(--display);
  margin-top: 0;
}

.map {
  margin-top: 2.5rem;
  background: var(--ink);
  color: var(--cream);
  padding: 2rem;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(12, 16, 22, 0.25);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.4fr);
  gap: 2rem;
}

.map-caption {
  font-family: var(--mono);
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 1rem;
}

.map-panel {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.map-title {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  opacity: 0.7;
}

.map-panel h3 {
  font-family: var(--display);
  margin: 0;
}

.map-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.map-tags span {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.constellation {
  position: relative;
  min-height: 320px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 111, 60, 0.18), transparent 40%),
    radial-gradient(circle at 70% 10%, rgba(63, 211, 194, 0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(242, 184, 65, 0.16), transparent 40%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.constellation::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.35;
  pointer-events: none;
}

.map-node {
  position: absolute;
  top: calc(var(--y) * 1%);
  left: calc(var(--x) * 1%);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(12, 16, 22, 0.6);
  color: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: float 6s ease-in-out infinite;
}

.map-node:hover,
.map-node.active {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 12px 25px rgba(255, 111, 60, 0.25);
  border-color: rgba(255, 111, 60, 0.6);
}

.map-node:nth-child(2n) {
  animation-delay: -1.5s;
}

.map-node:nth-child(3n) {
  animation-delay: -3s;
}

.map-node:nth-child(4n) {
  animation-delay: -4.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-6px);
  }
}

.case-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.case-card {
  background: #fff;
  border-radius: 20px;
  padding: 1.6rem;
  border: 1px solid rgba(12, 16, 22, 0.08);
}

.case-card h3 {
  font-family: var(--display);
  margin-top: 0;
}

.case-card ul {
  padding-left: 1.2rem;
  margin: 1rem 0 0;
}

.search {
  margin-top: 2rem;
}

.search input {
  width: min(680px, 100%);
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(12, 16, 22, 0.2);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.search-results {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.search-card {
  padding: 1rem 1.2rem;
  border-radius: 16px;
  background: rgba(12, 16, 22, 0.05);
  border: 1px solid rgba(12, 16, 22, 0.1);
}

.search-card h4 {
  font-family: var(--display);
  margin: 0 0 0.4rem;
}

.search-empty {
  font-family: var(--mono);
  opacity: 0.6;
}

.simulator {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.simulator-panel {
  background: #fff;
  border-radius: 22px;
  padding: 1.8rem;
  border: 1px solid rgba(12, 16, 22, 0.1);
}

.simulator-panel label {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.simulator-panel input[type="range"] {
  width: 100%;
  margin: 1rem 0 1.5rem;
}

.simulator-readout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.sim-number {
  font-family: var(--display);
  font-size: 1.4rem;
}

.sim-label {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.simulator-notes {
  background: var(--sand);
  border-radius: 22px;
  padding: 1.8rem;
  border: 1px solid rgba(12, 16, 22, 0.1);
}

.simulator-notes h3 {
  font-family: var(--display);
  margin-top: 0;
}

.sim-tip {
  font-family: var(--mono);
  font-size: 0.8rem;
  opacity: 0.7;
}

.build-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.build-card {
  background: #fff;
  border-radius: 20px;
  padding: 1.6rem;
  border: 1px solid rgba(12, 16, 22, 0.08);
}

.build-card h3 {
  font-family: var(--display);
  margin-top: 0;
}

.build-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.build-flow span {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.08);
}

.timeline {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.time {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  opacity: 0.7;
}

.timeline-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 1.6rem 1.6rem 1.6rem 2.4rem;
  border: 1px solid rgba(12, 16, 22, 0.08);
  box-shadow: 0 12px 30px rgba(12, 16, 22, 0.08);
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 111, 60, 0.5), rgba(63, 211, 194, 0.5));
  opacity: 0.5;
}

.timeline-dot {
  position: absolute;
  left: 10px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--ink);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 4px rgba(255, 111, 60, 0.2);
}

.timeline-role {
  font-family: var(--display);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-tags span {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.06);
}

.signals {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.signal {
  padding: 1.6rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(12, 16, 22, 0.08);
}

.signal h3 {
  font-family: var(--display);
  margin-top: 0;
}

.contact {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.footer {
  max-width: 1120px;
  margin: 0 auto 3rem;
  padding: 0 1.75rem;
  font-family: var(--mono);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.tilt {
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.tilt:hover {
  box-shadow: 0 20px 40px rgba(12, 16, 22, 0.18);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 780px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .map {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .time {
    margin-bottom: 0.6rem;
  }

  .timeline-card {
    padding-left: 2rem;
  }
}
