/* ─────────────────────────────────────────────
   jdonsec.com — Main Stylesheet
   Design: Editorial / Minimal / Light Mode
   Fonts: Playfair Display · Lora · DM Sans
───────────────────────────────────────────── */

:root {
  --bg:          #faf9f7;
  --bg-surface:  #f0ede8;
  --border:      #e8e4de;
  --text:        #1a1916;
  --text-sec:    #5a5751;
  --text-muted:  #9b9690;
  --accent:      #c75f2a;
  --accent-dark: #a34a1e;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Lora', Georgia, serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;

  --pad-x: 48px;
  --pad-x-sm: 24px;
  --max-prose: 720px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }

/* ── Nav ── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px var(--pad-x);
  border-bottom: 1px solid var(--border);
}
.nav__brand {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  font-weight: 600;
}
.nav__brand span { color: var(--accent); }
.nav__links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav__links a {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-sec);
  text-decoration: none;
  letter-spacing: 0.04em;
  font-weight: 400;
  transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a.active { color: var(--text); font-weight: 500; }

/* ── Hero (homepage featured post) ── */
.hero {
  padding: 72px var(--pad-x) 56px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 64px;
  align-items: start;
}
.hero__eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 20px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.hero__title a { color: inherit; text-decoration: none; }
.hero__title a:hover { color: var(--accent); }
.hero__excerpt {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-sec);
  font-style: italic;
  margin-bottom: 28px;
}
.hero__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero__visual {
  background: var(--border);
  border-radius: 4px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--bg-surface) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-surface) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hero__visual-label {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
}

/* ── Section header ── */
.section-header {
  padding: 40px var(--pad-x) 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.section-header h2 {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.section-header a {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.section-header a:hover { text-decoration: underline; }

/* ── Post grid (homepage) ── */
.posts {
  padding: 32px var(--pad-x) 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  border-bottom: 1px solid var(--border);
}
.post-card__eyebrow {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 10px;
}
.post-card__divider { width: 24px; height: 1px; background: var(--accent); margin-bottom: 12px; }
.post-card__title {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 500;
  margin-bottom: 12px;
}
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--accent); }
.post-card__excerpt { font-family: var(--font-ui); font-size: 14px; line-height: 1.65; color: var(--text-sec); margin-bottom: 16px; }
.post-card__meta { font-family: var(--font-ui); font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; }

/* ── About strip ── */
.about-strip {
  padding: 40px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--bg-surface);
}
.about-strip__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-sec);
  font-weight: 500;
}
.about-strip__name { font-family: var(--font-display); font-size: 17px; font-weight: 500; margin-bottom: 6px; }
.about-strip__bio { font-family: var(--font-ui); font-size: 13px; line-height: 1.6; color: var(--text-sec); max-width: 560px; }
.about-strip__bio a { color: var(--accent); text-decoration: none; }
.about-strip__bio a:hover { text-decoration: underline; }

/* ── Page header ── */
.page-header {
  padding: 64px var(--pad-x) 48px;
  border-bottom: 1px solid var(--border);
  max-width: calc(var(--max-prose) + var(--pad-x) * 2);
}
.page-header__eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 14px;
}
.page-header__title {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.page-header__desc {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text-sec);
  margin-top: 12px;
  line-height: 1.6;
}
.page-header__meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 20px; }

/* ── Shared atoms ── */
.tag {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: var(--bg-surface);
  padding: 4px 11px;
  border-radius: 2px;
  color: var(--text-sec);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.1s;
}
.tag:hover { background: var(--border); color: var(--text); }
.date { font-family: var(--font-ui); font-size: 12px; color: var(--text-muted); }

.severity {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 2px;
}
.severity--critical     { background: #f9e6e6; color: #7a1a1a; }
.severity--high         { background: #fdeee4; color: #7a3a1a; }
.severity--medium       { background: #fdf5e4; color: #6b4e00; }
.severity--low          { background: #e6f0e6; color: #1a5a1a; }
.severity--informational{ background: var(--bg-surface); color: var(--text-sec); }

.status-badge {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 2px;
}
.status--resolved { background: #e6f0e6; color: #1a5a1a; }

/* ── Notice / disclosure banner ── */
.notice {
  margin: 32px var(--pad-x) 0;
  padding: 16px 20px;
  background: var(--bg-surface);
  border-left: 3px solid var(--accent);
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.6;
  max-width: calc(var(--max-prose) + var(--pad-x) * 2);
}
.notice strong { color: var(--text); font-weight: 500; }

/* ── Article body ── */
.article-body {
  padding: 48px var(--pad-x);
  max-width: calc(var(--max-prose) + var(--pad-x) * 2);
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  margin: 48px 0 16px;
  letter-spacing: -0.3px;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  margin: 36px 0 12px;
}
.article-body h4 {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin: 28px 0 10px;
}
.article-body p { font-size: 17px; line-height: 1.8; margin-bottom: 22px; }
.article-body a { color: var(--accent); }
.article-body a:hover { color: var(--accent-dark); }
.article-body strong { font-weight: 500; }
.article-body em { font-style: italic; }
.article-body ul,
.article-body ol { padding-left: 24px; margin-bottom: 22px; }
.article-body li { font-size: 17px; line-height: 1.75; margin-bottom: 6px; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 32px 0;
  padding: 4px 24px;
  color: var(--text-sec);
  font-style: italic;
}
.article-body blockquote p { font-size: 18px; margin-bottom: 0; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.article-body code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--text);
  border: 1px solid var(--border);
}
.article-body pre {
  background: #1a1916;
  color: #e8e4de;
  padding: 24px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 28px 0;
  font-size: 13px;
  line-height: 1.65;
}
.article-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ── Post footer ── */
.post-footer { padding: 0 var(--pad-x) 56px; max-width: calc(var(--max-prose) + var(--pad-x) * 2); }
.back-link {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-sec);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.back-link:hover { color: var(--accent); border-color: var(--accent); }

/* ── Research list ── */
.list-grid { padding: 8px var(--pad-x) 56px; }
.list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.list-item:first-child { border-top: 1px solid var(--border); }
.list-item__eyebrow { font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 500; margin-bottom: 8px; }
.list-item__title { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.2; margin-bottom: 8px; }
.list-item__title a { color: inherit; text-decoration: none; }
.list-item__title a:hover { color: var(--accent); }
.list-item__excerpt { font-family: var(--font-ui); font-size: 14px; color: var(--text-sec); line-height: 1.6; }
.list-item__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.list-item__date { font-family: var(--font-ui); font-size: 12px; color: var(--text-muted); white-space: nowrap; padding-top: 4px; text-align: right; }

/* ── About page ── */
.about-content {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 64px;
  padding: 48px var(--pad-x) 64px;
  align-items: start;
}
.about-main {}
.about-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--text-sec);
  font-weight: 500;
  margin-bottom: 32px;
}
.about-bio { padding: 0; }
.about-bio p { color: var(--text-sec); }
.about-bio p:first-child { color: var(--text); font-size: 18px; }
.about-bio h2 { font-family: var(--font-display); font-size: 24px; font-weight: 500; margin: 36px 0 12px; }

.about-sidebar { position: sticky; top: 32px; }
.sidebar-section { padding: 20px 0; border-bottom: 1px solid var(--border); }
.sidebar-section:first-child { border-top: 1px solid var(--border); }
.sidebar-section h3 {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}
.sidebar-section ul { list-style: none; padding: 0; }
.sidebar-section li {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-sec);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-section li:last-child { border-bottom: none; }
.sidebar-section a { color: var(--text-sec); text-decoration: none; }
.sidebar-section a:hover { color: var(--accent); }

/* ── Footer ── */
.footer {
  padding: 28px var(--pad-x);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer__copy { font-family: var(--font-ui); font-size: 12px; color: var(--text-muted); }
.footer__links { display: flex; gap: 24px; list-style: none; }
.footer__links a { font-family: var(--font-ui); font-size: 12px; color: var(--text-muted); text-decoration: none; letter-spacing: 0.04em; }
.footer__links a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 960px) {
  :root { --pad-x: var(--pad-x-sm); }
  .hero { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .posts { grid-template-columns: 1fr 1fr; }
  .about-content { grid-template-columns: 1fr; }
  .about-sidebar { position: static; }
}
@media (max-width: 600px) {
  .hero__title { font-size: 32px; }
  .page-header__title { font-size: 30px; }
  .posts { grid-template-columns: 1fr; }
  .list-item { grid-template-columns: 1fr; gap: 12px; }
  .nav__links { gap: 20px; }
  .footer { flex-direction: column; gap: 16px; text-align: center; }
}
