/* ============================================================
   IPVO — site styles
   Palette follows the original site (sage green on light paper),
   refreshed with a modern, airy layout.
   ============================================================ */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew7Y3tcoqK5.0eb67e220287.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: fallback;
  src: url("../fonts/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCu170w7Y3tcoqK5.96c7d2730bac.woff2") format("woff2");
}

:root {
  --green-950: #2c402c;
  --green-900: #33503a;
  --green-800: #41613f;
  --green-700: #4f714f;
  --sage: #6b8e6b;            /* original accent */
  --sage-strong: #55704f;
  --sage-soft: #e7efe6;
  --sage-pale: #f1f6f0;
  --ink: #1a1a1a;             /* original text */
  --muted: #5c6b5c;
  --paper: #f9fbf9;           /* original background */
  --card: #ffffff;
  --line: #dfe8de;
  --line-strong: #c9d8c7;
  --navy: #143852;            /* original secondary accent */
  --th-bg: #33503a;           /* table header (kept dark in both themes) */
  --header-bg: rgba(249, 251, 249, 0.88);
  --strip-bg: rgba(241, 246, 240, 0.60);
  --footer-bg: rgba(237, 243, 237, 0.92);
  --footer-line: #dbe6d8;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1160px;
  --shadow: 0 1px 2px rgba(43, 64, 44, 0.05), 0 10px 30px rgba(43, 64, 44, 0.08);
  --shadow-lg: 0 4px 10px rgba(43, 64, 44, 0.05), 0 18px 44px rgba(43, 64, 44, 0.14);
  color-scheme: light;
}

/* Dark (forest night) theme — complements the light sage palette. */
html[data-theme="dark"] {
  --green-950: #d9e7d3;
  --green-900: #c6d9bd;
  --green-800: #93aa8b;
  --green-700: #7f9977;
  --sage: #8fae6a;
  --sage-strong: #a4c289;
  --sage-soft: #27321f;
  --sage-pale: #1d2719;
  --ink: #e8eee3;
  --muted: #9baa99;
  --paper: #121812;
  --card: #1c251b;
  --line: #2c382a;
  --line-strong: #3d4c3a;
  --navy: #143852;
  --header-bg: rgba(18, 24, 18, 0.9);
  --strip-bg: rgba(24, 32, 22, 0.62);
  --footer-bg: rgba(15, 20, 14, 0.92);
  --footer-line: #24301f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 4px 10px rgba(0, 0, 0, 0.35), 0 18px 44px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Sticky footer: keep the footer at the bottom even on short pages. */
html { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
main#main { position: relative; z-index: 1; flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

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

a { color: var(--sage-strong); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--green-950); }

.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ------------------------------------------------------------ "dig" effect canvas */

#dig-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}
.site-header { z-index: 50; }
main#main, .site-footer { position: relative; z-index: 1; }

#dig-canvas {
  filter: blur(30px);
  will-change: filter;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green-900); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Visually hidden but available to screen readers / search engines. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(43, 64, 44, 0.08); border-color: var(--line); }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 78px;
}

.brand { justify-self: start; }
.brand img { height: 52px; width: auto; transition: opacity 0.15s ease; }
.brand:hover img { opacity: 0.85; }

.site-nav { justify-self: center; }
.site-nav-list { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; align-items: center; }
.site-nav-list a {
  display: block; padding: 9px 16px; border-radius: 999px;
  color: var(--ink); font-weight: 600; font-size: 15px;
  position: relative;
}
.site-nav-list a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--sage);
  transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease;
}
.site-nav-list a:hover { color: var(--sage-strong); text-decoration: none; }
.site-nav-list a:hover::after, .site-nav-list a.active::after { transform: scaleX(1); }
.site-nav-list a.active { color: var(--sage-strong); }

.header-right { justify-self: end; display: flex; align-items: center; gap: 12px; }

.lang-switch { list-style: none; display: flex; margin: 0; padding: 3px; gap: 2px; align-items: center;
  background: var(--sage-pale); border: 1px solid var(--line); border-radius: 999px; }
.lang-switch a {
  display: block; padding: 5px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.05em; color: var(--muted);
}
.lang-switch a:hover { color: var(--sage-strong); text-decoration: none; }
.lang-switch a.active { background: var(--sage); color: #fff; box-shadow: 0 1px 4px rgba(107, 142, 107, 0.4); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 9px; border-radius: 8px; }
.nav-toggle:hover { background: var(--sage-soft); }
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: var(--green-900); margin: 4.5px 0; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------ generic */

.page-body { padding: 52px 0 76px; }

.page-head { padding: 44px 0 12px; }
.page-head h1 { font-family: var(--sans); font-weight: 600; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.18; margin: 0 0 12px; color: var(--green-950); }
.page-head .kicker { color: var(--sage-strong); font-weight: 700; font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px; }
.page-head .kicker a:hover { text-decoration: none; }
.page-head .intro { max-width: 760px; font-size: 1.1rem; color: var(--muted); margin: 14px 0 0; }

.post-head .post-meta-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14.5px; }
.post-meta-line time { display: inline-flex; align-items: center; gap: 7px; }
.post-meta-line .icon { color: var(--sage); }
.post-meta-sep { color: var(--line-strong); }

.section-title { font-family: var(--sans); font-weight: 600; font-size: clamp(1.55rem, 3vw, 2rem); color: var(--green-950); margin: 0; }
.section-title a { color: inherit; }
.section-title a:hover { text-decoration: none; color: var(--sage-strong); }

.lead { font-size: 1.15rem; color: var(--muted); }

/* ------------------------------------------------------------ home: hero */

.hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(420px, 60vh, 620px); color: #fff; overflow: hidden; }
.hero img.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: heroZoom 18s ease-out both; }
@keyframes heroZoom { from { transform: scale(1.05); } to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18, 36, 22, 0.12) 25%, rgba(18, 36, 22, 0.82) 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 84px 0 66px; max-width: 780px; margin: 0 auto; }
.hero-inner h1 { font-family: var(--sans); font-weight: 600; font-size: clamp(2.5rem, 5.5vw, 4rem); line-height: 1.1; margin: 0 0 16px; text-shadow: 0 2px 22px rgba(10, 25, 16, 0.5); }
.hero-inner p { font-size: clamp(1.05rem, 2vw, 1.25rem); margin: 0; opacity: 0.96; text-shadow: 0 1px 12px rgba(10, 25, 16, 0.45); max-width: 620px; }

/* ------------------------------------------------------------ post list (one row per post) */

.post-list { display: flex; flex-direction: column; gap: 22px; }

.post-row {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 30px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; align-items: stretch;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.post-row:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.post-row-media { border-radius: calc(var(--radius) - 6px); overflow: hidden; }
.post-row-media img { width: 100%; height: auto; transition: transform 0.4s ease; }
.post-row:hover .post-row-media img { transform: scale(1.03); }

.post-row-body { display: flex; flex-direction: column; gap: 10px; padding: 8px 10px 8px 2px; justify-content: center; }
.post-row-meta time { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.post-row-meta .icon { color: var(--sage); }
.post-row-title { font-weight: 600; font-size: 1.3rem; line-height: 1.3; margin: 0; }
.post-row-title a { color: var(--green-950); }
.post-row-title a:hover { color: var(--sage-strong); text-decoration: none; }
.post-row-excerpt { margin: 0; color: var(--muted); font-size: 15.5px; }

.read-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; color: var(--sage-strong); margin-top: 2px; }
.read-more .icon { transition: transform 0.2s ease; }
.read-more:hover .icon { transform: translateX(4px); }
.read-more:hover { text-decoration: none; color: var(--green-950); }

/* ------------------------------------------------------------ home: news strip */

.news-strip { background: var(--strip-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 54px 0 64px; }
.news-strip .strip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.strip-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.strip-more .icon { transition: transform 0.2s ease; }
.strip-more:hover .icon { transform: translateX(4px); }
.strip-more:hover { text-decoration: none; }

.featured-strip { padding: 56px 0 76px; }
.featured-strip .stream-block { max-width: 780px; margin: 0 auto; }

/* ------------------------------------------------------------ post page */

.post-cover { margin: 24px 0 30px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-cover img { width: 100%; height: auto; }

.post-stream { max-width: 780px; margin: 0 auto; }
.stream-block + .stream-block { margin-top: 26px; }

.rich-text p { margin: 0 0 1.1em; }
.rich-text a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(107, 142, 107, 0.5); }
.rich-text ul, .rich-text ol { padding-left: 1.4em; }
.rich-text li { margin-bottom: 0.35em; }

.block-heading { margin: 0; color: var(--green-950); font-weight: 600; }
.block-heading + * { margin-top: 14px; }
.stream-block h2.block-heading { font-size: 1.65rem; }
.stream-block h3.block-heading { font-size: 1.32rem; color: var(--green-900); }
.stream-block h4.block-heading { font-size: 1.1rem; color: var(--green-900); }

.block-image figure { margin: 0; }
.block-image img { border-radius: var(--radius-sm); box-shadow: var(--shadow); width: 100%; height: auto; }
.block-image figcaption, .block-media .media-caption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 10px; }

.block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 26px 0; }
.block-gallery figure { margin: 0; }
.block-gallery img { border-radius: var(--radius-sm); width: 100%; height: auto; transition: transform 0.3s ease; }
.block-gallery figure:hover img { transform: scale(1.02); }
.block-gallery figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

.block-quote { margin: 30px 0; padding: 10px 0 10px 26px; border-left: 4px solid var(--sage); background: linear-gradient(90deg, var(--sage-pale), transparent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.block-quote blockquote { margin: 0; font-size: 1.28rem; line-height: 1.45; color: var(--green-950); font-weight: 600; }
.block-quote cite { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); font-style: normal; }

.block-table { margin: 30px 0; }
.block-table .table-caption { font-weight: 600; margin-bottom: 10px; color: var(--green-900); }
.block-table table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15.5px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.block-table th, .block-table td { border-bottom: 1px solid var(--line); padding: 12px 16px; text-align: left; vertical-align: top; }
.block-table tr:last-child td { border-bottom: 0; }
.block-table th { background: var(--th-bg); color: #fff; font-weight: 600; border-bottom-color: var(--green-800); }
.block-table tbody tr:nth-child(even) { background: var(--sage-pale); }

.block-media { margin: 30px 0; }
.block-media .embed-responsive { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.block-media .embed-responsive iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.block-document a { display: inline-flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px; padding: 12px 22px; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.04); transition: border-color 0.15s ease, transform 0.15s ease; }
.block-document a:hover { border-color: var(--sage); text-decoration: none; transform: translateY(-1px); }
.block-document .icon { color: var(--sage-strong); }

/* ------------------------------------------------------------ project facts */

.project-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; margin: 24px 0 8px; align-items: start; max-width: 900px; }
.project-facts { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 26px 20px; box-shadow: 0 1px 3px rgba(43,64,44,0.04); }
.project-facts dt { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sage-strong); font-weight: 700; margin-top: 18px; }
.project-facts dd { margin: 4px 0 0; font-size: 16px; color: var(--green-950); }
.partners-list { list-style: none; margin: 0; padding: 0; }
.partners-list li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.partners-list li:last-child { border-bottom: 0; }
.partners-list .partner-role { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------ knjiga */

.book-layout { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 44px; align-items: start; margin-top: 28px; }
.book-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.book-cover img { width: 100%; }
.book-info .buy-link { display: inline-flex; align-items: center; gap: 8px; background: var(--sage); color: #fff; padding: 12px 24px; border-radius: 999px; font-weight: 600; margin-top: 8px; transition: background 0.15s ease, transform 0.15s ease; }
.book-info .buy-link:hover { background: var(--sage-strong); color: #fff; text-decoration: none; transform: translateY(-1px); }

/* ------------------------------------------------------------ contact */

.contact-hero {
  display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 44px; align-items: center;
  background: linear-gradient(135deg, var(--sage-soft), var(--card));
  border: 1px solid var(--line); border-radius: 22px;
  padding: 30px 34px; margin: 36px 0 10px;
}
.contact-photo { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.contact-photo img { width: 100%; height: auto; }
.contact-person .kicker { margin-bottom: 8px; }
.contact-name { font-weight: 600; font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: var(--green-950); margin: 0 0 4px; }
.contact-role { font-weight: 600; color: var(--sage-strong); margin: 0 0 6px; }
.contact-intro { color: var(--muted); max-width: 60ch; margin: 8px 0 0; }
.contact-intro p { margin: 0 0 0.6em; }
.contact-bio { color: var(--muted); max-width: 60ch; margin: 10px 0 0; }
.contact-chips { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.contact-chips li { display: flex; align-items: center; gap: 9px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 14.5px; }
.contact-chips .icon { color: var(--sage-strong); }
.contact-chips a:hover { text-decoration: none; color: var(--green-950); }

/* VAT copy chip */
.chip-copy { gap: 8px; }
.copy-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--sage-soft); color: var(--sage-strong);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.copy-btn:hover { background: var(--sage); color: #fff; transform: translateY(-1px); }
.copy-btn .icon { width: 14px; height: 14px; }
.copy-btn .icon-check { display: none; color: inherit; }
.copy-btn.copied { background: var(--sage-strong); color: #fff; }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: inline-block; }

/* ------------------------------------------------------------ theme toggle */

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--green-800);
  cursor: pointer; flex: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--sage); background: var(--sage-soft); color: var(--sage-strong); }
.theme-toggle .icon { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ------------------------------------------------------------ footer (light) */

.site-footer { background: var(--footer-bg); border-top: 1px solid var(--footer-line); margin-top: 0; color: var(--green-950); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 44px; padding-top: 52px; padding-bottom: 34px; }
.footer-logo { height: 52px; width: auto; margin-bottom: 14px; }
.footer-name { margin: 0; line-height: 1.6; color: var(--green-800); }
.footer-heading { color: var(--green-900); font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; margin: 0 0 16px; }
.footer-contact, .social-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-contact li { display: flex; align-items: center; gap: 11px; }
.footer-contact .icon, .social-links .icon { color: var(--sage-strong); }
.footer-contact a, .social-links a { color: var(--green-800); display: inline-flex; align-items: center; gap: 11px; }
.footer-contact a:hover, .social-links a:hover { color: var(--green-950); text-decoration: none; }
.social-links a { transition: color 0.15s ease, transform 0.15s ease; }
.social-links a:hover { transform: translateX(2px); }

.footer-banner { display: flex; justify-content: center; padding: 6px 22px 26px; }
.footer-banner a { display: block; opacity: 0.9; transition: opacity 0.2s ease; }
.footer-banner a:hover { opacity: 1; }
.footer-banner img { max-height: 60px; width: auto; }

.footer-bottom { border-top: 1px solid var(--footer-line); padding: 20px 0 26px; font-size: 14px; color: var(--muted); }
.footer-bottom p { margin: 0; text-align: center; }

/* ------------------------------------------------------------ 404 / to-top */

.error-page { max-width: 560px; margin: 0 auto; text-align: center; padding: 90px 22px; }
.error-page h1 { font-weight: 600; font-size: 3rem; color: var(--green-950); margin-bottom: 10px; }
.error-page p { color: var(--muted); }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--sage); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
  box-shadow: var(--shadow);
}
.to-top .icon { transform: rotate(-90deg); }
.to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: var(--sage-strong); }

/* ------------------------------------------------------------ reveal animation */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero img.hero-img { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .post-row { transition: none; }
}

/* ------------------------------------------------------------ pagination */

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--green-800);
  font-weight: 600; font-size: 15px;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.page-link:hover { border-color: var(--sage); color: var(--sage-strong); transform: translateY(-1px); text-decoration: none; }
.page-link.current { background: var(--sage); border-color: var(--sage); color: #fff; cursor: default; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .book-layout { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 240px minmax(0, 1fr); gap: 22px; }
  .hero-inner { padding-left: 22px; padding-right: 22px; }
  .contact-hero { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .nav-toggle { display: block; }
  .header-inner { grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
  .brand { grid-column: 1; grid-row: 1; }
  .header-right { grid-column: 2; grid-row: 1; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .site-nav-list {
    display: none;
    flex-direction: column; align-items: stretch;
    padding: 8px 2px 6px;
  }
  .site-nav-list.open { display: flex; }
  .site-nav-list a { border-radius: 10px; padding: 13px 14px; }
  .site-nav-list a.active { background: transparent; color: var(--sage-strong); }
  .site-nav-list a::after { display: none; }
  .post-row { grid-template-columns: 1fr; }
  .post-row-body { padding: 4px 6px 8px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .page-body { padding: 38px 0 56px; }
  .project-hero { grid-template-columns: 1fr; }
  .brand img { height: 44px; }
}