/* ── enkdr CMS ── Instrument Panel Theme ──────────────────────────────────── */
/* Syne (geometric display) · Source Serif 4 (editorial body) · DM Mono (UI) */
/* Dark precision aesthetic — medical devices are instruments, not hospitals.  */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,400&family=DM+Mono:ital,wght@0,400;0,500;1,400&display=swap');

/* ─────────────────────────────────────────────────────────────────────────────
   Tokens
───────────────────────────────────────────────────────────────────────────── */

:root {
  /* Surfaces */
  --bg:          #0e1218;
  --surface:     #141b24;
  --surface-2:   #1a2330;
  --surface-3:   #20293a;

  /* Text */
  --text:        #d8e6f2;
  --text-soft:   #9ab2c8;
  --muted:       #5a7289;

  /* Accent */
  --teal:        #00c8b0;
  --teal-dim:    #009b88;
  --teal-glow:   rgba(0, 200, 176, 0.12);
  --teal-subtle: rgba(0, 200, 176, 0.06);
  --teal-border: rgba(0, 200, 176, 0.2);

  /* Borders */
  --border:      #263040;
  --border-soft: #1c2836;

  /* Typography */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'DM Mono', ui-monospace, monospace;

  /* Layout */
  --max-width:     1140px;
  --header-height: 64px;
  --nav-w:         300px;
  --radius:        4px;
  --radius-lg:     6px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Base reset
───────────────────────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--teal); text-decoration: none; transition: color 0.15s; }
a:hover { color: #fff; }

img, video { max-width: 100%; height: auto; display: block; }

/* ─────────────────────────────────────────────────────────────────────────────
   Header
───────────────────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 210;
  background: rgba(14, 18, 24, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header-inner {
  max-width: calc(var(--max-width) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

/* Site name as monospace system identifier */
.site-name {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--teal);
  white-space: nowrap;
  flex-shrink: 0;
}
.site-name:hover { color: #fff; }

/* ─────────────────────────────────────────────────────────────────────────────
   Desktop nav
───────────────────────────────────────────────────────────────────────────── */

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex: 1;
}

.site-nav-link {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.site-nav-link:hover {
  color: var(--teal);
  background: var(--teal-subtle);
}

.site-nav-group { position: relative; }

.site-nav-group-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.site-nav-group-trigger:hover {
  color: var(--teal);
  background: var(--teal-subtle);
}

.site-nav-caret {
  font-size: 0.55rem;
  opacity: 0.5;
}

.site-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: 1px solid var(--teal-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 0.375rem;
  list-style: none;
  margin: 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 200;
}
/* Invisible hover bridge */
.site-nav-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.site-nav-group:hover .site-nav-dropdown,
.site-nav-group:focus-within .site-nav-dropdown { display: block; }

.site-nav-dropdown li a {
  display: block;
  padding: 0.45rem 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-soft);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color 0.12s, background 0.12s;
}
.site-nav-dropdown li a:hover {
  color: var(--teal);
  background: var(--teal-subtle);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Hamburger
───────────────────────────────────────────────────────────────────────────── */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 7px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.nav-hamburger:hover { border-color: var(--teal-border); }

.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text-soft);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

body.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─────────────────────────────────────────────────────────────────────────────
   Mobile nav overlay + panel
───────────────────────────────────────────────────────────────────────────── */

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 150;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
body.nav-open .nav-overlay { display: block; }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: var(--nav-w);
    max-width: 85vw;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 200;
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--header-height) + 1rem) 0.75rem 2rem;
    gap: 0.125rem;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.nav-open .site-nav { transform: translateX(0); }

  .site-nav-link {
    color: var(--text-soft);
    font-size: 0.875rem;
    padding: 0.65rem 0.875rem;
    width: 100%;
    border-radius: var(--radius);
  }
  .site-nav-link:hover { color: var(--teal); background: var(--teal-subtle); }

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

  .site-nav-group-trigger {
    color: var(--text-soft);
    font-size: 0.875rem;
    padding: 0.65rem 0.875rem;
    width: 100%;
    border-radius: var(--radius);
  }
  .site-nav-group-trigger:hover { color: var(--teal); background: var(--teal-subtle); }

  .site-nav-dropdown {
    position: static;
    display: block;
    background: transparent;
    border: none;
    border-left: 1px solid var(--teal-border);
    border-radius: 0;
    box-shadow: none;
    margin: 0.25rem 0 0.5rem 1.25rem;
    padding: 0.25rem 0;
  }
  .site-nav-dropdown::before { display: none; }
  .site-nav-dropdown li a {
    color: var(--muted);
    font-size: 0.8rem;
    padding: 0.45rem 0.875rem;
    white-space: normal;
    border-radius: 0;
  }
  .site-nav-dropdown li a:hover { color: var(--teal); background: transparent; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Hero
───────────────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  /* Dot-grid atmosphere — technical precision feel */
  background-image:
    radial-gradient(ellipse 55% 70% at 8% 65%, rgba(0, 200, 176, 0.09) 0%, transparent 65%),
    radial-gradient(circle at 88% 12%, rgba(0, 200, 176, 0.05) 0%, transparent 45%),
    radial-gradient(rgba(0, 200, 176, 0.18) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px;
}

.hero--has-image {
  /* Preserve dot-grid layers over image */
  background-image:
    radial-gradient(ellipse 55% 70% at 8% 65%, rgba(0, 200, 176, 0.09) 0%, transparent 65%),
    radial-gradient(circle at 88% 12%, rgba(0, 200, 176, 0.05) 0%, transparent 45%);
}

/* Dark overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    rgba(14, 18, 24, 0.96) 0%,
    rgba(14, 18, 24, 0.78) 48%,
    rgba(0, 200, 176, 0.12) 100%
  );
  z-index: 1;
}

/* Decorative horizontal rule at bottom of hero */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-border), transparent);
  z-index: 2;
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: calc(var(--max-width) + 3rem);
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: fade-up 0.55s 0.1s both;
}
/* Tick mark before eyebrow */
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--teal);
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  margin: 0 0 1.25rem;
  max-width: 700px;
  letter-spacing: -0.02em;
  animation: fade-up 0.65s 0.25s both;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(216, 230, 242, 0.7);
  line-height: 1.65;
  margin: 0 0 2.5rem;
  max-width: 520px;
  animation: fade-up 0.65s 0.4s both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.7rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--teal-border);
  border-radius: var(--radius);
  background: transparent;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  animation: fade-up 0.55s 0.55s both;
}
.hero-cta:hover {
  background: var(--teal);
  color: var(--bg);
  border-color: var(--teal);
  box-shadow: 0 0 24px rgba(0, 200, 176, 0.3);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Main content area
───────────────────────────────────────────────────────────────────────────── */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  min-height: calc(100dvh - var(--header-height) - 72px);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Page-level h1 (category / tag / 404)
───────────────────────────────────────────────────────────────────────────── */

main > h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2.25rem;
  line-height: 1.15;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Article (post / page)
───────────────────────────────────────────────────────────────────────────── */

article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 3rem;
  border-top: 2px solid var(--teal-border);
  max-width: 820px;
}

article h1,
article h2,
article h3,
article h4,
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

article h1,
.page-content h1 { font-size: 2rem; margin: 0 0 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border-soft); }
article h2,
.page-content h2 { font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 0.75rem; }
article h3,
.page-content h3 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 0.5rem; color: var(--text); }
article h4,
.page-content h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 1.75rem 0 0.5rem;
}

article p,
.page-content p { margin: 0 0 1.1rem; color: var(--text); }

article ul,
article ol,
.page-content ul,
.page-content ol { padding-left: 1.5rem; margin: 0 0 1.1rem; }

article li,
.page-content li { margin-bottom: 0.4rem; color: var(--text); }

article blockquote,
.page-content blockquote {
  border-left: 2px solid var(--teal);
  padding: 0.875rem 1.25rem;
  margin: 1.75rem 0;
  background: var(--teal-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-soft);
  font-style: italic;
}
article blockquote p,
.page-content blockquote p { margin: 0; color: var(--text-soft); }

article code,
.page-content code {
  font-family: var(--font-mono);
  font-size: 0.845em;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  color: var(--teal);
}

article pre,
.page-content pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--teal-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
  font-size: 0.875rem;
  line-height: 1.65;
}
article pre code,
.page-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text-soft);
  font-size: inherit;
}

article img,
.page-content img {
  border-radius: var(--radius);
  margin: 1.75rem 0;
  border: 1px solid var(--border);
}

article hr,
.page-content hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 2.5rem 0;
}

article table,
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9rem;
}
article th,
.page-content th {
  background: var(--surface-3);
  color: var(--teal);
  padding: 0.625rem 0.875rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
article td,
.page-content td {
  padding: 0.6rem 0.875rem;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
article tr:last-child td,
.page-content tr:last-child td { border-bottom: none; }
article tr:nth-child(even) td,
.page-content tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* Page body content (homepage) */
.page-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 3rem;
  border-top: 2px solid var(--teal-border);
  margin-bottom: 2.5rem;
  max-width: 820px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Post list (home / category / tag pages — non-homepage)
───────────────────────────────────────────────────────────────────────────── */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--teal-border);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.375rem 1.625rem;
  transition: border-left-color 0.15s, box-shadow 0.2s;
}
.post-list li:hover {
  border-left-color: var(--teal);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.post-list a {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}
.post-list a:hover { color: var(--teal); }

.post-list p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.55;
}

/* ─────────────────────────────────────────────────────────────────────────────
   News section (homepage post grid)
───────────────────────────────────────────────────────────────────────────── */

.news-section {
  margin-top: 3.5rem;
}

.news-section-title {
  font-family: var(--font-mono);
  font-size: 0.685rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1.5rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.news-section-title::before {
  content: '';
  display: block;
  width: 16px;
  height: 1px;
  background: var(--teal);
  flex-shrink: 0;
}

.post-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
/* Subtle teal glow strip at top of card */
.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--teal-border);
  transition: background 0.2s;
}
.post-card:hover {
  border-color: rgba(0, 200, 176, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 200, 176, 0.1);
  transform: translateY(-2px);
}
.post-card:hover::before { background: var(--teal); }

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  display: block;
}
.post-card-title:hover { color: var(--teal); }

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.post-card-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 0.5rem;
  transition: color 0.15s;
}
.post-card-link:hover { color: #fff; }

.empty-state {
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Attachments / Downloads
───────────────────────────────────────────────────────────────────────────── */

.attachments-section {
  margin-top: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.875rem 2rem;
  border-top: 2px solid var(--teal-border);
}

.attachments-section > h2 {
  font-family: var(--font-mono);
  font-size: 0.685rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1.25rem;
}

.attachments-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.attachment-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
}
.attachment-item:hover {
  border-color: var(--teal-border);
  background: var(--surface-3);
}

.attachment-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--teal-glow);
  border: 1px solid var(--teal-border);
  color: var(--teal);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.575rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1;
}

.attachment-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.attachment-name {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-size {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.attachment-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.425rem 0.875rem;
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal-border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.attachment-download:hover {
  background: var(--teal);
  color: var(--bg);
  box-shadow: 0 0 16px rgba(0, 200, 176, 0.25);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Search
───────────────────────────────────────────────────────────────────────────── */

.search-form {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 2.5rem;
}

.search-form input {
  flex: 1;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-form input::placeholder { color: var(--muted); }
.search-form input:focus {
  outline: none;
  border-color: var(--teal-border);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

.search-form button {
  padding: 0.7rem 1.5rem;
  background: var(--teal);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s;
}
.search-form button:hover {
  background: var(--teal-dim);
  box-shadow: 0 0 16px rgba(0, 200, 176, 0.2);
}

#search-results {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
#search-results li {
  padding: 0.875rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--teal-border);
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: border-left-color 0.15s;
}
#search-results li:hover { border-left-color: var(--teal); }
#search-results li a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
#search-results li a:hover { color: var(--teal); }

#search-empty {
  color: var(--muted);
  font-style: italic;
  font-size: 0.925rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Footer
───────────────────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 2rem 1.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}
.site-footer p { margin: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   Responsive — tablet (768px)
───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  main { padding: 2rem 1.25rem 3.5rem; }

  article,
  .page-content {
    padding: 2rem 1.75rem;
    max-width: none;
  }
  article h1,
  .page-content h1 { font-size: 1.6rem; }
  article h2,
  .page-content h2 { font-size: 1.25rem; }

  .attachments-section { padding: 1.5rem; }
  .hero { min-height: 60vh; }
  .hero-inner { padding: 4rem 1.25rem 3.5rem; }
  .post-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Responsive — mobile (480px)
───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  :root { --header-height: 56px; }

  main { padding: 1.5rem 1rem 2.5rem; }
  main > h1 { font-size: 1.5rem; }

  article,
  .page-content { padding: 1.25rem; border-radius: var(--radius); }
  article h1,
  .page-content h1 { font-size: 1.4rem; padding-bottom: 0.875rem; }
  article h2,
  .page-content h2 { font-size: 1.15rem; }

  .hero { min-height: 55vh; }
  .hero-inner { padding: 3rem 1rem 2.5rem; }
  .hero-title { font-size: 1.85rem; letter-spacing: -0.015em; }
  .hero-tagline { font-size: 0.95rem; }
  .hero-cta { font-size: 0.7rem; padding: 0.625rem 1.375rem; }

  .post-card { padding: 1.25rem; }

  .attachment-item {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    gap: 0.625rem;
  }
  .attachment-download {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .search-form { flex-direction: column; }
  .search-form button { width: 100%; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Print
───────────────────────────────────────────────────────────────────────────── */

@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .search-form, .nav-hamburger, .nav-overlay { display: none; }
  article, .page-content { border: none; padding: 0; box-shadow: none; background: transparent; }
  a { color: #000; }
}
