/*
Theme Name: Zdravko Tech
Theme URI: https://www.zdravko.tech
Description: Lightweight presentation theme for Zdravko Angelov Technology: articles, technology experiments and certifications. Content is published by the Python seeder.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: zdravko-tech
*/

:root {
  --plane: #f8f7f4;
  --surface: #fdfdfc;
  --ink: #111214;
  --ink-2: #4f4e4a;
  --muted: #86847e;
  --line: #e3e1da;
  --accent: #c9a031;
  --accent-ink: #7f5f0d;
  --accent-wash: #f6ecd0;
  --header: #15171c;
  --radius: 12px;
  --max: 1120px;
  --prose: 760px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.65 var(--font);
  color: var(--ink);
  background: var(--plane);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* full-bleed sections use 100vw, which includes the scrollbar */
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--ink); }

/* ------------------------------------------------------------ header */
.site-header { background: var(--header); color: #fff; position: sticky; top: 0; z-index: 10; }
.site-header .inner {
  max-width: var(--max); margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.brand:hover { color: #fff; }
.brand-mark { width: 32px; height: 32px; }
.brand small { font-weight: 400; font-size: 13px; opacity: .7; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 14px; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a { color: #d9d6cc; text-decoration: none; font-size: 14.5px; padding: 6px 12px; border-radius: 6px; display: block; }
.site-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.site-nav .current_page_item > a, .site-nav .current-menu-item > a, .site-nav .current_page_parent > a { color: var(--accent); background: rgba(201,160,49,.12); }

/* ------------------------------------------------------------ layout */
.site-main { max-width: var(--max); margin: 0 auto; padding: 40px 16px 64px; }
.page-header { max-width: var(--prose); margin: 0 auto 28px; }
.page-header h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em; }
.page-header .lede { font-size: 19px; color: var(--ink-2); margin: 0; }
.page-header .meta { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }
.entry-content { max-width: var(--prose); margin: 0 auto; }
.entry-content h2 { font-size: 26px; line-height: 1.25; margin: 44px 0 12px; letter-spacing: -.01em; }
.entry-content h3 { font-size: 20px; margin: 32px 0 8px; }
.entry-content p, .entry-content li { color: #1f1f1d; }
.entry-content li { margin: 6px 0; }
.entry-content blockquote { margin: 24px 0; padding: 4px 20px; border-left: 4px solid var(--accent); color: var(--ink-2); }
.zt-lead { font-size: 19px; }
.zt-center { text-align: center; }
.zt-closing { font-size: 19px; font-weight: 700; margin-top: 40px; }
.zt-note, .zt-sources { font-size: 14.5px; color: var(--ink-2); }
.zt-sources { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 12px; }

/* ------------------------------------------------------------ figures */
.zt-figure { margin: 32px 0; }
.zt-figure img { display: block; margin: 0 auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.zt-figure figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; text-align: center; }
.zt-split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; margin: 28px 0; }
.zt-split .zt-figure { margin: 0; }
.zt-split h2 { margin-top: 0; }

/* ------------------------------------------------------------ components */
.zt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 24px 0; }
.zt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 20px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; overflow: hidden; transition: border-color .15s, transform .15s; }
.zt-card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.zt-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; border-bottom: 1px solid var(--line); margin-bottom: 10px; background: #fff; }
.zt-card .kicker, .zt-card h3, .zt-card p { padding: 0 20px; }
.zt-card .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); font-weight: 700; }
.zt-card h3 { margin: 0; font-size: 19px; line-height: 1.3; }
.zt-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.zt-more { text-align: right; font-weight: 600; }

.zt-btn { display: inline-block; background: var(--accent); color: var(--header); font-weight: 700; padding: 11px 20px; border-radius: 8px; text-decoration: none; margin: 0 10px 10px 0; }
.zt-btn:hover { background: #e0b84a; color: var(--header); }
.zt-btn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.zt-btn.ghost:hover { background: rgba(127,127,127,.12); color: inherit; }

.zt-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin: 20px 0 8px; }
.zt-badge { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px; text-align: center; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; line-height: 1.35; transition: border-color .15s, transform .15s; }
a.zt-badge:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.zt-badge img { width: 112px; height: 112px; object-fit: contain; }

.zt-profile { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; margin-bottom: 16px; }
.zt-profile h2 { margin-top: 0; }
.zt-portrait { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.zt-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.zt-tags li { margin: 0; background: var(--accent-wash); color: var(--accent-ink); border-radius: 999px; padding: 3px 12px; font-size: 14px; font-weight: 600; }

.zt-pagination { max-width: var(--max); margin: 32px auto 0; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; }
.zt-post-nav { max-width: var(--prose); margin: 56px auto 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; font-size: 15px; }
.zt-post-nav span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.zt-post-nav .next { text-align: right; margin-left: auto; }

/* ------------------------------------------------------------ front page */
.home .site-main { padding-top: 0; }
.zt-hero {
  width: 100vw; margin-left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(10,12,16,.92) 0%, rgba(10,12,16,.7) 55%, rgba(10,12,16,.25) 100%), var(--hero-image) center / cover no-repeat, var(--header);
  color: #fff; padding: 110px 16px 100px; margin-bottom: 0;
}
.zt-hero .inner { max-width: var(--max); margin: 0 auto; }
.zt-hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; margin: 0 0 18px; letter-spacing: -.025em; color: #fff; max-width: 640px; }
.zt-hero p { font-size: 19px; color: #d9d6cc; margin: 0 0 28px; max-width: 560px; }
.zt-hero .zt-eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; margin-bottom: 14px; }
.zt-hero .zt-btn.ghost { color: #fff; }
.zt-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: -48px 0 24px; position: relative; }
.zt-pillar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: 0 12px 30px rgba(17,18,20,.08); }
.zt-pillar img { width: 56px; height: 56px; object-fit: contain; }
.zt-pillar h3 { margin: 10px 0 6px; font-size: 19px; }
.zt-pillar p { margin: 0; color: var(--ink-2); font-size: 15px; }
.home .entry-content { max-width: var(--max); }
.home .entry-content > h2 { margin-top: 56px; }

/* ------------------------------------------------------------ footer */
.site-footer { background: var(--header); color: #a9a69d; font-size: 14px; }
.site-footer .inner { max-width: var(--max); margin: 0 auto; padding: 32px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.site-footer a { color: #e3dfd2; }
.site-footer .links a { margin-left: 16px; }
.site-footer .links a:first-child { margin-left: 0; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  .brand small { display: none; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; margin-left: 0; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .zt-split, .zt-profile { grid-template-columns: 1fr; }
  .zt-profile .zt-portrait { max-width: 240px; }
  .zt-pillars { grid-template-columns: 1fr; margin-top: 24px; }
  .zt-hero { padding: 72px 16px 64px; }
}
