/* Zoe Braterman — shared brand system
   Audience: security, engineering, scientific R&D, finance, medical, and legal.
   Tokens favor high contrast, conservative color, and long-form reading. */

:root {
  --navy: #0c1d2e;
  --navy-mid: #16324a;
  --ink: #1c2430;
  --muted: #4a5568;
  --paper: #f4f0e8;
  --surface: #fffcf7;
  --line: #d4cdc0;
  --accent: #1a4d5c;
  --accent-soft: #e4eef0;
  --bronze: #8a6a2f;
  --focus: #c9a227;
  --danger-text: #7a1f1f;
  --shadow: 0 10px 28px rgba(12, 29, 46, 0.07);
  --radius: 6px;
  --header-height: 4.25rem;
  --measure: 68ch;
  --content: 68rem;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
  --font-sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(12, 29, 46, 0.035), transparent 18rem),
    var(--paper);
}

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

img {
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy);
}

:focus {
  outline: none;
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 2000;
  padding: 0.6rem 0.9rem;
  background: var(--focus);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #f4f0e8;
  border-bottom: 3px solid var(--bronze);
}

.site-header-inner {
  max-width: var(--content);
  margin: 0 auto;
  min-height: var(--header-height);
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

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

.brand a:hover,
.brand a:focus-visible {
  color: #f3e6c2;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.site-nav > a,
.dropdown-toggle {
  color: #e8e2d6;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.site-nav > a:hover,
.dropdown-toggle:hover {
  color: #ffffff;
}

.site-nav > a[aria-current="page"] {
  color: #ffffff;
  box-shadow: inset 0 -2px 0 var(--focus);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% - 0.15rem);
  left: 0;
  min-width: 16.5rem;
  margin: 0;
  padding: 0.4rem 0;
  background: var(--navy-mid);
  border: 1px solid rgba(243, 230, 194, 0.18);
  box-shadow: var(--shadow);
  z-index: 1000;
}

.dropdown.active .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  color: #f4f0e8;
  padding: 0.75rem 1.15rem;
  text-decoration: none;
  font-size: 0.95rem;
  min-height: 44px;
}

.dropdown-menu a:hover,
.dropdown-menu a[aria-current="page"] {
  background: rgba(201, 162, 39, 0.12);
  color: #f3e6c2;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

section {
  margin-bottom: 2.75rem;
}

h1,
h2,
h3,
.hero-title {
  font-family: var(--font-serif);
  font-weight: 650;
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.015em;
}

h1,
.hero-title {
  font-size: clamp(2rem, 4vw, 2.65rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.55rem;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin: 1.4rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.page-intro p,
.hero-subtitle,
.prose p {
  color: var(--muted);
}

.page-intro .tagline {
  color: var(--bronze);
}

ul,
ol {
  padding-left: 1.2rem;
  max-width: var(--measure);
}

li {
  margin-bottom: 0.45rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(14rem, 18rem);
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-portrait {
  margin: 0;
}

.hero-portrait img,
.colored-border {
  width: 100%;
  max-width: 20rem;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tagline {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bronze);
  margin-bottom: 0.7rem;
}

.btn-primary,
.btn-secondary {
  min-height: 44px;
  padding: 0.7rem 1.2rem;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--navy);
  color: #f4f0e8;
}

.btn-primary:hover {
  background: var(--navy-mid);
  color: #ffffff;
}

.btn-secondary {
  border: 1px solid var(--navy);
  color: var(--navy);
  background: transparent;
}

.btn-secondary:hover {
  background: var(--navy);
  color: #f4f0e8;
}

.pill {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  background: #dce7ea;
  color: #143f4c;
  border: 1px solid #b7c9ce;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0.4rem 0.4rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.65rem;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card p,
.card li {
  color: var(--ink);
}

.card a {
  color: var(--accent);
  font-weight: 600;
}

.card a:hover {
  color: var(--navy);
}

.meta {
  font-size: 0.8rem;
  color: var(--bronze);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

/* Long-form / future blog */
.prose {
  max-width: 42rem;
}

.prose > * + * {
  margin-top: 1rem;
}

.article-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.article-meta,
.byline {
  font-size: 0.9rem;
  color: var(--muted);
}

.article-meta time {
  font-variant-numeric: tabular-nums;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  max-width: none;
  font-size: 0.9rem;
}

.breadcrumb li {
  margin: 0;
  color: var(--muted);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--line);
}

.breadcrumb a {
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2rem;
}

.category-nav a {
  text-decoration: none;
}

.category-nav a[aria-current="page"] {
  background: var(--navy);
  color: #f4f0e8;
  border-color: var(--navy);
}

.post-list {
  display: grid;
  gap: 1.25rem;
}

.post-list .card {
  max-width: 46rem;
}

.post-list h2 {
  font-size: 1.4rem;
}

.post-list h2 a {
  color: var(--navy);
  text-decoration: none;
}

.post-list h2 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.article {
  max-width: 42rem;
}

.article .prose p,
.article .prose li {
  color: var(--ink);
}

.license {
  margin-top: 1rem;
  max-width: 40rem;
  color: #c9c2b4;
  font-size: 0.85rem;
}

.license a {
  color: #f3e6c2;
}

.license a:hover {
  color: #ffffff;
}

footer,
.site-footer {
  background: var(--navy);
  color: #e8e2d6;
  border-top: 3px solid var(--bronze);
  padding: 1.75rem 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p,
footer p {
  margin: 0 auto;
  max-width: none;
  color: #c9c2b4;
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-social a {
  color: #e8e2d6;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: #f3e6c2;
}

.footer-social svg {
  display: block;
  width: 24px;
  height: 24px;
}

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

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding-top: 1rem;
    padding-bottom: 0.75rem;
  }

  .site-nav {
    width: 100%;
  }
}

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

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

@media print {
  .skip-link,
  .site-header,
  .site-nav,
  .footer-social,
  .hero-cta {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    font-weight: 400;
  }

  .card,
  .hero-portrait img {
    box-shadow: none;
    break-inside: avoid;
  }
}
