/* =========================================================
   pvkarthikk.github.io — zero-build portfolio
   Design tokens, base, header, hero
   ========================================================= */

:root {
  color-scheme: light;

  --bg: #FAFAFA;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #F4F5F7;
  --text: #111827;
  --muted: #4B5563;
  --muted-soft: #5B6472;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --accent: #059669;
  --accent-ink: #047857;
  --accent-soft: #ECFDF5;
  --accent-border: #A7F3D0;
  --btn-bg: #047857;
  --btn-bg-hover: #065F46;
  --btn-text: #FFFFFF;
  --mark-ink: #FFFFFF;
  --grid-line: rgba(17, 24, 39, 0.045);
  --glow: rgba(5, 150, 105, 0.09);
  --selection: rgba(5, 150, 105, 0.22);
  --header-bg: rgba(250, 250, 250, 0.82);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 20px 44px -26px rgba(17, 24, 39, 0.24);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 1180px;
  --gutter: clamp(20px, 4.5vw, 40px);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0B0F14;
  --bg-elevated: #11161D;
  --bg-subtle: #0E1319;
  --text: #F3F4F6;
  --muted: #AAB4C0;
  --muted-soft: #94A3B8;
  --border: #232C37;
  --border-strong: #33404F;
  --accent: #34D399;
  --accent-ink: #6EE7B7;
  --accent-soft: rgba(52, 211, 153, 0.10);
  --accent-border: rgba(52, 211, 153, 0.26);
  --btn-bg: #34D399;
  --btn-bg-hover: #6EE7B7;
  --btn-text: #052E22;
  --mark-ink: #052E22;
  --grid-line: rgba(255, 255, 255, 0.045);
  --glow: rgba(52, 211, 153, 0.10);
  --selection: rgba(52, 211, 153, 0.25);
  --header-bg: rgba(11, 15, 20, 0.82);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 22px 52px -30px rgba(0, 0, 0, 0.8);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0B0F14;
    --bg-elevated: #11161D;
    --bg-subtle: #0E1319;
    --text: #F3F4F6;
    --muted: #AAB4C0;
    --muted-soft: #94A3B8;
    --border: #232C37;
    --border-strong: #33404F;
    --accent: #34D399;
    --accent-ink: #6EE7B7;
    --accent-soft: rgba(52, 211, 153, 0.10);
    --accent-border: rgba(52, 211, 153, 0.26);
    --btn-bg: #34D399;
    --btn-bg-hover: #6EE7B7;
    --btn-text: #052E22;
    --mark-ink: #052E22;
    --grid-line: rgba(255, 255, 255, 0.045);
    --glow: rgba(52, 211, 153, 0.10);
    --selection: rgba(52, 211, 153, 0.25);
    --header-bg: rgba(11, 15, 20, 0.82);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 22px 52px -30px rgba(0, 0, 0, 0.8);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p, dl, dd {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

svg {
  display: block;
  flex: none;
}

::selection {
  background: var(--selection);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), var(--accent-ink));
  color: var(--mark-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

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

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

.site-nav .site-nav__external {
  margin-left: 4px;
  color: var(--text);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: none; }
  :root:not([data-theme="light"]) .icon-sun { display: block; }
}

.nav-toggle {
  display: none;
}

.icon-close {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(64px, 9vw, 104px) 0 0;
  overflow: clip;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 58% 62% at 50% -8%, var(--glow), transparent 70%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  vertical-align: 2px;
}

.nowrap {
  white-space: nowrap;
}

.hero__title {
  max-width: 1000px;
  margin-top: 20px;
  color: var(--text);
  font-size: clamp(2rem, 5.6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
  text-wrap: balance;
}

.hero__sub {
  max-width: 670px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.hero-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  margin-top: clamp(52px, 7vw, 76px);
  border-top: 1px solid var(--border);
  background: var(--border);
}

.hero-spec {
  min-width: 0;
  padding: 20px clamp(14px, 2vw, 26px) 24px;
  background: var(--bg);
  text-align: left;
}

.hero-spec dt {
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-spec dd {
  margin-top: 6px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.btn--primary:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--secondary:hover {
  border-color: var(--accent-border);
  color: var(--accent-ink);
  transform: translateY(-1px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  color: var(--accent-ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(72px, 9vw, 112px) 0;
  border-top: 1px solid var(--border);
}

.section--muted {
  background: var(--bg-subtle);
}

.section-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.section-head h2 {
  max-width: 24ch;
  color: var(--text);
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 7px;
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}

.section-label span {
  color: var(--accent-ink);
}

.section-intro {
  max-width: 62ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.section-head--compact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.section-note {
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-align: right;
}

/* ---------- Badges & tags ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.055em;
  line-height: 1.5;
  text-transform: uppercase;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-subtle);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

/* ---------- Featured product ---------- */

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
  overflow: hidden;
  border: 1px solid var(--accent-border);
  border-radius: 24px;
  background: var(--bg-elevated);
  box-shadow: 0 26px 72px -52px rgba(5, 150, 105, 0.6);
}

.featured__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: clamp(26px, 4vw, 48px);
}

.featured__tamil {
  margin-bottom: 5px;
  color: var(--muted-soft);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.featured__title {
  max-width: 19ch;
  color: var(--text);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
}

.featured__desc {
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.72;
  text-wrap: pretty;
}

.featured__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 2px;
}

.featured__preview {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(24px, 4vw, 44px);
  border-left: 1px solid var(--border);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 72% 16%, var(--glow), transparent 58%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* App preview */

.app-window {
  position: relative;
  z-index: 1;
  width: min(100%, 356px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
  font-size: 12px;
}

.app-window__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.app-logo {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}

.app-brand strong {
  display: block;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.25;
}

.app-brand span span {
  display: block;
  color: var(--muted-soft);
  font-size: 9.5px;
  line-height: 1.4;
}

.app-pill {
  padding: 3px 6px;
  border: 1px solid var(--accent-border);
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-body {
  display: grid;
  gap: 1px;
  padding: 7px 9px;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
}

.app-row + .app-row {
  box-shadow: inset 0 1px 0 var(--border);
}

.app-check {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: none;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
}

.app-check--done {
  border-color: var(--accent);
  background: var(--accent);
  color: #FFFFFF;
}

.app-row__label {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
}

.app-row__meta {
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}

.app-row--money .app-row__label {
  font-weight: 500;
}

.app-row__amount {
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.app-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-top: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.app-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- Systems grid ---------- */

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

.system-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: clamp(22px, 2.5vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.system-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.system-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.icon-box {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--accent-border);
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.status-pill {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

.system-card h3 {
  color: var(--text);
  font-size: 1.17rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.32;
  text-wrap: balance;
}

.system-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.67;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
}

.mini-tags span {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.45;
}

/* ---------- Repository grid ---------- */

.repo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip[aria-pressed="true"] {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.chip__count {
  color: inherit;
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.7;
}

.repo-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.045em;
  line-height: 1.5;
  text-transform: uppercase;
}

.repo-status__dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.repo-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.repo-card:hover,
.repo-card:focus-within {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.repo-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.repo-card__title {
  min-width: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.repo-card__title a {
  text-decoration: none;
}

.repo-card__title a:hover {
  color: var(--accent-ink);
}

.repo-card__ext {
  flex: none;
  margin-top: 2px;
  color: var(--muted-soft);
}

.repo-card__desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 4.2em;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.repo-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
}

.repo-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.lang-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--dot, var(--muted-soft));
}

.repo-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.repo-pill {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted-soft);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.repo-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: 550;
  text-decoration: none;
}

.repo-link:hover {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.repo-more {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ---------- Engineering principles ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.principle {
  padding: clamp(24px, 3vw, 34px);
  border-left: 1px solid var(--border);
}

.principle:first-child {
  border-left: 0;
}

.principle__num {
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.055em;
  line-height: 1.5;
  text-transform: uppercase;
}

.principle h3 {
  margin-top: 15px;
  color: var(--text);
  font-size: 1.03rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.4;
  text-wrap: balance;
}

.principle p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.67;
}

/* ---------- Contact ---------- */

.contact__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(26px, 5vw, 60px);
  align-items: center;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--accent-border);
  border-radius: 24px;
  background-color: var(--bg-elevated);
  background-image: radial-gradient(circle at 88% 0%, var(--glow), transparent 52%);
}

.contact__copy {
  position: relative;
  z-index: 1;
}

.contact__copy .section-label {
  padding-top: 0;
}

.contact__copy h2 {
  max-width: 22ch;
  margin-top: 16px;
  color: var(--text);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.16;
  text-wrap: balance;
}

.contact__copy p:last-child {
  max-width: 58ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.contact__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 38px 0 42px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px 32px;
  align-items: start;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.footer__brand .brand__mark {
  width: 28px;
  height: 28px;
}

.footer__brand strong {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.footer__brand span span {
  display: block;
  color: var(--muted-soft);
  font-size: 12px;
  line-height: 1.5;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 18px;
}

.footer__links a {
  padding: 3px 0;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  grid-column: 1 / -1;
  gap: 8px 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .systems-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured__preview {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .app-window {
    width: min(100%, 420px);
  }

  .principles {
    grid-template-columns: minmax(0, 1fr);
  }

  .principle {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .principle:first-child {
    border-top: 0;
  }

  .contact__panel {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .contact__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 860px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .section-label {
    padding-top: 0;
  }

  .section-head h2 {
    max-width: 30ch;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: grid;
  }

  .site-nav {
    display: none;
  }

  .site-nav .site-nav__external {
    margin-left: 0;
  }

  .site-header.nav-open .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--gutter) 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-md);
  }

  .site-header.nav-open .site-nav a {
    padding: 12px 10px;
    font-size: 15px;
  }

  .site-header.nav-open .icon-menu {
    display: none;
  }

  .site-header.nav-open .icon-close {
    display: block;
  }
}

@media (max-width: 760px) {
  .hero-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-spec {
    padding: 18px 16px 20px;
  }

  .repo-status {
    width: 100%;
    margin-left: 0;
  }

  .section-head--compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-note {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .repo-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .systems-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-card:last-child {
    grid-column: auto;
  }

  .repo-card {
    padding: 20px;
  }
}

@media (max-width: 560px) {
  .header__inner {
    min-height: 64px;
  }

  .brand {
    font-size: 14.5px;
  }

  .brand__mark {
    width: 28px;
    height: 28px;
  }

  .footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__links {
    justify-content: flex-start;
  }

  .footer__bottom {
    flex-direction: column;
  }

  .hero__cta .btn {
    flex: 1 1 160px;
  }

  .featured__links .btn {
    flex: 1 1 100%;
  }

  .contact__actions .btn {
    flex: 1 1 100%;
  }

  .app-row {
    gap: 8px;
  }
}

/* ---------- Motion & print ---------- */

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

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

  .btn:hover,
  .repo-card:hover,
  .system-card:hover {
    transform: none;
  }
}

@media print {
  .site-header,
  .hero::before,
  .featured__preview,
  .repo-toolbar,
  .contact__actions,
  .site-footer {
    display: none !important;
  }

  body {
    background: #FFFFFF;
    color: #111827;
  }

  .section {
    padding: 24px 0;
    break-inside: avoid;
  }

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