@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/google-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Google Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/google-sans-latin-italic.woff2") format("woff2");
}

:root {
  --page: #f7f9fa;
  --surface: #ffffff;
  --ink: #10202b;
  --muted: #63737d;
  --accent: #1a4a6e;
  --accent-dark: #102d42;
  --border: #dfe5e8;
  --footer: #10202b;
  --footer-text: #e6edf1;
  --badge: #8a3a5c;
  --shadow: 0 10px 30px rgba(16, 32, 43, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--ink);
  font-family: "Google Sans", ui-sans-serif, system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.site-header {
  position: relative;
  z-index: 20;
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: min(1320px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Google Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-logo::before {
  content: "";
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  background: url("/images/posts/gluten-free-sticky-toffee-pudding-featured.jpg") center / cover no-repeat;
  border: 2px solid var(--border);
  border-radius: 50%;
}

.site-logo span {
  color: var(--accent);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.desktop-nav > a,
.desktop-nav summary {
  color: #253844;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-decoration: none;
  text-transform: uppercase;
}

details {
  position: relative;
}

summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  width: 270px;
  padding: 14px;
  display: grid;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

details:not([open]) > .dropdown-panel {
  display: none;
}

.dropdown-panel a {
  padding: 8px 10px;
  color: var(--ink);
  border-radius: 7px;
  text-decoration: none;
}

.dropdown-panel a:hover {
  background: #eef3f6;
}

.search-panel {
  width: 360px;
}

.search-panel label,
.sidebar-intro label {
  font-size: 13px;
  font-weight: 800;
}

input[type="search"] {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bcc8ce;
  border-radius: 8px;
  font: inherit;
}

#search-results,
#sidebar-search-results {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

#search-results a,
#sidebar-search-results a {
  padding: 7px 9px;
  font-size: 14px;
}

.mobile-menu {
  display: none;
}

.page-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 42px auto 64px;
  display: grid;
  grid-template-columns: minmax(0, 760px) 320px;
  align-items: start;
  justify-content: space-between;
  gap: 52px;
}

.main-column {
  width: 100%;
  min-width: 0;
}

.site-sidebar {
  width: 320px;
  padding: 0;
  display: grid;
  gap: 22px;
  background: var(--surface);
  border-radius: 14px;
}

.widget {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.widget h2 {
  margin: 0 0 15px;
  color: var(--accent-dark);
  font-size: 18px;
  line-height: 1.25;
}

.widget p {
  margin: 11px 0;
  font-size: 14px;
}

.widget ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.widget li {
  padding: 9px 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #edf1f3;
}

.widget li:last-child {
  border-bottom: 0;
}

.widget li a {
  color: #173f58;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.widget li span,
.widget time {
  color: var(--muted);
  font-size: 12px;
}

.recent-widget li {
  display: grid;
  justify-content: stretch;
}

.category-badge {
  display: inline-flex;
  padding: 5px 10px;
  color: #fff;
  background: var(--badge);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.065em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.hero-post {
  position: relative;
  height: 420px;
  margin-bottom: 34px;
  overflow: hidden;
  background: var(--accent-dark);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero-image,
.hero-image img {
  width: 100%;
  height: 100%;
}

.hero-image img {
  object-fit: cover;
}

.hero-post::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(4, 16, 24, 0.88) 100%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  z-index: 2;
  left: 34px;
  right: 34px;
  bottom: 28px;
  color: #fff;
}

.hero-overlay h2 {
  max-width: 680px;
  margin: 10px 0;
  font: 700 clamp(29px, 4vw, 48px) / 1.08 "Google Sans", ui-sans-serif, system-ui, sans-serif;
}

.hero-overlay h2 a {
  color: #fff;
  text-decoration: none;
}

.home-heading {
  margin-bottom: 22px;
}

.hero-overlay > p:not(.post-meta) {
  max-width: 650px;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-meta {
  margin: 11px 0 0;
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.hero-overlay .post-meta {
  color: #e8eef1;
}

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

.post-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(16, 32, 43, 0.05);
}

.card-image {
  display: block;
  height: 210px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.card-image:hover img {
  transform: scale(1.025);
}

.card-body {
  padding: 20px;
}

.card-body h2 {
  margin: 11px 0 8px;
  font: 700 24px / 1.2 "Google Sans", ui-sans-serif, system-ui, sans-serif;
}

.card-body h2 a {
  color: var(--accent-dark);
  text-decoration: none;
}

.card-excerpt {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #455963;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.archive-header {
  margin-bottom: 28px;
}

.archive-header h1,
.static-content > h1 {
  margin: 0;
  color: var(--accent-dark);
  font: 700 42px / 1.1 "Google Sans", ui-sans-serif, system-ui, sans-serif;
}

.pagination {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.page-link {
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
}

.page-link.current {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.post-article,
.static-content {
  width: 100%;
  padding: 34px 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.post-header h1 {
  margin: 14px 0 8px;
  color: var(--accent-dark);
  font: 700 clamp(34px, 4vw, 52px) / 1.06 "Google Sans", ui-sans-serif, system-ui, sans-serif;
}

.post-featured-image {
  margin: 28px 0;
}

.post-featured-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 12px;
}

.post-body,
.entry-content {
  width: 100%;
  color: var(--ink);
  font-family: "Google Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.72;
}

.post-body p,
.entry-content p {
  margin: 0 0 1.15em;
}

.post-body br {
  line-height: 1.55;
}

.post-body h2,
.post-body h3,
.entry-content h2,
.entry-content h3 {
  margin: 1.6em 0 0.55em;
  color: var(--accent-dark);
  font-family: "Google Sans", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.25;
}

.post-body h2,
.entry-content h2 {
  font-size: 27px;
}

.post-body h3,
.entry-content h3 {
  font-size: 21px;
}

.post-body ul,
.post-body ol,
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.25em;
  padding-left: 1.4em;
}

.fa-kitchen-notes {
  margin-top: 32px;
  padding: 22px;
  background: #f4f7f8;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}

.post-tags {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.post-tags h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.post-tags div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags a {
  padding: 6px 11px;
  color: var(--accent-dark);
  background: #edf3f6;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.post-navigation {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.post-navigation a {
  padding: 18px;
  color: var(--accent-dark);
  background: #f5f7f8;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
}

.post-navigation span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-post {
  text-align: right;
}

.article-index {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.article-index li {
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.article-index a {
  color: var(--accent-dark);
  font-weight: 750;
  text-decoration: none;
}

.article-index time {
  color: var(--muted);
  white-space: nowrap;
}

.site-footer {
  width: 100%;
  clear: both;
  color: var(--footer-text);
  background: var(--footer);
}

.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0;
  text-align: center;
}

.footer-brand {
  margin: 0;
  color: #fff;
  font: 700 24px "Google Sans", ui-sans-serif, system-ui, sans-serif;
}

.footer-inner nav {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px 18px;
}

.footer-inner a {
  color: #fff;
}

@media (max-width: 1000px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .mobile-menu > summary {
    cursor: pointer;
    font-weight: 800;
  }

  .mobile-menu nav {
    position: absolute;
    top: 64px;
    right: 0;
    width: min(330px, calc(100vw - 24px));
    padding: 14px;
    display: grid;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }

  .mobile-menu:not([open]) nav {
    display: none;
  }

  .mobile-menu nav a {
    padding: 8px;
    color: var(--ink);
    text-decoration: none;
  }

  .page-layout {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
  }

  .site-sidebar {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-intro {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .page-layout,
  .footer-inner {
    width: min(100% - 24px, 760px);
  }

  .header-inner {
    min-height: 64px;
  }

  .site-logo {
    font-size: 22px;
  }

  .page-layout {
    margin-top: 18px;
    margin-bottom: 36px;
    gap: 28px;
  }

  .hero-post {
    height: 260px;
    border-radius: 12px;
  }

  .hero-overlay {
    left: 18px;
    right: 18px;
    bottom: 17px;
  }

  .hero-overlay h2 {
    font-size: 28px;
  }

  .hero-overlay > p:not(.post-meta) {
    display: none;
  }

  .card-grid,
  .site-sidebar,
  .post-navigation {
    grid-template-columns: 1fr;
  }

  .card-image {
    height: 220px;
  }

  .post-article,
  .static-content {
    padding: 24px 20px;
    border-radius: 12px;
  }

  .post-header h1 {
    font-size: 36px;
  }

  .post-body,
  .entry-content {
    font-size: 17px;
  }

  .next-post {
    text-align: left;
  }

  .article-index li {
    display: grid;
    gap: 3px;
  }
}
