:root {
  --ink: #0B1015;
  --panel: #131B22;
  --panel-2: #182029;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);
  --paper: #E7E2D3;
  --paper-line: rgba(20, 20, 15, 0.1);
  --ink-on-paper: #1C2024;
  --muted-on-paper: #5B5A4E;
  --teal: #37D6C4;
  --teal-dim: rgba(55, 214, 196, 0.14);
  --amber: #FFB454;
  --text: #E7ECEF;
  --muted: #8B98A3;
  --disp: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img,
svg {
  display: block;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

::selection {
  background: var(--teal);
  color: var(--ink);
}

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

/* ===== background grid texture ===== */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

/* ===== nav ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}

header.scrolled {
  background: rgba(11, 16, 21, 0.86);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: 1180px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .02em;
}

.logo .mark {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--teal);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 0 0 3px var(--teal-dim);
}

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

.nav-links a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
  position: relative;
}

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

.nav-links a.cta-link {
  color: var(--ink);
  background: var(--teal);
  padding: 9px 16px;
  border-radius: 6px;
  font-weight: 500;
}

.nav-links a.cta-link:hover {
  background: #4fe2d1;
  color: var(--ink);
}

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 38px;
  height: 38px;
  color: var(--text);
  cursor: pointer;
}

/* ===== hero ===== */
.hero {
  position: relative;
  padding: 168px 0 90px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(55, 214, 196, 0.3);
  padding: 7px 12px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .35;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 2;
}

h1 {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

h1 span {
  color: var(--teal);
}

.hero p.lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 14px 26px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

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

.btn-primary:hover {
  background: #4fe2d1;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* terminal panel */
.terminal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
}

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

.terminal-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a4550;
}

.terminal-head .title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .03em;
}

.terminal-body {
  padding: 20px 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  min-height: 230px;
  color: #B9E9E1;
}

.terminal-body .prompt {
  color: var(--teal);
}

.terminal-body .ok {
  color: #7CE0A0;
}

.terminal-body .dim {
  color: var(--muted);
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--teal);
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}

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

.stat-strip {
  margin-top: 70px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 2;
}

.stat-strip div {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-strip div b {
  display: block;
  font-family: var(--disp);
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 4px;
}

/* ===== section shared ===== */
section {
  padding: 120px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 64px;
}

.tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
  display: block;
}

.paper .tag {
  color: #8a6a2f;
}

h2 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* ===== about ===== */
.paper {
  background: var(--paper);
  color: var(--ink-on-paper);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 70px;
  align-items: center;
}

.about-grid p {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--muted-on-paper);
  margin-bottom: 18px;
}

.about-grid p:last-child {
  margin-bottom: 0;
}

.blueprint {
  aspect-ratio: 4/3.1;
  border-radius: 12px;
  position: relative;
  background: #1B2024;
  border: 1px solid rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.blueprint .bp-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(55, 214, 196, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 214, 196, 0.14) 1px, transparent 1px);
  background-size: 30px 30px;
}

.blueprint svg {
  position: relative;
  width: 72%;
  margin: 14% auto;
}

.blueprint .cap {
  position: absolute;
  bottom: 18px;
  left: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  letter-spacing: .05em;
}

/* ===== capabilities ===== */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.cap-card {
  background: var(--ink);
  padding: 34px 30px;
  transition: background .2s ease;
}

.cap-card:hover {
  background: var(--panel);
}

.cap-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--teal-dim);
  border: 1px solid rgba(55, 214, 196, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--teal);
}

.cap-card h3 {
  font-family: var(--disp);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.cap-card p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
}

.cap-card .cap-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
  display: block;
}

/* ===== cta ===== */
.cta-section {
  background: linear-gradient(160deg, #123B39 0%, #0B1015 65%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 214, 196, 0.18), transparent 70%);
  top: -300px;
  right: -150px;
}

.cta-inner {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 640px;
}

.cta-inner h2 {
  margin-bottom: 16px;
}

.cta-inner p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 480px;
}

/* ===== footer ===== */
footer {
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-inner p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
}

.socials {
  display: flex;
  gap: 18px;
}

.socials a {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all .2s;
}

.socials a:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cursor {
    animation: none;
  }

  .eyebrow .dot {
    animation: none;
  }
}

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

  .terminal {
    order: -1;
  }

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

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

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
  }
}

@media (max-width:640px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 78%;
    max-width: 300px;
    background: var(--panel);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 100px 28px;
    gap: 26px;
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform .3s ease;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .menu-btn {
    display: block;
  }

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

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

  section {
    padding: 80px 0;
  }

  .hero {
    padding-top: 140px;
  }
}

/* ===== Footer contact pills (replaces fixed-size social icon boxes) ===== */
.footer-inner .socials {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-inner .socials a {
  width: auto;
  height: auto;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--muted);
  transition: border-color .2s ease, color .2s ease;
}

.footer-inner .socials a:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* ===== Work / Portfolio section ===== */
.work-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.work-filter-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.work-filter-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.work-filter-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--ink);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.work-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.work-card.hidden {
  display: none;
}

.work-thumb {
  height: 150px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-thumb .work-num {
  position: absolute;
  top: 14px;
  left: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: .05em;
}

.work-body {
  padding: 26px 24px 28px;
}

.work-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.work-tags span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(55, 214, 196, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
}

.work-body h3 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.work-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
}

.work-link {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.work-link span {
  transition: transform .2s ease;
  display: inline-block;
}

.work-link:hover {
  color: var(--teal);
}

.work-link:hover span {
  transform: translateX(3px);
}

@media (max-width:900px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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