/* =========================================================
   TECH MACHINE — GLOBAL DESIGN SYSTEM
   PCB / signal-trace visual language:
   near-black board, amber signal accent, teal trace accent,
   monospace used only for real technical labels.
========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* -- color -- */
  --ink: #0a0d10;
  --ink-2: #0d1114;
  --surface: #12161b;
  --surface-2: #171c22;
  --line: #232a31;
  --line-soft: #1a2026;
  --text: #eceff1;
  --text-dim: #8a949c;
  --text-faint: #545c63;
  --accent: #ff7a29;
  --accent-hover: #ff8f4d;
  --accent-ghost: rgba(255, 122, 41, 0.12);
  --trace: #34e0b5;
  --trace-ghost: rgba(52, 224, 181, 0.12);
  --danger: #ff4f64;

  /* -- type -- */
  --f-display: "Space Grotesk", sans-serif;
  --f-body: "Inter", sans-serif;
  --f-mono: "JetBrains Mono", monospace;

  /* -- layout -- */
  --container: 1220px;
  --nav-h: 78px;
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--accent);
  color: #0a0d10;
}

::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--ink);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 22px;
  }
}

/* faint circuit-grid backdrop, applied per-section as needed */
.grid-veil {
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
}

/* =========================================================
   NAV
========================================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 500;
  background: rgba(10, 13, 16, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  height: 34px;
  width: 34px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-logo .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  flex-shrink: 0;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 6px 0;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  width: 100%;
  background: var(--trace);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 600;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--accent);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--accent);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    height: 100vh;
    width: 100%;
    background: var(--ink-2);
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-family: var(--f-display);
    font-size: 1.8rem;
  }
}

/* =========================================================
   BUTTONS
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #12100c;
  box-shadow: 0 0 0 0 rgba(255, 122, 41, 0.4);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 24px -6px rgba(255, 122, 41, 0.55);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-trace {
  background: transparent;
  border-color: var(--trace);
  color: var(--trace);
}

.btn-trace:hover {
  background: var(--trace-ghost);
  box-shadow: 0 8px 24px -8px rgba(52, 224, 181, 0.4);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.85rem;
}

.btn svg,
.btn i {
  font-size: 1em;
}

/* =========================================================
   SHARED SECTION CHROME
========================================================= */
.section {
  padding: 110px 0;
  position: relative;
}

@media (max-width: 700px) {
  .section {
    padding: 72px 0;
  }
}

.section-head {
  max-width: 640px;
  margin-bottom: 60px;
}

.section-tag {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--trace);
  margin-bottom: 14px;
  display: block;
}

.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--text);
}

.section-sub {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 56ch;
}

/* corner-bracket panel — used where a schematic/viewfinder framing fits */
.bracket {
  position: relative;
  border: 1px solid var(--line);
  background: var(--surface);
}

.bracket::before,
.bracket::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  opacity: 0.9;
}

.bracket::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}

.bracket::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

/* tag / badge pill for tech stack labels — monospace used purposefully */
.tag {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 3px;
  display: inline-block;
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* dashed connector divider between stacked sections */
.trace-divider {
  height: 1px;
  width: 100%;
  background-image: linear-gradient(
    to right,
    var(--line) 0,
    var(--line) 6px,
    transparent 6px,
    transparent 12px
  );
  background-size: 12px 1px;
  position: relative;
}

.trace-divider .node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid var(--accent);
}

/* =========================================================
   SCROLL REVEAL
========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.08s;
}
.reveal-delay-2 {
  transition-delay: 0.16s;
}
.reveal-delay-3 {
  transition-delay: 0.24s;
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--ink-2);
  padding: 64px 0 28px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  height: 30px;
  width: 30px;
  object-fit: contain;
  border-radius: 50%;
}

.footer-brand span {
  color: var(--accent);
}

.footer-tagline {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 32ch;
}

.footer-cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-col-title {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 14px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all 0.25s ease;
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.footer-bottom-row {
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-faint);
}

@media (max-width: 640px) {
  .footer-top {
    flex-direction: column;
  }
  .footer-bottom-row {
    flex-direction: column;
  }
}

/* utility */
.mono {
  font-family: var(--f-mono);
}
.text-dim {
  color: var(--text-dim);
}
.center-text {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}