:root {
  --bg: #101113;
  --panel: rgba(31, 33, 36, 0.78);
  --panel-strong: #1b1d20;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f2f4f7;
  --muted: #a6adb8;
  --dim: #737b86;
  --cyan: #61d8ff;
  --green: #79e6a6;
  --steel: #8ea3bb;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

#field-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 78% 12%, rgba(97, 216, 255, 0.13), transparent 28rem),
    radial-gradient(circle at 12% 78%, rgba(121, 230, 166, 0.1), transparent 24rem),
    linear-gradient(145deg, #111214, #17191c 48%, #0c0d0f);
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 17, 19, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  letter-spacing: 0;
}

.brand-word {
  position: relative;
  display: inline-block;
  padding: 8px 2px 9px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(97, 216, 255, 0.25);
}

.brand-word::before,
.brand-word::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transform: scaleX(0.7);
  transform-origin: left center;
}

.brand-word::before {
  top: 0;
}

.brand-word::after {
  bottom: 0;
  opacity: 0.55;
  transform-origin: right center;
}

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

.site-nav a {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.94rem;
  transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 180ms ease;
}

.section-band {
  position: relative;
  min-height: 100vh;
  padding: 120px clamp(18px, 5vw, 64px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.66fr);
  align-items: center;
  gap: clamp(28px, 6vw, 90px);
  padding-top: 120px;
}

.hero::after {
  content: "";
  position: absolute;
  left: clamp(18px, 5vw, 64px);
  right: clamp(18px, 5vw, 64px);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 740;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(3.1rem, 9vw, 7.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.hero-text {
  max-width: 660px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button.primary {
  background: var(--text);
  color: #111214;
  border-color: var(--text);
}

.button.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.hero-panel {
  width: min(100%, 430px);
  justify-self: end;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.metric-row strong {
  color: var(--text);
}

.signal-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 10px;
  height: 130px;
  margin: 28px 0;
}

.signal-bars span {
  display: block;
  min-height: 34px;
  background: linear-gradient(180deg, rgba(97, 216, 255, 0.86), rgba(121, 230, 166, 0.26));
  animation: pulse-bar 2.8s ease-in-out infinite;
}

.signal-bars span:nth-child(1) { height: 38%; animation-delay: 0ms; }
.signal-bars span:nth-child(2) { height: 72%; animation-delay: 120ms; }
.signal-bars span:nth-child(3) { height: 54%; animation-delay: 240ms; }
.signal-bars span:nth-child(4) { height: 92%; animation-delay: 360ms; }
.signal-bars span:nth-child(5) { height: 48%; animation-delay: 480ms; }

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.panel-grid div {
  min-height: 92px;
  padding: 16px;
  background: rgba(18, 19, 21, 0.82);
}

.panel-grid span {
  display: block;
  margin-bottom: 18px;
  color: var(--dim);
  font-size: 0.78rem;
}

.scroll-cue {
  position: absolute;
  left: clamp(18px, 5vw, 64px);
  bottom: 34px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 28px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.scroll-cue i::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 9px;
  background: var(--green);
  transform: translateX(-50%);
  animation: scroll-dot 1.7s ease-in-out infinite;
}

.section-heading {
  margin-bottom: clamp(30px, 6vw, 68px);
}

.work-section,
.process-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.055));
}

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

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(20, 21, 23, 0.76);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.project-media {
  min-height: 190px;
  border-bottom: 1px solid var(--line);
  background-color: #1b1d20;
  background-size: 150px 150px, 100% 100%;
  animation: drift-bg 9s linear infinite;
}

.media-dashboard {
  background-image:
    linear-gradient(90deg, rgba(97, 216, 255, 0.13) 1px, transparent 1px),
    linear-gradient(135deg, rgba(97, 216, 255, 0.15), rgba(142, 163, 187, 0.05));
}

.media-automation {
  background-image:
    radial-gradient(circle, rgba(121, 230, 166, 0.28) 2px, transparent 2px),
    linear-gradient(135deg, rgba(121, 230, 166, 0.12), rgba(97, 216, 255, 0.06));
}

.media-portal {
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.08) 75%),
    linear-gradient(135deg, rgba(142, 163, 187, 0.18), rgba(121, 230, 166, 0.05));
}

.project-body {
  padding: 22px;
}

.project-type {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.project-body p:not(.project-type) {
  color: var(--muted);
}

.project-body ul {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--steel);
}

.project-body li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  background: var(--green);
  vertical-align: 2px;
}

.stack-section {
  min-height: 70vh;
}

.stack-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 920px;
}

.stack-strip span {
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.timeline-item {
  min-height: 260px;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.timeline-item:last-child {
  border-right: 0;
}

.timeline-item span {
  display: block;
  margin-bottom: 40px;
  color: var(--green);
  font-weight: 800;
}

.timeline-item p {
  color: var(--muted);
}

.contact-section {
  min-height: 72vh;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: start;
  gap: clamp(24px, 6vw, 80px);
}

.contact-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.contact-panel a,
.contact-panel span {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 720;
}

.contact-panel span {
  border-bottom: 0;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@keyframes pulse-bar {
  0%,
  100% { transform: scaleY(0.82); opacity: 0.74; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes scroll-dot {
  0% { transform: translate(-50%, 0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translate(-50%, 20px); opacity: 0; }
}

@keyframes drift-bg {
  from { background-position: 0 0, 0 0; }
  to { background-position: 150px 150px, 0 0; }
}

@media (max-width: 980px) {
  .hero,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    justify-self: start;
  }

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

  .timeline-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .timeline-item:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 64px;
  }

  .brand-word {
    font-size: 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    display: grid;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    background: rgba(16, 17, 19, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    min-height: 44px;
  }

  .section-band {
    min-height: auto;
    padding: 94px 18px;
  }

  .hero {
    min-height: 100vh;
    padding-top: 104px;
    padding-bottom: 120px;
  }

  .hero-panel,
  .contact-panel {
    width: 100%;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .scroll-cue {
    bottom: 24px;
  }

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

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
