:root {
  --bg: #07090c;
  --bg-alt: #0c1016;
  --panel: #10151c;
  --border: #1e2530;
  --fg: #e6ebf2;
  --muted: #97a3b4;
  --accent: #38e0a5;
  --accent-dim: #1d8f6a;
  --font: ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Inline links remain identifiable without relying on color or hover. */
p a:not(.btn), li a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.wrap.narrow { max-width: 760px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 0; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.lead { color: var(--muted); font-size: 1.08rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 9, 12, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  color: var(--fg);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.site-nav { display: flex; gap: .85rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); font-size: 0.92rem; }
.site-nav a:hover { color: var(--fg); text-decoration: none; }
.lang-switch {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.lang-switch:hover { color: var(--accent); border-color: var(--accent-dim); text-decoration: none; }
.language-nav { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.lang-switch.active { color: var(--fg); border-color: var(--accent-dim); background: rgba(56, 189, 248, .08); }

/* Hero */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: linear-gradient(120deg, #101820, #07090c 75%);
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: 2.5rem;
  align-items: center;
}
.portrait-wrap { display: flex; justify-content: center; }
.portrait {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  filter: grayscale(100%);
  background: var(--panel);
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait-wrap { order: -1; justify-content: flex-start; }
  .portrait { max-width: 180px; }
}

.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #04120c; }
.btn-primary:hover { background: #4ff0b6; }
.btn-ghost { border-color: var(--border); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent-dim); color: var(--accent); }

/* Sections */
.section { padding: clamp(2.75rem, 7vw, 4.5rem) 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.card li { margin-bottom: 0.35rem; }
.card time { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }
.card h2 { font-size: 1.15rem; margin: 0.4rem 0 0.5rem; }
.card h2 a, .card h3 a { color: var(--fg); }
.card p { color: var(--muted); margin: 0; }
.card-featured { border-color: var(--accent-dim); box-shadow: inset 0 1px 0 rgba(56, 224, 165, .08); }
.card-featured h3 a { color: var(--fg); }
.card-featured h3 a:hover { color: var(--accent); text-decoration: none; }
.intel-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.75rem 0; }
.intel-principle { border-top: 2px solid var(--accent-dim); padding-top: 1rem; }
.intel-principle strong { display: block; margin-bottom: .35rem; }
.intel-principle p { color: var(--muted); font-size: .95rem; }
.boundary-note { border-left: 2px solid var(--accent); padding: 1rem 1.25rem; background: var(--panel); margin: 2rem 0; }

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.contact-form label { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: #0a0e13;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  padding: 0.6rem 0.7rem;
  font: inherit;
  font-size: 0.95rem;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent-dim); }
.contact-form button { margin-top: 1rem; align-self: flex-start; }
.contact-form .hp { display: none !important; }
.form-status { font-size: 0.9rem; color: var(--muted); margin: 0.75rem 0 0; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #ff8080; }
.field-error { color: #ff8080; font-size: 0.82rem; margin: 0.15rem 0 0; }

.links { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: 0.92rem; }
.links a { display: inline-flex; align-items: center; gap: 0.4rem; }
.links .social-icon { display: block; width: 17px; min-width: 17px; max-width: 17px; height: 17px; min-height: 17px; max-height: 17px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.social-icon-fill { fill: currentColor; stroke: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.75rem 0; color: var(--muted); font-size: 0.88rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; }


.hero-statement { font-size: clamp(1.3rem, 2.5vw, 1.8rem); margin: 1rem 0; }
.hero-note { color: var(--muted); }
.working-method { border-left: 2px solid var(--accent-dim); padding-left: 1.4rem; margin-top: 2rem; }
.category-nav { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.5rem 0 2.5rem; }
.category-section { scroll-margin-top: 110px; margin-top: 3rem; }
.category-section + .category-section { border-top: 1px solid var(--border); padding-top: 2.5rem; }
.article-copy { font-size: 1.08rem; line-height: 1.85; }
.article-meta { color: var(--muted); font-size: .9rem; margin: 1rem 0 2rem; }
.related { margin-top: 3rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }
.note-label { color: var(--accent); font-size: .875rem; display: block; margin-bottom: .6rem; }
section[id] { scroll-margin-top: 100px; }
@media (max-width: 480px) {
  .header-inner { padding-top: .6rem; padding-bottom: .6rem; gap: .6rem; }
  .site-nav { order: 3; width: 100%; justify-content: flex-start; gap: .45rem .85rem; }
  .site-nav a { font-size: .84rem; }
  .grid.cards { grid-template-columns: minmax(0, 1fr); }
  .intel-principles { grid-template-columns: 1fr; }
}
@media (min-width: 481px) and (max-width: 760px) { .intel-principles { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
