/* Sully's Boxing Blog. Colours, fonts and the header/footer follow the main
   site (sullys/tailwind.config.js, Navbar.tsx, Footer.tsx). */
:root {
  --red:        #D62828;
  --red-hover:  #E63333;
  --darker:     #0D0D0D;
  --surface:    #1A1A1A;
  --surface-2:  #242424;
  --border:     rgba(255,255,255,0.08);
  --text:       #F0EDE6;
  --muted:      #8A8A8A;
  --dim:        #5A5A5A;
  --heading:    'Barlow Condensed', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  background: var(--darker);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.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;
}

.btn-primary {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: .75rem 1.5rem;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background .3s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--red-hover); text-decoration: none; }

/* ── HEADER ── */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--darker); }

.utility-strip {
  display: none;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  padding: 9px 1.5rem;
  font-size: .75rem;
  color: var(--muted);
  background: linear-gradient(to right, var(--darker) 50%, var(--surface));
}
.utility-strip a { color: var(--muted); }
.utility-strip a:hover { color: var(--text); text-decoration: none; }
.utility-strip .sep { width: 1px; height: 12px; background: var(--border); }

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 10px 1.25rem;
  border-bottom: 1px solid var(--border);
}
.logo img { display: block; height: 52px; width: auto; }

.nav-links, .nav-account { display: none; }

.nav-links { align-items: center; gap: 2rem; }
.nav-links > a,
.dropdown-toggle {
  color: var(--muted);
  font: 500 .875rem/1 'Inter', system-ui, sans-serif;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .2s;
}
.nav-links > a:hover, .dropdown-toggle:hover { color: var(--text); text-decoration: none; }
.nav-links > a.active { color: var(--text); }

.dropdown { position: relative; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: .3rem; }
.chev {
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}
.dropdown.open .chev { transform: rotate(225deg) translateY(-1px); }
.dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + .75rem); left: 0;
  min-width: 160px;
  padding: .25rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.4);
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: .5rem 1rem;
  font-size: .875rem;
  color: var(--muted);
}
.dropdown-menu a:hover { color: var(--text); background: rgba(255,255,255,.05); text-decoration: none; }

.nav-account { align-items: center; gap: 1rem; }

.profile-icon {
  display: inline-flex;
  padding: .25rem;
  border-radius: 999px;
  color: var(--muted);
}
.profile-icon:hover { color: var(--text); background: rgba(255,255,255,.05); }
.profile-icon svg { width: 32px; height: 32px; }

.mobile-actions { display: flex; align-items: center; gap: .25rem; }
.menu-toggle {
  display: flex; flex-direction: column; gap: 8px;
  padding: .5rem;
  background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.menu-toggle:hover { background: rgba(255,255,255,.05); }
.menu-toggle .bar { display: block; width: 28px; height: 2px; background: #fff; transition: transform .3s, opacity .3s; }
.menu-toggle.open .bar:nth-child(2) { transform: translateY(10px) rotate(45deg); }
.menu-toggle.open .bar:nth-child(3) { opacity: 0; }
.menu-toggle.open .bar:nth-child(4) { transform: translateY(-10px) rotate(-45deg); }

/* Phone menu: the same flat list as the main site */
.mobile-menu {
  max-height: calc(100dvh - 74px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .75rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.mobile-menu > a {
  display: block;
  text-align: right;
  padding: .6rem 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(240,237,230,.9);
}
.mobile-menu > a:hover { color: var(--text); background: rgba(255,255,255,.05); text-decoration: none; }
.mobile-menu > a.active { color: var(--text); background: rgba(255,255,255,.05); }
.mobile-account {
  display: flex;
  justify-content: flex-end;
  margin-top: .5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .utility-strip { display: flex; }
  .main-nav { min-height: 80px; padding: 12px 5rem; }
  .logo img { height: 64px; }
  .nav-links, .nav-account { display: flex; }
  .mobile-actions, .mobile-menu { display: none !important; }
}

/* ── LAYOUT ── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 4rem;
}

/* ── POST LIST ── */
.page-title {
  font-family: var(--heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.page-intro { color: var(--muted); margin-bottom: 2.5rem; }

.post-list { list-style: none; display: flex; flex-direction: column; gap: 1.5rem; }

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.75rem 2rem;
  transition: border-color .2s;
}
.post-card:hover { border-color: var(--red); }

.post-card h2 {
  font-family: var(--heading);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .4rem;
}
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--red); text-decoration: none; }

.post-meta {
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .75rem;
}

.post-summary { font-size: .95rem; color: var(--muted); }

.read-more {
  display: inline-block;
  margin-top: 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── SINGLE POST ── */
.post-header { margin-bottom: 2.5rem; }
.post-header h1 {
  font-family: var(--heading);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: .75rem;
}
.post-header .post-meta { font-size: .85rem; }

.post-content { font-size: 1.05rem; }
.post-content a { text-decoration: underline; }
.post-content h2,
.post-content h3 { margin: 2rem 0 .75rem; font-family: var(--heading); font-weight: 700; line-height: 1.2; }
.post-content h2 { font-size: 1.75rem; border-left: 3px solid var(--red); padding-left: .75rem; }
.post-content h3 { font-size: 1.4rem; }
.post-content p  { margin-bottom: 1.25rem; }
.post-content ul,
.post-content ol { margin: 0 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: .4rem; }
.post-content blockquote {
  border-left: 4px solid var(--red);
  padding: .75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--surface);
  border-radius: 0 12px 12px 0;
  color: var(--muted);
  font-style: italic;
}
.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}
.post-content figure.post-image { margin: 2rem 0; }
.post-content figure.post-image figcaption {
  margin-top: .6rem;
  font-size: .875rem;
  color: var(--muted);
  text-align: center;
}
.post-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  font-size: .9rem;
}
.post-content code {
  background: var(--surface);
  padding: .15em .4em;
  border-radius: 4px;
  font-size: .9em;
}
.post-content pre code { background: none; padding: 0; }

.back-link {
  display: inline-block;
  margin-top: 3rem;
  font-size: .9rem;
  color: var(--muted);
}
.back-link:hover { color: var(--text); }

/* ── FOOTER (same layout as the main site) ── */
.site-footer { background: var(--surface); }
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem 2.5rem;
  padding: 4rem 1.25rem 3rem;
}
.footer-brand { max-width: 320px; display: flex; flex-direction: column; gap: 1rem; }
.footer-name {
  font-family: var(--heading);
  font-size: 28px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.2;
}
.footer-name span { color: var(--red); }
.footer-brand p { font-size: .875rem; color: var(--muted); line-height: 1.6; }
.footer-social { display: flex; gap: 1rem; font-size: .875rem; }
.footer-social a { color: var(--muted); }
.footer-social a:hover { color: var(--text); text-decoration: none; }

.footer-col { display: flex; flex-direction: column; gap: 1rem; font-size: .875rem; }
.footer-col h4 { font-size: .75rem; font-weight: 600; color: var(--muted); letter-spacing: 1.5px; }
.footer-col a, .footer-col span { color: var(--text); line-height: 1.5; }
.footer-col a:hover { color: var(--red); text-decoration: none; }

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 0 1.25rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--dim);
}
.footer-bottom a { color: var(--dim); }
.footer-bottom a:hover { color: var(--muted); text-decoration: none; }

@media (min-width: 640px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 768px) {
  .footer-top { padding-left: 5rem; padding-right: 5rem; }
  .footer-bottom { margin: 0 5rem; }
}
@media (min-width: 1024px) {
  .footer-top { display: flex; justify-content: space-between; gap: 3rem; }
}

/* ── EMPTY STATE ── */
.no-posts { color: var(--muted); font-size: 1rem; }
