:root {
  color-scheme: dark;
  --bg: #090d13;
  --panel: #0e1520;
  --panel-head: #121b28;
  --ink: #e6edf3;
  --text: #b9c7d6;
  --muted: #8294a7;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.28);
  --green: #4ade80;
  --orange: #f97316;
  --blue: #38bdf8;
  --yellow: #fbbf24;
  --radius: 14px;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(74, 222, 128, 0.06), transparent 42%),
    radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.05), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.7;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(74, 222, 128, 0.28);
  color: var(--ink);
}

[id] {
  scroll-margin-top: 92px;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  transform: translateY(-160%);
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--panel-head);
  color: var(--green);
  padding: 10px 14px;
  font-size: 14px;
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 13, 19, 0.86);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1080px, calc(100% - 40px));
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 auto;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
}

.brand-mark {
  flex: none;
  border-radius: 7px;
}

.brand-user b {
  color: var(--green);
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}

.nav a:hover {
  background: rgba(148, 163, 184, 0.1);
  color: var(--ink);
}

.nav a[aria-current] {
  color: var(--orange);
}

.nav a[aria-current]::before {
  margin-right: 6px;
  color: var(--orange);
  content: "*";
}

.language-toggle {
  min-width: 52px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.language-toggle:hover {
  border-color: var(--green);
  background: rgba(74, 222, 128, 0.08);
}

/* ---------- layout ---------- */

main {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 72px 0 12px;
}

/* ---------- terminal window ---------- */

.term-window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-head);
  padding: 10px 16px;
}

.term-dots {
  display: inline-flex;
  gap: 6px;
}

.term-dots i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #fb7185;
}

.term-dots i:nth-child(2) {
  background: var(--yellow);
}

.term-dots i:nth-child(3) {
  background: var(--green);
}

.term-title {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.term-badge {
  margin-left: auto;
  border: 1px solid rgba(74, 222, 128, 0.36);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.1);
  color: var(--green);
  padding: 3px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.term-body {
  padding: clamp(20px, 3.4vw, 34px);
}

.cmd {
  margin: 26px 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.cmd:first-child {
  margin-top: 0;
}

.cmd b {
  color: var(--blue);
  font-weight: 500;
}

.prompt {
  margin-right: 10px;
  color: var(--green);
  font-weight: 700;
}

.out {
  margin: 0 0 6px;
}

.comment-mark {
  color: var(--muted);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(40px, 7vh, 72px) 0 0;
}

.eyebrow {
  width: fit-content;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.08);
  color: var(--blue);
  padding: 5px 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 10px 0 18px;
  color: var(--ink);
  font-size: clamp(30px, 5.4vw, 58px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

h1 span {
  display: block;
}

h1 .accent-line {
  color: var(--orange);
}

h1 .accent-line > span {
  display: inline;
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 8px;
  background: var(--green);
  vertical-align: baseline;
  transform: translateY(0.12em);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-intro {
  max-width: 760px;
  font-size: clamp(15px, 1.6vw, 17px);
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
  margin: 4px 0 2px;
}

.hero-proof div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.05);
  padding: 12px 14px;
}

.hero-proof span {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.hero-proof strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.term-figure {
  overflow: hidden;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a1018;
}

.term-figure img,
.case-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--orange);
  color: #0b0f14;
}

.button.primary:hover {
  box-shadow: 0 10px 34px rgba(249, 115, 22, 0.32);
}

.enhanced-cta .cta-arrow {
  margin-left: 10px;
  transition: transform 160ms var(--ease);
}

.enhanced-cta:hover .cta-arrow {
  transform: translateX(3px);
}

.button.secondary {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--green);
}

.hero-rule {
  margin: 26px 0 0;
  border-top: 1px dashed var(--line-strong);
  padding-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- sections ---------- */

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-cmd {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 15px;
}

.section-cmd b {
  color: var(--blue);
  font-weight: 500;
}

h2 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-heading p:not(.section-cmd) {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- work ---------- */

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.work-card {
  display: flex;
  flex-direction: column;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.work-card .term-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.work-card h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 21px);
  font-weight: 700;
  line-height: 1.35;
}

.work-card > .term-body > p {
  color: var(--text);
  font-size: 14.5px;
}

.case-visual {
  overflow: hidden;
  margin: 6px 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a1018;
}

.case-visual img {
  aspect-ratio: 5 / 3;
  object-fit: cover;
  transition: transform 380ms var(--ease);
}

.work-card:hover .case-visual img {
  transform: scale(1.04);
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.case-meta li {
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.08);
  padding: 4px 10px;
  color: var(--blue);
  font-size: 12.5px;
}

.stack {
  margin-top: auto;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- capabilities ---------- */

.cap-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 34px;
}

.cap-item {
  border-left: 2px solid rgba(74, 222, 128, 0.35);
  padding-left: 16px;
}

.cap-key {
  margin-bottom: 6px;
  font-size: 15px;
}

.cap-key .key {
  color: var(--yellow);
}

.cap-key strong {
  color: var(--ink);
  font-weight: 700;
}

.cap-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- contact ---------- */

.contact-section .section-heading p:not(.section-cmd) {
  max-width: 640px;
}

.contact-card {
  max-width: 560px;
}

.contact-card .term-body {
  display: grid;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.05);
  padding: 0 16px;
  color: var(--ink);
  font-size: 15px;
  transition: border-color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease);
}

.contact-link:hover {
  border-color: var(--green);
  background: rgba(74, 222, 128, 0.07);
  transform: translateY(-1px);
}

/* ---------- footer ---------- */

.footer {
  width: min(1080px, calc(100% - 40px));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin: 64px auto 0;
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

.footer-exit {
  color: var(--muted);
}

/* ---------- reveal ---------- */

.will-reveal {
  opacity: 0;
}

.will-reveal.is-revealed {
  animation: riseIn 520ms var(--ease) both;
}

.hero-window {
  animation: riseIn 520ms var(--ease) both;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

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

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .case-grid,
  .cap-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 0;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    margin: 0 -8px;
  }

  .nav a {
    flex: 1;
    justify-content: center;
  }

  [id] {
    scroll-margin-top: 132px;
  }

  main,
  .footer,
  .header-inner {
    width: min(100% - 28px, 1080px);
  }

  .hero-proof {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 56px 0 8px;
  }

  h1 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .contact-link {
    overflow-wrap: anywhere;
  }
}
