/* ============================================
   GUFF — Main Stylesheet
   Aesthetic: Bold tabloid sport editorial
   ============================================ */

:root {
  --black: #0a0a0a;
  --white: #f8f6f0;
  --yellow: #f5c400;
  --red: #d42b2b;
  --mid-grey: #888;
  --light-grey: #e8e5df;
  --rule: 1px solid #ddd9d0;

  --font-headline: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;

  --max-width: 760px;
  --header-height: 56px;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--black);
  text-decoration-color: var(--yellow);
  text-underline-offset: 3px;
}

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

/* ============================================
   HEADER
   ============================================ */

.site-header {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 4px solid var(--yellow);
}

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

.site-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-guff {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--yellow);
  line-height: 1;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  transition: opacity 0.15s, color 0.15s;
}

.site-nav a:hover {
  color: var(--yellow);
  opacity: 1;
}

/* ============================================
   MAIN
   ============================================ */

.site-main {
  flex: 1;
  width: 100%;
}

/* ============================================
   HOME
   ============================================ */

.home-hero {
  background: var(--black);
  padding: 2.5rem 1.25rem 2rem;
  text-align: center;
}

.hero-tagline {
  font-family: var(--font-headline);
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--mid-grey);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.post-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.post-card {
  padding: 1.5rem 0;
  border-bottom: var(--rule);
}

.post-card:first-child {
  border-top: var(--rule);
}

.post-card-meta time {
  font-family: var(--font-headline);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.post-card-title {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  line-height: 1.1;
  margin-top: 0.3rem;
}

.post-card-title a {
  text-decoration: none;
  color: var(--black);
}

.post-card-title a:hover {
  color: var(--red);
}

.post-card-excerpt {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.55;
}

.archive-link-wrap {
  padding: 2.5rem 0 0;
  text-align: right;
}

.archive-link {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  border-bottom: 3px solid var(--yellow);
  padding-bottom: 2px;
  transition: color 0.15s;
}

.archive-link:hover {
  color: var(--red);
}

/* ============================================
   ARCHIVE PAGE
   ============================================ */

.archive {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

.archive-heading {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 4px solid var(--black);
}

.year-heading {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid-grey);
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

.year-list {
  list-style: none;
  border-top: var(--rule);
}

.archive-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: var(--rule);
}

.archive-item time {
  font-family: var(--font-headline);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid-grey);
  white-space: nowrap;
}

.archive-item a {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  line-height: 1.25;
}

.archive-item a:hover {
  color: var(--red);
}

/* ============================================
   POST
   ============================================ */

.post {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 4px solid var(--black);
}

.post-meta time {
  font-family: var(--font-headline);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.post-title {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

/* ============================================
   POST CONTENT — tame the old WP HTML
   ============================================ */

.post-content {
  font-size: 1rem;
  line-height: 1.7;
}

.post-content p {
  margin: 0 0 1.25em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--font-headline);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 2em 0 0.6em;
  line-height: 1.1;
}

.post-content h2 { font-size: 1.8rem; }
.post-content h3 { font-size: 1.4rem; }
.post-content h4 { font-size: 1.1rem; }

.post-content a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  border: 1px solid var(--light-grey);
}

/* WP used wrapping divs with float styles — neutralise them */
.post-content div[style] {
  float: none !important;
  clear: both;
  text-align: left !important;
  margin: 0 !important;
}

.post-content div.p_embed,
.post-content div.p_image_embed {
  margin: 1.5em 0 !important;
}

.post-content a[style] {
  float: none !important;
  margin: 0 !important;
}

/* Tables */
.post-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.5em 0;
  overflow-x: auto;
  display: block;
}

.post-content th,
.post-content td {
  padding: 0.4em 0.75em;
  text-align: left;
  border: 1px solid var(--light-grey);
}

.post-content tr:nth-child(even) td {
  background: var(--light-grey);
}

/* Blockquote */
.post-content blockquote {
  border-left: 4px solid var(--yellow);
  margin: 1.5em 0;
  padding: 0.5em 1.25em;
  font-style: italic;
  color: #555;
}

/* iframes (Vine embeds etc) */
.post-content iframe {
  max-width: 100%;
  display: block;
  margin: 1.5em auto;
}

/* ============================================
   POST FOOTER
   ============================================ */

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: var(--rule);
}

.back-link {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

.back-link:hover {
  color: var(--red);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--black);
  color: var(--mid-grey);
  padding: 1.5rem 1.25rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  font-family: var(--font-headline);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
  .archive-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .post-title {
    font-size: 1.9rem;
  }
}
