:root{
  --bg:#ffffff;
  --ink:#111;
  --muted:#6b6b6b;
  --line:#e9e9e9;
  --soft:#f6f6f6;
  --accent:#7a7cff;
  --shadow:0 10px 30px rgba(0,0,0,.08);
  --shadow2:0 18px 55px rgba(0,0,0,.10);
  --radius:16px;
  --container:1200px;
  --serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

*{box-sizing:border-box}
html,body{height:100%}
html{font-size:15px;}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--ink);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  line-height:1.7;
  font-size:16px;
}
img{max-width:100%; display:block}
a{color:inherit; text-decoration:none}
button,input{font:inherit}
::selection{background:rgba(122,124,255,.18)}

.page{min-height:70vh;    padding-bottom: 15px;}

.container{
  width:min(var(--container), calc(100% - 64px));
  margin:0 auto;
}
@media (max-width: 720px){
  .container{width:calc(100% - 32px)}
}

/* ─────────────────────────────────────────
   Header
───────────────────────────────────────── */

.header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.94);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--line);
}
.header__inner{
  width:min(var(--container), calc(100% - 64px));
  margin:0 auto;
  min-height:74px;
  display:grid;
  grid-template-columns: 90px 1fr 140px;
  align-items:center;
  gap:18px;
}
@media (max-width: 900px){
  .header__inner{
    width:calc(100% - 32px);
    grid-template-columns: 1fr 140px;
  }
  
}

.brand{display:flex; align-items:center}
.brand__logo{height:75px; width:auto;margin-left: -15px;}
@media (max-width: 900px){
.brand__logo {
    height: 60px;
    width: auto;
    margin-left: -15px;
}
}
.nav{
  display:flex;
  justify-content:center;
  gap:26px;
  align-items:center;
}
.nav__link{
  font-size:15px;
  color:#222;
  text-transform:lowercase;
  letter-spacing:.01em;
  padding:10px 0;
  border-bottom:2px solid transparent;
}
.nav__link::first-letter{
  text-transform: uppercase;

}
.nav__link:hover{border-bottom-color:#d9d9d9}
.nav__link.is-active{border-bottom-color:var(--accent)}
@media (max-width: 900px){
  .nav{display:none}
}

.actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
}
.iconbtn{
  width:40px;
  height:40px;
  border:1px solid transparent;
  background:transparent;
  border-radius:999px;
  display:grid;
  place-items:center;
  cursor:pointer;
  padding: 8px;
}
.iconbtn:hover{background:rgba(0,0,0,.04)}
.iconbtn svg{width:20px; height:20px; fill:#111}

.iconbtn--menu{
  display:none;
  position:relative;
}
.iconbtn--menu span{
  display:block;
  width:20px;
  height:2px;
  background:#111;
  border-radius:999px;
  margin:3px 0;
}
@media (max-width: 900px){
  .iconbtn--menu{display:grid; place-items:center}
}

/* ─────────────────────────────────────────
   Drawer (single source of truth)
───────────────────────────────────────── */

.drawer{
  position:fixed;
  inset:0;
  z-index:80;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease, visibility .18s ease;
}
body.is-menu-open .drawer{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.drawer__scrim{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.35);
  border:0;
  cursor:pointer;
  z-index:1;
}

.drawer__panel{
  position:absolute;
  top:0; bottom:0;
  right:0;
  width:min(360px, 92vw);
  background:#fff;
  border-left:1px solid var(--line);
  transform:translateX(105%);
  transition:transform .22s ease;
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:18px;
  z-index:2;
  overflow:auto;
  pointer-events:auto;
}
body.is-menu-open .drawer__panel{transform:translateX(0)}

.drawer__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.drawer__title{font-weight:600; font-size:16px}
.drawer__close{
  width:40px;height:40px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  cursor:pointer;
}
.drawer__group{
  border-top:1px solid var(--line);
  padding-top:14px;
}
.drawer__label{
  color:var(--muted);
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  margin-bottom:12px;
}
.drawer__link{
  display:block;
  padding:11px 0;
  border-bottom:1px solid var(--line);
  font-size:15px;
  text-transform:lowercase;
}
.drawer__link:last-child{border-bottom:0}

/* ─────────────────────────────────────────
   Head rows (HOME / CATEGORY) — smaller
───────────────────────────────────────── */

.headrow{
  display:grid;
  grid-template-columns: 1fr 1fr;
  align-items:end;
  gap:24px;
  padding:30px 0 16px;
  border-bottom:1px solid var(--line);
}
.headrow__title{
  margin:0;
  font-size:clamp(24px, 3.4vw, 30px);
  line-height:1.05;
  letter-spacing:-.02em;
  font-weight:600;
}
.headrow__tag{
  margin:0;
  color:#222;
  font-size:clamp(14px, 1.5vw, 18px);
  line-height:1.6;
  justify-self:end;
  max-width:56ch;
}
@media (max-width: 900px){
  .headrow{grid-template-columns:1fr; padding:22px 0 12px}
  .headrow__tag{justify-self:start}
}

/* Category */
.cathead{
  display:grid;
  grid-template-columns: 1fr 1fr;
  align-items:end;
  gap:24px;
  padding:30px 0 16px;
  border-bottom:1px solid var(--line);
}
.cathead__title{
  margin:0;
font-size: clamp(24px, 3.4vw, 30px);
  line-height:1.05;
  letter-spacing:-.02em;
  font-weight:600;
}
.cathead__tag{
  margin:0;
  color:#222;
  font-size:clamp(14px, 1.5vw, 18px);
  line-height:1.6;
  justify-self:end;
  max-width:60ch;
}
@media (max-width: 900px){
  .cathead{grid-template-columns:1fr; padding:22px 0 12px}
  .cathead__tag{justify-self:start}
}

/* ─────────────────────────────────────────
   Home layout
───────────────────────────────────────── */

.home{padding:24px 0 56px}
.home__grid{
  display:grid;
  grid-template-columns: 1.2fr .9fr;
  gap:28px;
  align-items:start;
}
.home__feature{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:22px;
}
@media (max-width: 1100px){
  .home__grid{grid-template-columns:1fr}
  .home__feature{grid-template-columns:1fr}
}
.home__side{padding-top:6px}
.sidehead{
  font-size:22px;
  font-weight:600;
  margin:0 0 14px;
}
.sideitems{display:grid; gap:16px}

/* ─────────────────────────────────────────
   Cards grid
───────────────────────────────────────── */

.grid{
  margin-top:34px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:28px;
}
@media (max-width: 1100px){
  .grid{grid-template-columns: repeat(2, 1fr)}
}
@media (max-width: 720px){
  .grid{grid-template-columns: 1fr}
}
.grid--cat{margin-top:22px}

.post{display:block;}
.post__media{
  border-radius:0;
  overflow:hidden;
  background:var(--soft);
}
.post__media img{
  width:100%;
  height:240px;
  object-fit:cover;
}
.post__body{padding:14px 0 0;}
.post__meta{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:12.5px;
  letter-spacing:.04em;
}
.post__cat{
  text-transform:uppercase;
  font-weight:700;
  color:var(--accent);
}
.dot{opacity:.7}
.post__title{
  margin-top:8px;
  font-size:20px;           /* SMALLER */
  line-height:1.2;
  font-weight:600;
  letter-spacing:-.01em;
}
.post:hover .post__title{text-decoration:underline}

/* variants */
.post--grid .post__media img{height:220px}
.post--grid .post__title{font-size:19px}

.post--feature .post__media img{height:280px}
.post--feature .post__title{font-size:22px}


.grid--cat{
  margin-top:26px;
  align-items:stretch;
}

.post--cat{
  position:relative;
}

.post--cat .post__media{
  background:var(--soft);
  overflow:hidden;
}

.post--cat .post__media img{
  height:300px;         /* nicer like the reference */
  width:100%;
  object-fit:cover;
}

/* White panel that sits on the image */
.post--cat .post__body{
  position:relative;
  margin-top:-56px;     /* pulls panel up onto the image */
  margin-left:18px;     /* gives that “offset” look */
  width:calc(100% - 36px);
  background:#fff;
  border:1px solid var(--line);
  padding:16px 16px 14px;
  box-shadow:var(--shadow);
}

/* Typography scale for category cards */
.post--cat .post__meta{
  font-size:13px;
  letter-spacing:.04em;
}

.post--cat .post__title{
  margin-top:10px;
  font-size:22px;       /* smaller + closer to screenshot */
  line-height:1.18;
  font-weight:600;
}

/* Mobile: reduce offsets so it stays clean */
@media (max-width: 720px){
  .post--cat .post__media img{height:240px;}
  .post--cat .post__body{
    margin-top:-44px;
    margin-left:12px;
    width:calc(100% - 24px);
    padding:14px 14px 12px;
  }
  .post--cat .post__title{font-size:20px;}
}
@media (max-width: 900px){
  .post--cat .post__body{width:92%}
}

.post--cat .post__title{font-size:22px}
.grid--cat{gap:30px;}
@media (max-width: 1100px){ .grid--cat{gap:26px;} }
/* ─────────────────────────────────────────
   Mini list (More stories)
───────────────────────────────────────── */

.mini{
  display:grid;
  grid-template-columns: 88px 1fr;
  gap:12px;
  align-items:center;
}
.mini__img{
  width:88px;
  height:60px;
  overflow:hidden;
  background:var(--soft);
}
.mini__img img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.mini__title{
  font-size:16px; /* SMALLER */
  line-height:1.25;
  font-weight:600;
}
.mini__time{
  margin-top:5px;
  display:block;
  color:var(--muted);
  font-size:12.5px;
}
.mini:hover .mini__title{text-decoration:underline}

/* ─────────────────────────────────────────
   Pager
───────────────────────────────────────── */

.pager{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:28px 0 8px;
}
.pager__btn{
  padding:9px 12px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-size:14px;
}
.pager__btn.is-disabled{opacity:.45; cursor:not-allowed}
.pager__pills{display:flex; gap:8px; flex-wrap:wrap; justify-content:center}
.pager__pill{
  min-width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  background:#fff;
  font-weight:700;
  font-size:14px;
}
.pager__pill.is-active{
  border-color:var(--accent);
  box-shadow:0 0 0 4px rgba(122,124,255,.14);
}

/* ─────────────────────────────────────────
   Article hero + article typography (smaller)
───────────────────────────────────────── */

.article-hero{
  position:relative;
  width:100%;
  height:320px;
  overflow:hidden;
  background:#ddd;
}
.article-hero__img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1.02);
}
.article-hero__shade{
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.55));
}
.article-hero__inner{
  position:relative;
  height:100%;
  display:grid;
  place-items:center;
  text-align:center;
  padding:0 18px;
}
.article-hero__title{
  margin:0;
  color:#fff;
  font-size:clamp(28px, 3.6vw, 44px); /* SMALLER */
  line-height:1.1;
  font-weight:600;
  max-width:24ch;
  letter-spacing:-.02em;
  text-shadow:0 10px 30px rgba(0,0,0,.25);
}
.article-hero__meta{
  margin-top:12px;
  color:rgba(255,255,255,.9);
  font-size:14px; /* SMALLER */
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
}
.article-hero__meta .sep{opacity:.8}
.article-hero__meta .author{font-weight:700}
@media (max-width: 720px){
  .article-hero{height:280px}
}

.container--article{
  width:min(860px, calc(100% - 64px));
}
@media (max-width:720px){
  .container--article{width:calc(100% - 32px)}
}

.article{padding:44px 0 66px}
.prose{
  font-family:var(--sans);
  font-size:17px;        /* SMALLER */
  line-height:1.9;
  color:#111;
}
.prose p{margin:0 0 16px}
.prose h2{
  margin:30px 0 12px;
  font-size:22px;        /* SMALLER */
  line-height:1.25;
  font-weight:600;
  letter-spacing:-.01em;
}
.prose h3{
  margin:24px 0 10px;
  font-size:18px;        /* SMALLER */
  line-height:1.3;
  font-weight:600;
}
.prose a{color:var(--accent); text-decoration:underline; text-underline-offset:3px}
.prose ul,.prose ol{margin:0 0 16px 1.2em}
.prose li{margin:8px 0}
.prose blockquote{
  margin:22px 0;
  padding:16px 18px;
  border-left:4px solid var(--accent);
  background:#fafafe;
  color:#333;
}
.prose code{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:.92em;
  background:#f2f2ff;
  border:1px solid #e6e6ff;
  padding:2px 8px;
}
.prose pre{
  padding:14px;
  overflow:auto;
  background:#111;
  color:#fff;
  border-radius:12px;
}
.prose pre code{background:transparent; border:0; padding:0}

/* ─────────────────────────────────────────
   Search page
───────────────────────────────────────── */

.search{
  min-height:calc(100vh - 74px);
  background:#fff;
}
.search__bar{
  position:sticky;
  top:74px;
  z-index:20;
  display:grid;
  grid-template-columns: 1fr 110px 54px;
  align-items:center;
  gap:12px;
  padding:16px 0;
  border-bottom:1px solid var(--line);
  width:min(var(--container), calc(100% - 64px));
  margin:0 auto;
}
@media (max-width:720px){
  .search__bar{
    width:calc(100% - 32px);
    grid-template-columns: 1fr 92px 46px;
  }

}
.search__input{
  font-size:clamp(24px, 3vw, 36px); /* SMALLER */
  border:0;
  outline:0;
  padding:8px 0;
  color:#111;
}
@media (max-width:720px){

  .search__input {
    font-size: clamp(20px, 3vw, 20px);
    border: 0;
    outline: 0;
    padding: 8px 0;
    color: #111;
}
}
.search__input::placeholder{color:#b5b5b5}
.search__go{
  height:42px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-weight:700;
  font-size:14px;
}
.search__close{
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  background:#fff;
  font-size:20px;
}
.search__body{
  width:min(var(--container), calc(100% - 64px));
  margin:0 auto;
  padding:36px 0;
  
}
@media (max-width:720px){
  .search__body{width:calc(100% - 32px)}
}
.search__hint{
  color:var(--muted);
  font-size:15px;
  line-height:1.7;
  max-width:75ch;
}
.search__hint code{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background:#f3f3f3;
  padding:2px 8px;
  border-radius:8px;
  border:1px solid var(--line);
}

/* ─────────────────────────────────────────
   Static pages + footer
───────────────────────────────────────── */

.static{padding:34px 0 66px}

.footer{
  border-top:1px solid var(--line);
  padding:22px 0;
}
.footer__inner{
  width:min(var(--container), calc(100% - 64px));
  margin:0 auto;
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
@media (max-width:720px){
  .footer__inner{width:calc(100% - 32px)}
}
.footer__links{display:flex; gap:16px; flex-wrap:wrap}
.footer__links a{color:#222; font-size:14px}
.footer__links a:hover{text-decoration:underline}
.footer__copy{color:var(--muted); font-size:14px}
