/* =========================================================================
   Martin Schelling — shared design system
   One stylesheet drives Home, About, Contact, 401, and Projects.
   Dark, precise, generous whitespace, one electric-blue signal accent.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* surfaces */
  --bg:            #060709;
  --surface:       #101216;
  --surface-2:     #181b21;
  --border:        #262a31;

  /* text */
  --text:          #eef0f2;
  --text-muted:    #9ba1a8;
  --text-faint:    #6b7178;

  /* single signal accent (retune here only) */
  --accent:        #3d8bff;
  --accent-strong: #298dff;
  --accent-contrast:#060709;

  /* one reusable glow (hero, section headers; deliberate light source from top) */
  --glow: radial-gradient(820px 460px at 50% -60px,
          rgba(41, 141, 255, 0.30), transparent 72%);

  /* type */
  --font-body:   "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display:"Space Grotesk", var(--font-body);

  /* spacing scale (4px base) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --s9: 96px; --s10: 128px;

  /* layout */
  --maxw: 1100px;
  --radius: 12px;
  --radius-sm: 8px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur:  200ms;

  /* status badge palette (dark-tuned, ported from projects) */
  --status-live-bg:      rgba(45, 200, 120, 0.14);
  --status-live-text:    #58e39a;
  --status-beta-bg:      rgba(59, 160, 220, 0.14);
  --status-beta-text:    #64c6ef;
  --status-dev-bg:       rgba(226, 170, 60, 0.14);
  --status-dev-text:     #edc06a;
  --status-prototype-bg: rgba(160, 110, 235, 0.16);
  --status-prototype-text:#c3a2f2;
  --status-case-bg:      rgba(150, 160, 180, 0.14);
  --status-case-text:    #aeb6c4;
}

/* ---------- Self-hosted fonts (no third-party requests) ---------- */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("../fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/inter-700.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("../fonts/space-grotesk-500.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/space-grotesk-700.woff2") format("woff2");
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

p { margin: 0; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Bilingual visibility ---------- */
html[lang="de"] .lang-en { display: none; }
html[lang="en"] .lang-de { display: none; }
/* keep inline .lang spans inline; block variants set their own display */

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s4);
}

.section { padding-block: var(--s9); }
@media (max-width: 720px) { .section { padding-block: var(--s7); } }

.section-glow { position: relative; }
.section-glow::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 560px;
  background: var(--glow); pointer-events: none; z-index: 0;
}
.section-glow > * { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead { color: var(--text-muted); font-size: 1.1rem; max-width: 60ch; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); min-height: 64px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
  color: var(--text); white-space: nowrap;
}
.wordmark:hover { color: var(--text); }

.nav-toggle {
  display: none;
  appearance: none; background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  width: 40px; height: 40px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

.site-nav {
  display: flex; align-items: center; gap: var(--s5);
}
.nav-link {
  position: relative; color: var(--text-muted); font-weight: 500;
  font-size: 0.95rem; padding-block: var(--s2);
  transition: color var(--dur) var(--ease);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--text); }

/* language toggle: two plain buttons, spacing only, no separator */
.lang-switch {
  display: inline-flex; align-items: center; gap: var(--s3);
  margin-left: var(--s2);
}
.lang-btn {
  appearance: none; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600;
  color: var(--text-faint); padding: 3px 2px; border-radius: 4px;
  transition: color var(--dur) var(--ease);
}
.lang-btn:hover { color: var(--text); }
html[lang="de"] .lang-btn[data-lang="de"],
html[lang="en"] .lang-btn[data-lang="en"] {
  color: var(--accent);
}

/* mobile nav */
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: var(--s3);
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: var(--s5) var(--s4);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { font-size: 1.05rem; width: 100%; }
  .lang-switch { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .site-nav { transition: none; }
  .nav-link::after { transition: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  padding: 12px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-contrast); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-faint); color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-1px); }
}

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---------- Card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--s5);
  display: flex; flex-direction: column; gap: var(--s3);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
@media (prefers-reduced-motion: no-preference) {
  .card:hover, .card:focus-visible { transform: translateY(-2px); }
}
.card:hover, .card:focus-visible { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }

.card-title { font-size: 1.15rem; }
.card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: grid; place-items: center; color: var(--accent);
  background: rgba(61, 139, 255, 0.12); border: 1px solid var(--border);
}
.card-icon svg { width: 22px; height: 22px; }

/* ---------- Status badges ---------- */
.badge {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-family: var(--font-body);
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 4px 10px; border-radius: 999px; flex-shrink: 0;
}
.status-live      { background: var(--status-live-bg);      color: var(--status-live-text); }
.status-beta      { background: var(--status-beta-bg);      color: var(--status-beta-text); }
.status-dev       { background: var(--status-dev-bg);       color: var(--status-dev-text); }
.status-prototype { background: var(--status-prototype-bg); color: var(--status-prototype-text); }
.status-case      { background: var(--status-case-bg);      color: var(--status-case-text); }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: auto; }
.tag {
  font-size: 0.75rem; color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: var(--radius-sm); overflow-wrap: break-word;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-faint); font-size: 0.85rem;
  padding-block: var(--s7);
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--s4);
}
.footer-inner a { color: var(--text-muted); }
.footer-inner a:hover { color: var(--accent); }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }

/* ---------- Hero (home) ---------- */
.hero { padding-block: var(--s10) var(--s9); text-align: left; }
@media (max-width: 720px) { .hero { padding-block: var(--s8) var(--s7); } }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  margin-block: var(--s4);
  max-width: 16ch;
}
.hero .subline { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--text-muted); max-width: 46ch; }
.hero .btn-row { margin-top: var(--s7); }

/* ---------- Section heading block ---------- */
.section-head { max-width: 60ch; margin-bottom: var(--s7); }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.section-head p { color: var(--text-muted); margin-top: var(--s3); }

/* ---------- Value card grid (home) ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

/* six smaller cards: 3-up desktop, 2-up tablet, 1-up mobile */
.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 900px) { .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-cards { grid-template-columns: 1fr; } }

.value-card { padding: var(--s5); gap: var(--s2); }
.value-card h3 { font-size: 1.05rem; margin-bottom: 2px; }
.value-card p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Proof strip ---------- */
.proof {
  border-block: 1px solid var(--border);
  background: var(--surface);
}
.proof-inner {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s4); padding-block: var(--s7);
}
@media (max-width: 720px) { .proof-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .proof-inner { grid-template-columns: 1fr; } }
.proof-item { display: flex; flex-direction: column; gap: var(--s1); }
.proof-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--text);
  letter-spacing: -0.02em;
}
.proof-label { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .card {
  align-items: center; text-align: center; gap: var(--s4);
  padding: var(--s8) var(--s5);
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.cta-band p { color: var(--text-muted); max-width: 60ch; }

/* ---------- About: intro + portrait ---------- */
.about-intro {
  display: grid; grid-template-columns: auto 1fr; gap: var(--s7);
  align-items: center;
}
@media (max-width: 720px) { .about-intro { grid-template-columns: 1fr; gap: var(--s5); align-items: start; } }
.portrait {
  height: 340px; width: auto; max-width: 100%;
  border-radius: var(--radius); border: 1px solid var(--border);
  object-fit: cover; object-position: center top; background: var(--surface-2);
}
@media (max-width: 720px) { .portrait { height: 300px; } }
.portrait-placeholder {
  height: 340px; width: 272px; max-width: 100%; border-radius: var(--radius);
  border: 1px dashed var(--text-faint); background: var(--surface-2);
  display: grid; place-items: center; color: var(--text-faint);
  font-size: 0.85rem; text-align: center; padding: var(--s4);
}
.about-intro h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--s4); }
.about-intro p { color: var(--text-muted); }

/* ---------- Vertical timeline (About) ---------- */
.timeline { position: relative; margin-top: var(--s5); padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px;
  width: 2px; background: var(--border);
}

.tl-group { margin-top: var(--s7); }
.tl-group:first-child { margin-top: 0; }
.tl-group-head { position: relative; margin-bottom: var(--s5); }
.tl-group-head::before {
  content: ""; position: absolute; left: -34px; top: 2px;
  width: 14px; height: 14px; border-radius: 4px;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.tl-company {
  font-family: var(--font-display); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
}
.tl-group-meta { display: block; color: var(--text-muted); font-size: 0.88rem; margin-top: 3px; }

.tl-item { position: relative; margin-bottom: var(--s5); }
.tl-item::before {
  content: ""; position: absolute; left: -33px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--text-faint);
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-head { margin-bottom: var(--s3); }
.role-title { font-size: 1.12rem; }
.role-date {
  display: block; color: var(--accent); font-size: 0.82rem; font-weight: 600;
  font-family: var(--font-display); margin-top: 3px;
}
.role-company { color: var(--text-muted); font-size: 0.85rem; }

/* slim role box: only the segmented toggle + active panel */
.role-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: var(--s4);
}

/* segmented control (compact) */
.segmented {
  display: inline-flex; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px;
  gap: 2px; margin-bottom: var(--s3); flex-wrap: wrap;
}
.seg-btn {
  appearance: none; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  color: var(--text-muted); padding: 5px 13px; border-radius: 999px;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-selected="true"] { background: var(--accent); color: var(--accent-contrast); }
.seg-btn[disabled] { opacity: 0.35; cursor: not-allowed; }

/* tab panels: only the active panel is in flow; wrapper height is animated by
   cv.js (measured start/end), the panel cross-fades. Hidden panel = no-JS-safe
   default (display:none). */
.panel[hidden] { display: none; }
.panel { opacity: 1; transition: opacity var(--dur) var(--ease); }
.panel.is-fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .panel { transition: none; } }
@media (prefers-reduced-motion: no-preference) {
  .panels-wrap { transition: height var(--dur) var(--ease); overflow: hidden; }
}
.panel h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-faint); margin-bottom: var(--s2); font-family: var(--font-body); font-weight: 700; }
.panel p, .panel ul { color: var(--text-muted); font-size: 0.92rem; }
.panel ul { margin: 0; padding-left: 1.15rem; }
.panel li { margin-bottom: var(--s2); }

/* languages list (compact) */
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.plain-list li { color: var(--text-muted); padding-left: var(--s4); position: relative; }
.plain-list li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }
.plain-list strong { color: var(--text); font-weight: 600; }

/* credentials showcase (education + certificates) */
.credentials { margin-top: var(--s9); }
.subsection { margin-top: var(--s7); }
.subsection > h2 { font-size: 1.5rem; margin-bottom: var(--s5); }
.subsection > .sub-lead { color: var(--text-muted); font-size: 0.95rem; margin: calc(-1 * var(--s3)) 0 var(--s5); }

/* education entries as readable cards */
.edu-list { display: grid; gap: var(--s3); }
.edu-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: var(--s4) var(--s5);
}
.edu-item strong { color: var(--text); font-weight: 600; display: block; font-size: 1.02rem; }
.edu-item .edu-meta { color: var(--text-muted); font-size: 0.9rem; margin-top: 3px; }

/* certificate badges grid */
.cert-grid { display: flex; flex-wrap: wrap; gap: var(--s3); }
.cert-chip {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 16px; font-size: 0.9rem;
  color: var(--text); line-height: 1.3;
}
.cert-chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 340px 1fr; gap: var(--s8); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: var(--s6); } }

.address-block dt { color: var(--text-faint); font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.08em; margin-top: var(--s4); }
.address-block dd { color: var(--text); margin: var(--s1) 0 0; }

.field { margin-bottom: var(--s4); }
.field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: var(--s2); }
.field .req { color: var(--accent); }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px;
  transition: border-color var(--dur) var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 140px; }
.field .field-error { color: #ff6b6b; font-size: 0.82rem; margin-top: var(--s2); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ff6b6b; }
/* honeypot */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: var(--s4); font-size: 0.95rem; }
.form-status.is-success { color: var(--status-live-text); }
.form-status.is-error { color: #ff6b6b; }
.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }

/* ---------- Projects overview ---------- */
.tabs {
  display: inline-flex; gap: 2px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px;
  margin-bottom: var(--s6);
}
.tab-button {
  appearance: none; border: none; background: transparent;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  color: var(--text-muted); padding: 8px 20px; border-radius: 999px; cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.tab-button:hover { color: var(--text); }
.tab-button.active { background: var(--accent); color: var(--accent-contrast); }

.tabs-note { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 var(--s6); }
.tabs-note strong { color: var(--text); font-weight: 600; }

.card-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4); padding-bottom: var(--s7);
}
@media (max-width: 1000px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

/* clickable project card (JS-built) */
.card-grid .card { cursor: pointer; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.card-desc { color: var(--text-muted); font-size: 0.92rem; overflow-wrap: break-word; }

/* ---------- Password modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6, 7, 9, 0.72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: var(--s4);
}
.overlay.hidden { display: none; }
body.modal-open { overflow: hidden; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--s6); width: 100%; max-width: 380px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.6);
}
.modal h2 { font-size: 1.15rem; margin-bottom: var(--s4); }
.password-input {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px; outline: none;
  transition: border-color var(--dur) var(--ease);
}
.password-input:focus { border-color: var(--accent); }
.password-input.shake { animation: shake 0.4s ease; border-color: #ff6b6b; }
@media (prefers-reduced-motion: reduce) { .password-input.shake { animation: none; } }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.error-text { color: #ff6b6b; font-size: 0.85rem; margin-top: var(--s3); }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--s3); margin-top: var(--s5); }

/* ---------- Project detail page ---------- */
.detail-container { max-width: 760px; margin-inline: auto; padding-block: var(--s7); }
.back-link { display: inline-block; color: var(--text-muted); font-weight: 600;
  font-size: 0.9rem; margin-bottom: var(--s6); }
.back-link:hover { color: var(--accent); }
.detail-header { margin-bottom: var(--s6); }
.detail-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s3); }
.detail-title-row h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.detail-tagline { font-size: 1.1rem; color: var(--text-muted); margin-bottom: var(--s4); }
.detail-section { margin-top: var(--s6); }
.detail-section h2 { font-size: 1.1rem; margin-bottom: var(--s3); }
.detail-section p { color: var(--text-muted); }
.highlights-list { margin: 0; padding-left: 1.2rem; color: var(--text-muted); }
.highlights-list li { margin-bottom: var(--s2); }
.detail-cta { margin-top: var(--s6); }

/* ---------- 401 page ---------- */
.center-screen {
  min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center;
  text-align: center; padding: var(--s5);
}
.center-screen .inner { max-width: 460px; }
.center-screen h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: var(--s3); }
.center-screen p { color: var(--text-muted); margin-bottom: var(--s6); }
