/* ============================================================
   Marcelo Katogui — Navy & Gold
   Deep navy dominant · Sparse gold accent · Authority-first
   Bricolage Grotesque × Newsreader × JetBrains Mono
   ============================================================ */

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

/* --- Design Tokens ---------------------------------------- */
:root {
  --bg: #141e33;
  --bg-alt: #1a2640;
  --surface: rgba(200, 195, 185, 0.06);
  --border: rgba(200, 195, 185, 0.10);
  --border-strong: rgba(200, 195, 185, 0.18);
  --text: #e8e5df;
  --text-secondary: #b8b3aa;
  --muted: #908b82;
  --accent: #c9a84c;
  --accent-hover: #d4b65e;
  --accent-subtle: rgba(201, 168, 76, 0.08);
  --accent-glow: rgba(201, 168, 76, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --max-width: 960px;
  --space: 24px;
  --radius: 8px;
  --header-h: 64px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  color-scheme: dark;
}

/* --- Light Theme ------------------------------------------ */
[data-theme="light"] {
  --bg: #f5f3ee;
  --bg-alt: #edeae3;
  --surface: rgba(0, 0, 0, 0.025);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #1a1a2e;
  --text-secondary: #5a5a6e;
  --muted: #8a8a96;
  --accent: #9a7b2f;
  --accent-hover: #b08e38;
  --accent-subtle: rgba(154, 123, 47, 0.06);
  --accent-glow: rgba(154, 123, 47, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  color-scheme: light;
}

/* --- Base ------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  overflow-wrap: break-word;
}

/* Subtle noise texture — depth without decoration */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-theme="light"] body::before {
  opacity: 0.03;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

/* --- Typography ------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

/* --- Scrollbar -------------------------------------------- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.2);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 168, 76, 0.4);
}

/* --- Skip Link -------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-alt);
  padding: 8px 16px;
  border-radius: var(--radius);
  z-index: 9999;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
}

/* --- Layout ----------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 120px 0;
  position: relative;
  z-index: 1;
}

/* --- Section Label ---------------------------------------- */
.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

/* Architectural section divider — offset rule + counter mark */
.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(
    to right,
    var(--accent) 0,
    var(--accent) 40px,
    var(--border) 40px,
    var(--border) 100%
  );
  opacity: 0.4;
}

.section + .section::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 24px;
  width: 6px;
  height: 6px;
  border-left: 1px solid var(--accent);
  border-top: 1px solid var(--accent);
  opacity: 0.35;
}

/* --- Header ----------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 18, 34, 0.9);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .site-header {
  background: rgba(245, 243, 238, 0.92);
}

[data-theme="light"] .site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.brand:hover {
  color: var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* --- Navigation ------------------------------------------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-nav a {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  padding: 8px 14px;
  position: relative;
  white-space: nowrap;
  transition: color var(--transition);
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.site-nav a.active {
  color: var(--accent);
}

/* --- Theme Toggle ----------------------------------------- */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 7px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  width: 34px;
  height: 34px;
  margin-left: 8px;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

/* --- Hamburger -------------------------------------------- */
.hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 9px;
  transition: all var(--transition);
  margin-left: 8px;
}

.hamburger span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero ------------------------------------------------- */
.hero {
  padding-top: calc(var(--header-h) + 100px);
  padding-bottom: 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 720px;
  position: relative;
  padding-left: 32px;
}

/* Architectural vertical rule — structural, not decorative */
.hero-content::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--accent) 0,
    var(--accent) 80px,
    var(--border) 80px,
    transparent 100%
  );
  opacity: 0.35;
}

/* Orchestrated hero entrance — staggered reveal */
.hero-label,
.hero-content h1,
.hero-statement,
.hero-identifier,
.hero-content .btn {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-enter 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-label         { animation-delay: 0.1s; }
.hero-content h1    { animation-delay: 0.25s; }
.hero-statement     { animation-delay: 0.4s; }
.hero-identifier    { animation-delay: 0.55s; }
.hero-content .btn  { animation-delay: 0.7s; }

@keyframes hero-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-label,
  .hero-content h1,
  .hero-statement,
  .hero-identifier,
  .hero-content .btn {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero-content h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 28px;
  color: var(--text);
}

.hero-statement {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.8vw, 20px);
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 56ch;
  margin-bottom: 44px;
}

/* --- Hero Identifier -------------------------------------- */
.hero-identifier {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
}

.hero-id-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.hero-role a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

.hero-role a:hover {
  color: var(--accent-hover);
}

.hero-credentials {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 1px;
}

/* --- Button ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 6px;
  padding: 14px 32px;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* --- Section Headers -------------------------------------- */
.section h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
  line-height: 1.15;
}

/* --- Track Record: Metrics Grid --------------------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-strong);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  margin-bottom: 48px;
  position: relative;
}

/* Structural corner marks — inside grid bounds */
.metrics-grid::before,
.metrics-grid::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  z-index: 2;
  pointer-events: none;
}

.metrics-grid::before {
  top: 0;
  left: 0;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  opacity: 0.6;
}

.metrics-grid::after {
  bottom: 0;
  right: 0;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  opacity: 0.6;
}

.metric {
  background: var(--bg-alt);
  padding: 40px 32px;
  transition: background var(--transition);
}

.metric:hover {
  background: var(--surface);
}

.metric-number {
  display: block;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 4px;
}

.metric-scope {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.metric-detail {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.record-summary {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
}

.record-summary a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

.record-summary a:hover {
  color: var(--accent-hover);
}

.record-footer {
  text-align: center;
}

.record-education {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 8px;
  line-height: 1.7;
}

/* --- Approach --------------------------------------------- */
.approach-content {
  max-width: 720px;
}

.manifesto {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 56px;
  font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 28px;
  position: relative;
}

/* Corner mark — architectural detail */
.manifesto::before {
  content: '';
  position: absolute;
  left: -1px;
  top: -1px;
  width: 8px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.principles {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.principle {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.principle:first-child {
  border-top: 1px solid var(--border);
}

.principle-number {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  min-width: 28px;
  padding-top: 3px;
  flex-shrink: 0;
  opacity: 0.7;
}

.principle h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text);
}

.principle p {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Capabilities ----------------------------------------- */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-strong);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  margin-bottom: 48px;
  position: relative;
}

.capabilities-grid::before,
.capabilities-grid::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  z-index: 2;
  pointer-events: none;
}

.capabilities-grid::before {
  top: 0;
  left: 0;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  opacity: 0.6;
}

.capabilities-grid::after {
  bottom: 0;
  right: 0;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  opacity: 0.6;
}

.capability {
  background: var(--bg-alt);
  padding: 36px 32px;
  transition: background var(--transition);
}

.capability:hover {
  background: var(--surface);
}

.capability h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--text);
}

.capability h3::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 2px;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
}

.capability p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.sectors {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
}

/* --- Blog ------------------------------------------------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

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

.blog-card:hover::before {
  opacity: 1;
}

.blog-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.blog-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
  color: var(--text);
}

.blog-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

.blog-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}

.blog-read-more {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  transition: color var(--transition);
}

.blog-card:hover .blog-read-more {
  color: var(--accent-hover);
}

/* --- Blog Filters ----------------------------------------- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.blog-filter-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.blog-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.blog-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* --- Blog Tag Pills --------------------------------------- */
.blog-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.blog-tag-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--accent-subtle);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

/* --- Blog List (blog index page) -------------------------- */
.blog-page h1 {
  margin-bottom: 8px;
}

.blog-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.blog-list-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}

.blog-list-item:first-child {
  border-top: 1px solid var(--border);
}

.blog-list-item:hover {
  background: var(--accent-subtle);
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: var(--radius);
}

.blog-list-meta {
  flex-shrink: 0;
  min-width: 100px;
  padding-top: 4px;
}

.blog-list-content {
  flex: 1;
  min-width: 0;
}

.blog-list-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
  color: var(--text);
}

.blog-list-item:hover .blog-list-content h3 {
  color: var(--accent);
}

.blog-list-content .blog-excerpt {
  font-size: 14px;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-list-item .blog-read-more {
  flex-shrink: 0;
  align-self: center;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition);
}

.blog-list-item:hover .blog-read-more {
  opacity: 1;
  color: var(--accent-hover);
}

/* --- Blog View All ---------------------------------------- */
.blog-view-all {
  margin-top: 40px;
  text-align: center;
}

.btn-secondary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid var(--border-strong);
  background: transparent;
  padding: 12px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent-hover);
}

/* --- Contact ---------------------------------------------- */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info h2 {
  margin-bottom: 16px;
}

.contact-qualifier {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 40ch;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all var(--transition);
}

.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.contact-link svg {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.7;
}

/* --- Contact Form ----------------------------------------- */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-body);
  transition: all var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
  font-style: italic;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-submit {
  align-self: flex-start;
  margin-top: 4px;
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-status {
  font-family: var(--font-mono);
  font-size: 12px;
  min-height: 20px;
}

.form-status.form-success {
  color: #7c9a5e;
}

.form-status.form-error {
  color: #c0705a;
}

/* --- Footer ----------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
}

.footer-text a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

.footer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* --- Back to Top ------------------------------------------ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--accent);
}

.back-to-top svg {
  width: 16px;
  height: 16px;
}

/* --- Scroll Reveal ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

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

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* --- Responsive: Tablet ----------------------------------- */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 60px);
    padding-bottom: 60px;
  }

  .hero-content h1 {
    font-size: clamp(28px, 5vw, 42px);
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  .contact-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section {
    padding: 80px 0;
  }

  .blog-list-item {
    flex-direction: column;
    gap: 8px;
  }

  .blog-list-meta {
    min-width: auto;
  }

  .blog-list-item .blog-read-more {
    opacity: 1;
    align-self: flex-start;
  }

  /* Mobile nav */
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-alt);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    z-index: 1001;
    box-shadow: var(--shadow-md);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    font-size: 12px;
    padding: 14px 24px;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-left: 2px solid transparent;
    transition: all var(--transition);
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a:hover,
  .site-nav a:active {
    background: var(--accent-subtle);
    border-left-color: var(--accent);
    color: var(--accent);
  }

  .site-nav a.active {
    background: var(--accent-subtle);
    border-left-color: var(--accent);
  }

  .hamburger {
    display: flex;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* --- Responsive: Mobile ----------------------------------- */
@media (max-width: 600px) {
  .section {
    padding: 60px 0;
  }

  .container {
    padding: 0 16px;
  }

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

  .hero-content h1 {
    font-size: 28px;
  }

  .hero-statement {
    font-size: 16px;
  }

  .section h2 {
    font-size: 24px;
    margin-bottom: 32px;
  }

  .metric {
    padding: 28px 20px;
  }

  .metric-number {
    font-size: 36px;
  }

  .capability {
    padding: 24px 20px;
  }

  .manifesto {
    font-size: 17px;
    padding-left: 16px;
  }

  .principle {
    gap: 16px;
    padding: 24px 0;
  }

  .contact-form {
    padding: 24px;
  }

  .hero-identifier {
    margin-bottom: 32px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
  }
}

/* --- Responsive: Extra-Small ------------------------------ */
@media (max-width: 400px) {
  .container {
    padding: 0 12px;
  }

  .section {
    padding: 44px 0;
  }

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

  .hero-content h1 {
    font-size: 24px;
  }

  .hero-statement {
    font-size: 15px;
  }

  .hero-label {
    font-size: 10px;
    margin-bottom: 24px;
  }

  .section h2 {
    font-size: 22px;
  }

  .metric {
    padding: 20px 16px;
  }

  .metric-number {
    font-size: 32px;
  }

  .metric-detail {
    font-size: 13px;
  }

  .capability {
    padding: 20px 16px;
  }

  .capability h3 {
    font-size: 15px;
  }

  .capability p {
    font-size: 13px;
  }

  .manifesto {
    font-size: 16px;
  }

  .principle h3 {
    font-size: 15px;
  }

  .principle p {
    font-size: 14px;
  }

  .contact-form {
    padding: 16px;
  }

  .contact-link {
    font-size: 12px;
    padding: 10px 14px;
  }

  .record-summary {
    font-size: 13px;
  }

  .sectors {
    font-size: 11px;
  }
}

/* --- System color-scheme fallback ------------------------- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f3ee;
    --bg-alt: #edeae3;
    --surface: rgba(0, 0, 0, 0.025);
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.14);
    --text: #1a1a2e;
    --text-secondary: #5a5a6e;
    --muted: #8a8a96;
    --accent: #9a7b2f;
    --accent-hover: #b08e38;
    --accent-subtle: rgba(154, 123, 47, 0.06);
    --accent-glow: rgba(154, 123, 47, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    color-scheme: light;
  }

  :root:not([data-theme="dark"]) .site-header {
    background: rgba(245, 243, 238, 0.92);
  }

  :root:not([data-theme="dark"]) .site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  }
}
