/* ── Airy, Well-Proportioned Dark Minimalism & Tactile 3D Icons ── */
:root {
  color-scheme: dark;
  --bg: #060608;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(255, 255, 255, 0.048);
  --line: rgba(255, 255, 255, 0.068);
  --line-strong: rgba(255, 255, 255, 0.145);
  --text: #ebecf0;
  --soft: #9296a2;
  --muted: #606470;
  --green: #6ee7b7;
  --container: 1020px;
  --header-h: 74px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 180ms var(--ease);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(
    ellipse 78% 720px at 50% -120px,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.055) 36%,
    rgba(255, 255, 255, 0.018) 66%,
    transparent 92%
  );
  background-repeat: no-repeat;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open {
  overflow: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

code, pre, .mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

::selection {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

:focus-visible {
  outline: 1.5px solid rgba(255, 255, 255, 0.4);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .code-card { transform: none !important; }
}

/* ── Container & Airy Sections ──────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 40px);
}

.section {
  padding: 58px 0;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.section--last {
  padding-bottom: 72px;
}

.section-head {
  margin-bottom: 36px;
}

.section-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--text);
}

.section-lead {
  margin-top: 14px;
  color: var(--soft);
  font-size: 16.5px;
  max-width: 540px;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 50;
  background: rgba(13, 14, 18, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.85);
  transition: background-color var(--t), border-color var(--t);
}

.site-header.is-scrolled {
  background: rgba(15, 16, 21, 0.97);
  border-bottom-color: rgba(255, 255, 255, 0.11);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-home {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  transition: border-color var(--t), background-color var(--t);
}

.nav-home:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.085);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14.5px;
  color: var(--text);
}

.brand__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.75;
}

.brand__tld {
  color: var(--muted);
}

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

.site-nav a {
  font-size: 14px;
  color: var(--soft);
  transition: color var(--t);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.lang-switch__btn {
  color: var(--muted);
  padding: 3px 4px;
  transition: color var(--t);
}

.lang-switch__btn:hover,
.lang-switch__btn.is-active {
  color: var(--text);
}

.lang-switch__sep {
  color: rgba(255, 255, 255, 0.14);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--soft);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 56px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  align-items: start;
}

.hero-title {
  max-width: 680px;
  font-size: clamp(32px, 4.1vw, 48px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.032em;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-handle {
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  letter-spacing: -0.04em;
}

.hero-lead {
  max-width: 580px;
  font-size: 17px;
  line-height: 1.68;
  color: var(--soft);
}

.hero-panel {
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.038) 0%, rgba(10, 11, 15, 0.92) 100%);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.hero-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  font-size: 11.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.hero-panel__rows {
  padding: 6px 18px;
}

.hero-panel__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.hero-panel__row:last-child {
  border-bottom: none;
}

.hero-panel__row span:first-child {
  color: var(--muted);
  flex-shrink: 0;
}

.hero-panel__row span:last-child {
  color: var(--text);
  text-align: right;
}

.hero-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-pillar__title {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.hero-pillar__text {
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--soft);
}

/* ── Alternating Zigzag Focus Rows (Balanced Width) ─────── */
.zigzag-list {
  display: flex;
  flex-direction: column;
}

.zigzag-row {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding: 36px 0;
}

.zigzag-row--reverse {
  grid-template-columns: 1.05fr 1fr;
}

.zigzag-row:last-child {
  padding-bottom: 12px;
}

.zigzag-copy {
  max-width: 440px;
}

.pillar__title {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}

.pillar__text {
  font-size: 16px;
  color: var(--soft);
  line-height: 1.7;
  margin-bottom: 18px;
}

.pillar__meta {
  font-size: 13px;
  color: var(--muted);
}

/* ── Code Cards with Subtle Dark BG & 3D Tilt ───────────── */
.code-card {
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.04) 0%, rgba(12, 13, 18, 0.94) 55%, rgba(8, 9, 12, 0.99) 100%);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 280ms var(--ease), border-color var(--t);
}

.code-card:hover {
  border-color: var(--line-strong);
}

.code-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.code-card__file {
  font-size: 12.5px;
  color: var(--soft);
}

.code-card__lang {
  font-size: 11.5px;
  color: var(--muted);
}

.code-card__body {
  padding: 22px 24px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #a1a6b4;
  overflow-x: auto;
  scrollbar-width: none;
}

.code-card__body::-webkit-scrollbar {
  display: none;
}

.c-kw { color: #7f869c; }
.c-fn { color: #e2e5ed; }
.c-type { color: #b7c0d6; }
.c-str { color: #9ec5b8; }
.c-dec { color: #8d93a8; }

/* ── Open Editorial Rows (Projects & Services) ──────────── */
.editorial-list {
  border-top: 1px solid var(--line);
}

.editorial-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  transition: border-color var(--t);
}

.editorial-row:hover {
  border-bottom-color: var(--line-strong);
}

.editorial-row__left {
  max-width: 600px;
}

.editorial-row__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.editorial-row__title {
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
}

.editorial-row__status {
  font-size: 12px;
  color: var(--muted);
}

.editorial-row__status--live {
  color: var(--green);
}

.editorial-row__desc {
  font-size: 15.5px;
  color: var(--soft);
  line-height: 1.68;
}

.editorial-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
  text-align: right;
  padding-top: 2px;
}

.editorial-row__stack {
  font-size: 12.5px;
  color: var(--muted);
}

.editorial-row__link {
  font-size: 13px;
  color: var(--text);
  transition: color var(--t);
}

.editorial-row__link:hover {
  color: #fff;
}

.editorial-row__note {
  font-size: 12.5px;
  color: var(--muted);
}

/* ── Services Bento Grid (Distinct from Code & Project Lists) ── */
.services-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.service-tile {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line);
  border-bottom-color: rgba(255, 255, 255, 0.04);
  transition: transform var(--t), border-color var(--t), background-color var(--t);
}

.service-tile--wide {
  grid-column: span 3;
  padding: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.038) 0%, rgba(255, 255, 255, 0.015) 100%);
}

.service-tile:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.service-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.service-tile__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.service-tile__badge {
  font-size: 11px;
  color: var(--soft);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.service-tile__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
}

.service-tile__desc {
  font-size: 14.5px;
  color: var(--soft);
  line-height: 1.64;
  flex: 1;
  margin-bottom: 20px;
}

.service-tile__meta {
  font-size: 12px;
  color: var(--muted);
}

/* ── Symmetric Open Split (Stack + Workflow) ────────────── */
.split-clean {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: stretch;
}

.split-col {
  display: flex;
  flex-direction: column;
}

.clean-rows {
  flex: 1;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.clean-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-content: start;
}

.clean-row__k {
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 3px;
}

.clean-row__v {
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.65;
}

.clean-row__v strong {
  display: block;
  font-weight: 500;
  font-size: 16.5px;
  color: var(--text);
  margin-bottom: 5px;
}

.clean-row__v p {
  font-size: 15px;
  color: var(--soft);
}

/* ── Contact & Socials (Open Minimal List, No Cards) ────── */
.contact-clean {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-list {
  border-top: 1px solid var(--line);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition: border-color var(--t);
}

.contact-row:hover {
  border-bottom-color: var(--line-strong);
}

.contact-row__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--soft);
  flex-shrink: 0;
  transition: color var(--t), transform var(--t);
}

.contact-row:hover .contact-row__icon {
  color: var(--text);
  transform: translateY(-1px);
}

.contact-row__label {
  width: 96px;
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

.contact-row__value {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.contact-row__arrow {
  font-size: 15px;
  color: var(--muted);
  transition: color var(--t), transform var(--t);
}

.contact-row:hover .contact-row__arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.footer-top {
  transition: color var(--t);
}

.footer-top:hover {
  color: var(--text);
}

/* ── Lightweight Fade Reveal ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

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

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-layout,
  .hero-pillars,
  .zigzag-row,
  .zigzag-row--reverse,
  .split-clean,
  .contact-clean,
  .services-bento {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .service-tile,
  .service-tile--wide {
    grid-column: span 1;
  }

  .zigzag-row--reverse .zigzag-copy {
    order: -1;
  }

  .clean-rows {
    grid-template-rows: auto;
  }

  .editorial-row {
    flex-direction: column;
    gap: 14px;
  }

  .editorial-row__right {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 80px 0;
  }

  .hero {
    padding-top: calc(var(--header-h) + 64px);
    padding-bottom: 84px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    background: #060608;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t);
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    font-size: 18px;
  }

  .clean-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
