:root {
  color-scheme: dark;
  --bg: #0b1017;
  --bg-2: #111821;
  --panel: rgba(18, 27, 39, 0.78);
  --panel-strong: #121b27;
  --text: #f5f7fb;
  --muted: #98a5b8;
  --line: rgba(183, 197, 218, 0.16);
  --blue: #4d8dff;
  --green: #37d08c;
  --amber: #f7b955;
  --red: #ef6351;
  --cyan: #67e8f9;
  --radius: 8px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(11, 16, 23, 0.82), var(--bg) 680px),
    radial-gradient(circle at 18% 8%, rgba(55, 208, 140, 0.20), transparent 32rem),
    radial-gradient(circle at 78% 18%, rgba(77, 141, 255, 0.24), transparent 34rem),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  z-index: -2;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
  z-index: -1;
}

.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 232, 249, 0.18), transparent 62%);
  pointer-events: none;
  translate: -50% -50%;
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 16, 23, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 44px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 184px;
}

.brand-logo-frame {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(77, 141, 255, 0.28), rgba(55, 208, 140, 0.16)),
    rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 26px rgba(77, 141, 255, 0.20);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.14);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav a,
.header-action,
.button,
.filter {
  border-radius: var(--radius);
  font-weight: 700;
}

.nav a {
  padding: 11px 13px;
  color: #dbe4ef;
  font-size: 14px;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  font-size: 14px;
  white-space: nowrap;
}

.header-action {
  color: #071017;
  background: var(--green);
  border-color: transparent;
}

.section-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(380px, 1.12fr);
  align-items: center;
  gap: 54px;
  min-height: calc(100vh - 76px);
  padding: 76px 0 70px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: 76px;
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h2 {
  margin-bottom: 16px;
  font-size: 52px;
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.16;
}

.hero-copy,
.stack-copy,
.section-heading,
.contact-panel {
  min-width: 0;
}

p {
  color: var(--muted);
  line-height: 1.65;
  overflow-wrap: break-word;
}

.hero-lead {
  max-width: 660px;
  font-size: 18px;
}

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

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-badges a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: #dce7f7;
  font-size: 13px;
  font-weight: 800;
}

.hero-badges a:hover,
.hero-badges a:focus-visible {
  border-color: rgba(103, 232, 249, 0.44);
  outline: none;
  transform: translateY(-2px);
}

.button.primary {
  color: #061018;
  background: var(--green);
  border-color: transparent;
}

.button.secondary {
  color: #eaf2ff;
  background: rgba(255, 255, 255, 0.06);
}

.button:hover,
.header-action:hover,
.filter:hover {
  transform: translateY(-2px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
  max-width: 620px;
}

.hero-metrics div {
  min-height: 108px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 27, 39, 0.58);
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  margin-bottom: 8px;
  font-size: 34px;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.hero-visual {
  position: relative;
  min-height: 610px;
}

.device-stack {
  position: absolute;
  inset: 0;
  perspective: 1200px;
}

.screen-card {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  animation: floaty 7s ease-in-out infinite;
}

.screen-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen-card.is-front {
  right: 0;
  top: 92px;
  z-index: 3;
  width: min(640px, 100%);
  aspect-ratio: 1280 / 820;
}

.screen-card.is-middle {
  left: 0;
  top: 8px;
  z-index: 2;
  width: min(500px, 76%);
  aspect-ratio: 1280 / 820;
  opacity: 0.92;
  transform: rotate(-5deg);
  animation-delay: -2s;
}

.screen-card.is-back {
  left: 70px;
  bottom: 8px;
  z-index: 1;
  width: min(470px, 72%);
  aspect-ratio: 1280 / 820;
  opacity: 0.86;
  transform: rotate(4deg);
  animation-delay: -4s;
}

.marquee-band {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 18px 0;
  animation: marquee 24s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 27, 39, 0.75);
  color: #dce7f7;
  font-weight: 800;
}

.capabilities,
.portfolio,
.stack-section,
.process,
.contact {
  padding: 98px 0;
}

.study-offer {
  padding: 0 0 98px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading.wide {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.62fr);
  gap: 32px;
  align-items: end;
  max-width: none;
}

.section-heading.wide .eyebrow,
.section-heading.wide h2 {
  grid-column: 1;
}

.section-heading.wide p:not(.eyebrow) {
  grid-column: 2;
  margin-bottom: 18px;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.capability,
.project-card,
.timeline article,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
}

.capability {
  min-height: 250px;
  padding: 22px;
}

.capability-index {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 34px;
  border-radius: var(--radius);
  background: rgba(55, 208, 140, 0.14);
  color: var(--green);
  font-weight: 900;
}

.study-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.6fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border: 1px solid rgba(77, 141, 255, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(77, 141, 255, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(18, 27, 39, 0.86), rgba(18, 27, 39, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.study-panel h2 {
  margin-bottom: 18px;
}

.study-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.study-list li {
  position: relative;
  min-height: 48px;
  padding: 14px 14px 14px 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: #eaf2ff;
  font-weight: 700;
}

.study-list li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 13px;
  color: var(--green);
  font-weight: 900;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  color: #dce7f7;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.filter.is-active {
  color: #071017;
  background: var(--amber);
  border-color: transparent;
}

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

.project-card {
  overflow: hidden;
  transform-style: preserve-3d;
  transition: opacity 220ms ease, transform 220ms ease, border-color 220ms ease;
}

.project-card.is-hidden {
  display: none;
}

.project-card:hover {
  border-color: rgba(103, 232, 249, 0.38);
}

.project-card img {
  width: 100%;
  aspect-ratio: 1280 / 820;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.project-body {
  padding: 22px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #dbeafe;
  background: rgba(77, 141, 255, 0.10);
  font-size: 12px;
  font-weight: 800;
}

.stack-section {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(360px, 1fr);
  gap: 52px;
  align-items: center;
}

.stack-copy p {
  font-size: 17px;
}

.stack-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stack-matrix span {
  display: grid;
  place-items: center;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  color: #eef4ff;
  font-weight: 900;
  text-align: center;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.timeline article {
  position: relative;
  min-height: 260px;
  padding: 22px;
}

.timeline span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 42px;
  border-radius: 50%;
  color: #071017;
  background: var(--cyan);
  font-weight: 900;
}

.terminal-band {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 74px;
}

.terminal-window {
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: var(--radius);
  background: #080d12;
  box-shadow: var(--shadow);
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #101722;
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-top span:nth-child(1) {
  background: var(--red);
}

.terminal-top span:nth-child(2) {
  background: var(--amber);
}

.terminal-top span:nth-child(3) {
  background: var(--green);
}

.terminal-top strong {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
}

#terminal-output {
  min-height: 250px;
  margin: 0;
  padding: 22px;
  color: #d6f6e5;
  font: 14px/1.7 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
}

.contact {
  padding-top: 24px;
}

.contact-panel {
  position: relative;
  overflow: hidden;
  padding: 44px;
  background:
    linear-gradient(135deg, rgba(55, 208, 140, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(77, 141, 255, 0.16), rgba(18, 27, 39, 0.86));
}

.contact-panel h2 {
  max-width: 760px;
}

.contact-panel p:not(.eyebrow) {
  max-width: 760px;
  font-size: 17px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
  color: var(--muted);
}

[data-reveal] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floaty {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-top: 2px;
  }

  .hero,
  .stack-section,
  .section-heading.wide,
  .study-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 24px;
    min-height: auto;
    padding-top: 64px;
  }

  h1 {
    font-size: 58px;
  }

  h2 {
    font-size: 42px;
  }

  .hero-visual {
    min-height: 540px;
  }

  .section-heading.wide .eyebrow,
  .section-heading.wide h2,
  .section-heading.wide p:not(.eyebrow) {
    grid-column: auto;
  }

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

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

@media (max-width: 640px) {
  .site-header,
  .section-shell,
  .terminal-band,
  .footer {
    width: min(100% - 24px, 1180px);
    max-width: calc(100vw - 24px);
  }

  .hero-copy,
  .hero-lead {
    max-width: 330px;
  }

  .hero-copy h1 {
    max-width: 330px;
  }

  .header-action {
    width: 100%;
  }

  h1 {
    font-size: 36px;
    line-height: 1;
  }

  h2 {
    font-size: 32px;
  }

  .hero-metrics,
  .capability-grid,
  .timeline,
  .stack-matrix {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 390px;
  }

  .hero-lead {
    max-width: 100%;
    font-size: 17px;
  }

  .screen-card.is-front {
    top: 70px;
    width: 100%;
  }

  .screen-card.is-middle,
  .screen-card.is-back {
    width: 82%;
  }

  .screen-card.is-back {
    left: 28px;
  }

  .capabilities,
  .portfolio,
  .stack-section,
  .process,
  .contact {
    padding: 72px 0;
  }

  .study-offer {
    padding-bottom: 72px;
  }

  .contact-panel {
    padding: 28px;
  }

  .footer {
    flex-direction: column;
  }
}

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