/* ============================================
   Anthony Voigt Blog — Stylesheet
   Font: Inter (Google Fonts)
   Palette: Black and white with warm accent
   ============================================ */

:root {
  --accent: #B8711F;
}

/* --- Skip Link (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: #111;
  color: #fff;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  z-index: 1000;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: #111;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Focus States (accessibility) --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Header --- */
.site-header {
  padding: 0 24px;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.site-header__logo {
  height: 28px;
  width: auto;
  display: block;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #4a4a4a;
  text-decoration: none;
  margin-left: 32px;
}

.site-nav a:hover {
  color: var(--accent);
}

/* --- Hero --- */
.hero {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
}

.hero__title {
  color: #fff;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-align: center;
  padding: 0 24px;
}

/* --- Homepage Card Grid --- */
.homepage {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
}

.card {
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  padding-bottom: 40px;
}

.card:hover .card__title {
  color: var(--accent);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: grayscale(100%);
  display: block;
}

.card__body {
  display: contents;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: #111;
  padding-top: 20px;
}

.card__date {
  font-size: 0.8rem;
  color: #999;
  font-weight: 400;
  padding-top: 6px;
}

.card__summary {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555;
  padding-top: 10px;
}

.card__readmore {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  padding-top: 10px;
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card__readmore::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: rotate(45deg);
}

/* --- Footer --- */
.site-footer {
  background: #f5f5f5;
  padding: 0 24px;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 0 40px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.site-footer__logo {
  height: 22px;
  width: auto;
  display: block;
  margin-bottom: 12px;
}

.site-footer__heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 12px;
}

.site-footer__about p,
.site-footer__contact p {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.7;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #444;
  text-decoration: none;
  font-size: 0.85rem;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-link__icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.site-footer__copyright {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 0;
  border-top: 1px solid #e0e0e0;
  font-size: 0.8rem;
  color: #767676;
}

/* --- Layout container (article pages) --- */
.site-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Article (Single Post) --- */
.article-header {
  padding: 40px 0 24px;
}

.article-content {
  padding: 16px 0 64px;
}

.article__title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--accent);
}

.article__date {
  font-size: 0.85rem;
  color: #888;
  font-weight: 400;
  margin-top: 12px;
}

/* --- Article Hero (full-width) --- */
.article-hero {
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.article-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
}

.article__body {
  margin-top: 0;
}

.article__body p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 24px;
  color: #222;
}

.article__body h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 48px;
  margin-bottom: 16px;
  color: #111;
}

.article__body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  color: #111;
}

.article__body a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article__body a:hover {
  color: var(--accent);
}

.article__body blockquote {
  border-left: 3px solid #ddd;
  padding-left: 20px;
  margin: 32px 0;
  font-style: italic;
  color: #4a4a4a;
}

.article__body ul,
.article__body ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article__body li {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 8px;
  color: #222;
}

.article__body img {
  max-width: 100%;
  height: auto;
  margin: 32px 0;
  filter: grayscale(100%);
}

.article__body .video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  margin: 32px 0;
  background: #000;
}

.article__body .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article__body hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 48px 0;
}

/* --- About Page --- */
.about {
  padding: 48px 0 64px;
}

.about__title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 32px;
  color: #111;
}

.about__body p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 24px;
  color: #222;
}

.about__body a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about__body a:hover {
  color: var(--accent);
}

/* --- 404 Page --- */
.error-page {
  padding: 120px 0;
  text-align: center;
}

.error-page__code {
  font-size: 4rem;
  font-weight: 700;
  color: #ddd;
  letter-spacing: -0.03em;
}

.error-page__message {
  font-size: 1.2rem;
  color: #555;
  margin-top: 16px;
}

.error-page__link {
  display: inline-block;
  margin-top: 32px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.error-page__link:hover {
  color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 32px;
  }

  .hero {
    height: 320px;
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .article-hero {
    height: 320px;
  }
}

@media (max-width: 600px) {
  .site-header__inner {
    padding: 24px 0;
  }

  .site-header__logo {
    height: 22px;
  }

  .site-nav a {
    margin-left: 20px;
    font-size: 0.85rem;
  }

  .hero {
    height: 240px;
  }

  .hero__title {
    font-size: 1.6rem;
  }

  .homepage {
    padding: 40px 24px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .card__title {
    font-size: 1.05rem;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 0 32px;
  }

  .article-hero {
    height: 240px;
  }

  .article__title {
    font-size: 1.6rem;
  }

  .about__title {
    font-size: 1.6rem;
  }

  .article__body p,
  .article__body li,
  .about__body p {
    font-size: 1rem;
  }

  .error-page {
    padding: 80px 0;
  }

  .error-page__code {
    font-size: 3rem;
  }
}
