:root {
  --bg-0: #07090d;
  --bg-1: #0d1218;
  --bg-2: #101923;
  --line: #1d2a36;
  --line-strong: #2a3d4f;
  --text: #d9e2ea;
  --muted: #8c9bab;
  --accent: #ff3d2e;
  --accent-soft: rgba(255, 61, 46, 0.22);
  --cyan: #3bc9db;
  --green: #35d07f;
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Sora", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(255, 61, 46, 0.08), transparent 60%),
    radial-gradient(900px 600px at -10% 10%, rgba(59, 201, 219, 0.08), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 6px),
    var(--bg-0);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  cursor: url("cursor-default.svg") 16 16, crosshair;
}

::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: inherit;
}

a,
button,
.btn,
.mini-link,
.scroll-cue,
.nav-toggle,
.card {
  cursor: url("cursor-action.svg") 6 5, pointer;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

body.nav-open {
  overflow: hidden;
}

nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(7, 9, 13, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease;
}

nav.scrolled {
  border-color: var(--line);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: "Share Tech Mono", monospace;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.4rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  transition: color 180ms ease;
}

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

.nav-toggle {
  border: 1px solid var(--line);
  background: #0c1218;
  width: 42px;
  height: 38px;
  border-radius: 10px;
  color: var(--text);
  display: none;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 78px 0 30px;
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 52vmax;
  height: 52vmax;
  border-radius: 999px;
  filter: blur(55px);
  pointer-events: none;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: -18px;
  pointer-events: none;
  background: radial-gradient(circle at 25% 20%, rgba(59, 201, 219, 0.08), transparent 36%),
    radial-gradient(circle at 80% 78%, rgba(255, 61, 46, 0.08), transparent 34%);
  filter: blur(18px);
}

.hero::before {
  background: radial-gradient(circle, rgba(255, 61, 46, 0.2), transparent 65%);
  right: -14vmax;
  top: -20vmax;
  animation: drift 9s ease-in-out infinite;
}

.hero::after {
  background: radial-gradient(circle, rgba(59, 201, 219, 0.16), transparent 65%);
  left: -20vmax;
  bottom: -18vmax;
  animation: drift 11s ease-in-out infinite reverse;
}

.hero-stage {
  position: relative;
  z-index: 1;
  width: min(1180px, 96vw);
  max-width: 1180px;
  transform: translateY(0);
  transition: transform 220ms linear, opacity 220ms linear;
}

.hero-layout {
  display: grid;
  gap: 20px;
  align-items: center;
  transition: grid-template-columns 760ms cubic-bezier(0.22, 1, 0.2, 1);
}

.hero-layout.boot {
  grid-template-columns: minmax(0, 1fr);
}

.hero-layout.docked {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.hero-terminal {
  width: min(1040px, 94vw);
  margin: 0 auto;
  border-color: rgba(59, 201, 219, 0.28);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 61, 46, 0.08);
  transform-style: preserve-3d;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.2, 1), border-color 200ms ease, width 760ms cubic-bezier(0.22, 1, 0.2, 1);
}

.hero-terminal::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(59, 201, 219, 0.2);
  box-shadow: 0 0 28px rgba(59, 201, 219, 0.13), inset 0 0 24px rgba(255, 61, 46, 0.08);
}

.hero-terminal:hover {
  border-color: rgba(59, 201, 219, 0.45);
}

.hero-layout.docked .hero-terminal {
  width: min(760px, 100%);
}

.hero-identity {
  padding: 24px;
  text-align: left;
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
  transition: opacity 640ms ease, transform 640ms cubic-bezier(0.22, 1, 0.2, 1), filter 640ms ease;
}

.hero-layout.boot.ready .hero-identity {
  opacity: 0;
  transform: translateX(26px) scale(0.98);
  filter: blur(4px);
  pointer-events: none;
}

.hero-layout.docked.ready .hero-identity {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
}

.hero-meta {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #a8d8df;
  border: 1px solid rgba(59, 201, 219, 0.3);
  background: rgba(59, 201, 219, 0.08);
  border-radius: 999px;
  padding: 0.25rem 0.62rem;
  animation: flicker 2.8s linear infinite;
}

.meta-pill:nth-child(2) {
  animation-delay: 200ms;
}

.meta-pill:nth-child(3) {
  animation-delay: 420ms;
}

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 25, 35, 0.72), rgba(13, 18, 24, 0.72));
  border-radius: var(--radius);
}

.kicker {
  font-family: "Share Tech Mono", monospace;
  color: var(--cyan);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 0.74rem;
  margin-bottom: 16px;
  opacity: 0.92;
}

h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-name {
  font-size: clamp(2rem, 5.8vw, 4.35rem);
  line-height: 1.04;
  overflow-wrap: normal;
  word-break: normal;
  text-shadow: 0 0 20px rgba(255, 61, 46, 0.18);
  animation: titleGlow 3.8s ease-in-out infinite;
}

.hero-layout.docked .hero-name {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
}

h1 span {
  color: var(--accent);
  display: block;
  line-height: 0.96;
  white-space: nowrap;
}

.hero-sub {
  margin: 16px 0 0;
  color: var(--muted);
  max-width: 64ch;
}

.cta-row {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-cta {
  justify-content: flex-start;
}

.scroll-cue {
  display: inline-flex;
  margin-top: 30px;
  text-decoration: none;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(140, 155, 171, 0.26);
  animation: pulse 1.7s ease-in-out infinite;
}

.scroll-cue:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.btn {
  text-decoration: none;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.72rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  transition: all 200ms ease;
}

.btn.primary {
  background: linear-gradient(130deg, var(--accent), #f26f35);
  border-color: transparent;
  color: #fff;
}

.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.terminal {
  overflow: hidden;
  position: relative;
}

.terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0,
    rgba(255, 255, 255, 0.028) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
  opacity: 0.45;
}

.term-top {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  display: inline-block;
  margin-right: 5px;
}

.term-dot.r {
  background: #ff5f56;
}

.term-dot.y {
  background: #ffbd2e;
}

.term-dot.g {
  background: #27c93f;
}

.term-body {
  min-height: 335px;
  max-height: 335px;
  overflow: hidden;
  padding: 14px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.77rem;
  color: #d5dee8;
  position: relative;
}

.hero-terminal .term-body {
  min-height: 430px;
  max-height: 430px;
  text-align: left;
}

.hero-layout.docked .hero-terminal .term-body {
  min-height: 360px;
  max-height: 360px;
}

.term-body::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.22) 100%);
}

.term-body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(59, 201, 219, 0.08) 46%, transparent 100%);
  transform: translateY(-100%);
  animation: scanner 4.2s linear infinite;
}

.log-line {
  margin-bottom: 7px;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0;
  transform: translateY(4px);
  animation: reveal 240ms ease forwards;
}

.log-time {
  color: var(--muted);
  margin-right: 9px;
}

.log-good {
  color: var(--green);
}

.log-warn {
  color: #ffd166;
}

.log-hot {
  color: #ff867a;
}

main section {
  padding: 30px 0 46px;
}

.section-head {
  margin-bottom: 16px;
}

.section-code {
  font-family: "Share Tech Mono", monospace;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.section-title {
  margin-top: 6px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.grid {
  display: grid;
  gap: 14px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 25, 35, 0.8), rgba(13, 18, 24, 0.8));
  padding: 18px;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.12), transparent 42%);
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.card:hover::before {
  opacity: 1;
}

.tag {
  font-family: "Share Tech Mono", monospace;
  display: inline-block;
  color: #f6b6b0;
  background: rgba(255, 61, 46, 0.14);
  border: 1px solid rgba(255, 61, 46, 0.28);
  border-radius: 8px;
  padding: 0.14rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.64rem;
  margin-bottom: 0.65rem;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.card p {
  color: var(--muted);
  font-size: 0.91rem;
}

.stat-row {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(13, 18, 24, 0.8);
}

.stat strong {
  display: block;
  font-family: "Share Tech Mono", monospace;
  color: var(--accent);
  font-size: 1rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.78rem;
}

.links-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-link {
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
}

.mini-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.mail {
  color: var(--accent);
  text-decoration: none;
  font-family: "Share Tech Mono", monospace;
  border: 1px solid rgba(255, 61, 46, 0.35);
  border-radius: 10px;
  padding: 0.7rem 1rem;
}

footer {
  margin: 28px 0 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.99);
  transition: opacity 760ms cubic-bezier(0.21, 1, 0.2, 1), transform 760ms cubic-bezier(0.21, 1, 0.2, 1);
}

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

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes titleGlow {
  0%,
  100% {
    text-shadow: 0 0 18px rgba(255, 61, 46, 0.12);
  }
  50% {
    text-shadow: 0 0 30px rgba(255, 61, 46, 0.3);
  }
}

@keyframes flicker {
  0%,
  100% {
    opacity: 0.95;
  }
  48% {
    opacity: 0.88;
  }
  49% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.93;
  }
  78% {
    opacity: 0.87;
  }
  79% {
    opacity: 0.52;
  }
  80% {
    opacity: 0.97;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-16px, 18px);
  }
}

@keyframes scanner {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    align-items: flex-start;
    padding-bottom: 18px;
  }
  .hero-layout.docked {
    grid-template-columns: 1fr;
  }
  .hero-identity {
    text-align: center;
    transform: translateY(18px) scale(0.98);
  }
  .hero-layout.docked .hero-identity {
    transform: translateY(0) scale(1);
  }
  .hero-meta {
    justify-content: center;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-terminal {
    width: min(980px, 96vw);
  }
  .hero-terminal .term-body {
    min-height: 240px;
    max-height: 240px;
  }
  .term-body {
    min-height: 240px;
    max-height: 240px;
  }
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    position: absolute;
    inset: 72px 0 auto 0;
    background: rgba(7, 9, 13, 0.97);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 14px 4vw 16px;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .grid.cards {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 86px;
    min-height: auto;
  }
  .hero-name {
    font-size: clamp(1.72rem, 8.7vw, 2.45rem);
    line-height: 1.12;
  }
  .hero-name span {
    font-size: 0.95em;
  }
  .hero-sub {
    font-size: 0.92rem;
  }
  .hero-identity {
    padding: 18px;
  }
  .hero-terminal {
    width: min(980px, 98vw);
  }
  .hero-layout.boot.ready .hero-identity,
  .hero-layout.docked.ready .hero-identity,
  .hero-identity {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    pointer-events: auto;
  }
  .hero-layout {
    grid-template-columns: 1fr;
  }
  .hero-terminal .term-body {
    min-height: 220px;
    max-height: 220px;
  }
  .log-line {
    font-size: 0.74rem;
  }
  .scroll-cue {
    margin-top: 18px;
  }
  .hero-meta {
    margin-top: 2px;
    gap: 6px;
  }
  .meta-pill {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    padding: 0.22rem 0.5rem;
  }
  .contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .hero {
    padding-top: 82px;
  }
  .hero-identity {
    padding: 14px;
  }
  .hero-name {
    font-size: clamp(1.58rem, 8.2vw, 2.05rem);
    line-height: 1.14;
  }
  .hero-name span {
    font-size: 0.9em;
  }
  .hero-sub {
    font-size: 0.88rem;
  }
  .cta-row {
    gap: 8px;
    justify-content: center;
  }
  .btn {
    font-size: 0.72rem;
    padding: 0.64rem 0.78rem;
  }
  .hero-terminal .term-body {
    min-height: 200px;
    max-height: 200px;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
