/* ============================================================
   Artem Kaplii — personal site  |  design preview
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --surface: #ffffff;
  --text: #1a1d23;
  --text-soft: #5a6270;
  --border: #e6e8ec;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --shadow: 0 6px 24px rgba(20, 24, 40, .06);
  --radius: 16px;
  --maxw: 1080px;
}

html[data-theme="dark"] {
  --bg: #0e1014;
  --bg-alt: #14171d;
  --surface: #181c23;
  --text: #eef1f6;
  --text-soft: #9aa3b2;
  --border: #262b34;
  --accent: #818cf8;
  --accent-soft: #1d2030;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 680px; }

a { color: inherit; text-decoration: none; }

/* ---------- Accessibility utilities ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px;
  font-weight: 600; transition: top .2s;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
      transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 1.3rem; letter-spacing: -.5px; }
.brand .dot { color: var(--accent); }

.nav { display: flex; gap: 28px; }
.nav a { color: var(--text-soft); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-btn {
  border: 0; background: transparent; color: var(--text-soft);
  font: 600 .8rem 'Inter'; padding: 6px 12px; cursor: pointer; transition: .2s;
}
.lang-btn.is-active { background: var(--accent); color: #fff; }

.theme-toggle {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; transition: .2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }

.menu-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; }
.menu-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 64px; }
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .5px; margin-bottom: 8px; }
.hero-name { font-size: 3.4rem; font-weight: 800; letter-spacing: -1.5px; line-height: 1.05; }
.hero-headline { font-size: 1.5rem; font-weight: 600; color: var(--text-soft); margin: 6px 0 20px; }
.hero-bio { max-width: 46ch; color: var(--text-soft); font-size: 1.05rem; }
.hero-cta { display: flex; gap: 14px; margin: 28px 0 22px; flex-wrap: wrap; }
.hero-socials { display: flex; gap: 20px; }
.hero-socials a { color: var(--text-soft); font-weight: 500; font-size: .9rem; border-bottom: 1px solid transparent; transition: .2s; }
.hero-socials a:hover { color: var(--accent); border-color: var(--accent); }

.hero-photo { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.photo-frame {
  width: 240px; height: 240px; border-radius: 28px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #ec4899));
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.photo-initials { font-size: 4rem; font-weight: 800; color: #fff; opacity: .9; }
.hero-stats { display: flex; gap: 16px; }
.stat { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 18px; min-width: 92px; }
.stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.stat span { font-size: .72rem; color: var(--text-soft); line-height: 1.3; display: block; }

/* ---------- Experience timeline (collapsible) ---------- */
.timeline-hint { color: var(--text-soft); font-size: .85rem; margin-bottom: 20px; }
.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }

.exp-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.exp-card::before { content: ""; position: absolute; left: -30px; top: 24px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--border); transition: border-color .2s, background .2s; }
.exp-card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.exp-card[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow); }
.exp-card[open]::before { border-color: var(--accent); background: var(--accent); }

.exp-head { list-style: none; display: flex; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; }
.exp-head::-webkit-details-marker { display: none; }
.exp-headline { flex: 1; min-width: 0; }
.exp-headline h3 { font-size: 1.15rem; font-weight: 700; }
.exp-company { color: var(--accent); font-weight: 600; font-size: .9rem; margin-top: 2px; }
.exp-meta { text-align: right; color: var(--text-soft); font-size: .82rem; display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.exp-dates { font-weight: 600; color: var(--text); }

.exp-chevron { flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 22px; }
.exp-chevron::before { content: ""; width: 8px; height: 8px; border: solid var(--text-soft); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); transition: transform .25s; }
.exp-card[open] .exp-chevron::before { transform: rotate(-135deg) translate(-2px, -2px); border-color: var(--accent); }

.exp-body { padding: 0 22px 20px; }
.exp-body .tags { margin-bottom: 14px; }
.exp-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.exp-list li { position: relative; padding-left: 20px; color: var(--text-soft); font-size: .94rem; }
.exp-list li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.exp-achieve { font-size: .9rem; color: var(--text-soft); background: var(--accent-soft); border-radius: 10px; padding: 12px 16px; margin-top: 16px; }
.exp-achieve strong { display: block; color: var(--accent); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: .95rem; cursor: pointer; transition: .2s; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 1.9rem; font-weight: 700; letter-spacing: -.5px; margin-bottom: 36px; display: flex; align-items: baseline; gap: 12px; }
.section-title .num { color: var(--accent); font-size: 1.1rem; font-weight: 700; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.about-grid p { color: var(--text-soft); font-size: 1.05rem; }

/* ---------- Tags (shared: skills, experience) ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.skill-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; transition: .25s; }
.skill-group:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow); }
.skill-group h3 { font-size: 1.1rem; margin-bottom: 4px; }
.skill-sub { font-size: .88rem; color: var(--text-soft); margin-bottom: 18px; min-height: 2.4em; }
.skill-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.skill-list li { font-size: .95rem; font-weight: 500; display: flex; flex-direction: column; gap: 6px; }
.bar { display: block; height: 6px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* ---------- Blog ---------- */
.blog-lead { color: var(--text-soft); font-size: 1.05rem; margin-bottom: 32px; max-width: 60ch; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; transition: .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.post-meta { display: flex; align-items: center; gap: 12px; font-size: .8rem; }
.post-date { color: var(--text-soft); }
.post-tag { font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }
.post-card h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.35; }
.post-card p { color: var(--text-soft); font-size: .95rem; flex: 1; }
.post-link { color: var(--accent); font-weight: 600; font-size: .9rem; margin-top: auto; }
.post-card:hover .post-link { text-decoration: underline; }
.blog-note { font-size: .85rem; color: var(--text-soft); font-style: italic; margin-top: 28px; }
.blog-cta { margin-top: 32px; display: flex; justify-content: center; }

/* ---------- Blog toolbar (search + sort) ---------- */
.blog-toolbar { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.blog-search { position: relative; flex: 1; min-width: 240px; }
.blog-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-soft); pointer-events: none; }
.blog-search input { width: 100%; padding: 12px 14px 12px 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.blog-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.blog-sort { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--text-soft); }
.blog-sort select { padding: 11px 36px 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa3b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.blog-sort select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Blog timeline ---------- */
.blog-timeline { position: relative; padding-left: 30px; }
.blog-timeline::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.post-row { position: relative; padding: 22px 0; }
.post-row + .post-row { border-top: 1px solid var(--border); }
.post-row::before { content: ""; position: absolute; left: -30px; top: 28px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--border); transition: border-color .2s, background .2s; }
.post-row:hover::before { border-color: var(--accent); background: var(--accent); }
.post-row .post-meta { margin-bottom: 8px; }
.post-row h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.post-row h3 a { transition: color .2s; }
.post-row:hover h3 a { color: var(--accent); }
.post-row p { color: var(--text-soft); font-size: .98rem; margin-bottom: 10px; max-width: 70ch; }
.blog-empty { text-align: center; color: var(--text-soft); font-size: 1rem; padding: 32px 0; }

/* ---------- Page hero (blog / article) ---------- */
.page-hero { padding: 56px 0 24px; }
.page-hero h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -1px; margin: 14px 0 10px; }
.page-hero p { color: var(--text-soft); font-size: 1.08rem; max-width: 60ch; }
.back-link { display: inline-block; color: var(--text-soft); font-weight: 600; font-size: .9rem; transition: color .2s; }
.back-link:hover { color: var(--accent); }
.nav a.is-current { color: var(--accent); }

/* ---------- Article (single post) ---------- */
.container-reading { max-width: 720px; }
.article { padding: 48px 0 72px; }
.article-meta { margin: 20px 0 14px; }
.article-title { font-size: 2.4rem; font-weight: 800; letter-spacing: -1px; line-height: 1.12; }
.article-sub { font-size: 1.2rem; color: var(--text-soft); margin-top: 14px; line-height: 1.5; }
.article-byline { display: flex; align-items: center; gap: 12px; margin: 24px 0; font-size: .92rem; color: var(--text-soft); }
.byline-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #ec4899)); }
.article-byline strong { color: var(--text); }
.article-cover { height: 260px; border-radius: var(--radius); margin: 8px 0 36px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-soft), var(--bg-alt)); }
.article-cover span { font-size: 3rem; font-weight: 800; color: var(--accent); opacity: .55; }

.article-body { font-size: 1.08rem; line-height: 1.75; color: var(--text); }
.article-body p { margin-bottom: 22px; color: var(--text-soft); }
.article-body h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.4px; margin: 38px 0 14px; }
.article-body ul { margin: 0 0 22px 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.article-body li { position: relative; padding-left: 22px; color: var(--text-soft); }
.article-body li::before { content: ""; position: absolute; left: 3px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.article-body blockquote { margin: 32px 0; padding: 18px 24px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; font-size: 1.15rem; font-weight: 500; color: var(--text); font-style: italic; }
.article-foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }

/* ---------- Languages ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.lang-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; transition: .25s; }
.lang-card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow); }
.lang-top { display: flex; align-items: center; justify-content: space-between; }
.lang-name { font-weight: 700; font-size: 1.05rem; }
.lang-level { font-weight: 700; font-size: .8rem; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.lang-cefr { font-size: .82rem; color: var(--text-soft); }
.lang-dots { display: flex; gap: 5px; }
.lang-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.lang-dots i.on { background: var(--accent); }

/* ---------- Contact ---------- */
.contact-lead { color: var(--text-soft); margin-bottom: 28px; font-size: 1.05rem; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font: inherit; color: var(--text); resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-note { font-size: .82rem; color: var(--text-soft); }
.contact-form .btn { align-self: flex-start; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; color: var(--text-soft); font-size: .9rem; }
.footer-mail a:hover { color: var(--accent); }

/* ---------- Login page ---------- */
.login-topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; max-width: var(--maxw); margin: 0 auto; }
.login-wrap { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 40px 36px; box-shadow: var(--shadow); text-align: center; }
.login-lock { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.login-card h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.5px; }
.login-lead { color: var(--text-soft); font-size: .95rem; margin: 8px 0 24px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.login-card input { width: 100%; padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; }
.login-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-error { color: #dc2626; font-size: .88rem; font-weight: 500; margin: -4px 0 0; }
html[data-theme="dark"] .login-error { color: #f87171; }
.login-submit { width: 100%; text-align: center; }
.login-backlink { display: inline-block; margin-top: 18px; }

.login-demo { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 18px; text-align: left; }
.login-demo summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--text-soft); }
.login-demo summary:hover { color: var(--accent); }
.login-demo-note { font-size: .85rem; color: var(--text-soft); margin: 12px 0; }
.login-creds { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .85rem; color: var(--text-soft); margin-bottom: 12px; }
.login-creds code { background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 6px; font-size: .82rem; }
.gate-status { font-size: .85rem; font-weight: 600; color: var(--text); margin: 8px 0 12px; }
.login-demo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.login-demo-actions .btn { padding: 8px 14px; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); flex-direction: column; gap: 0; padding: 8px 0; border-bottom: 1px solid var(--border); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 24px; }
  .menu-toggle { display: flex; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-bio { margin: 0 auto; }
  .hero-cta, .hero-socials { justify-content: center; }
  .hero-photo { order: -1; }
  .hero-name { font-size: 2.6rem; }
  .about-grid, .skills-grid { grid-template-columns: 1fr; }
  .exp-head { flex-wrap: wrap; align-items: flex-start; }
  .exp-headline { flex: 1 1 100%; }
  .exp-meta { text-align: left; flex-direction: row; gap: 10px; flex-wrap: wrap; }
  .exp-chevron { position: absolute; top: 18px; right: 18px; }
  .page-hero h1 { font-size: 2rem; }
  .article-title { font-size: 1.85rem; }
  .article-sub { font-size: 1.05rem; }
  .article-cover { height: 180px; }
}

/* ============================================================
   Admin panel
   ============================================================ */
.admin-body { background: var(--bg-alt); }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--surface); border-right: 1px solid var(--border); padding: 24px 18px; display: flex; flex-direction: column; gap: 6px; }
.admin-side .brand { font-size: 1.3rem; font-weight: 800; padding: 0 10px 16px; }
.admin-side a { padding: 10px 12px; border-radius: 10px; color: var(--text-soft); font-weight: 600; font-size: .92rem; transition: .15s; }
.admin-side a:hover { background: var(--bg-alt); color: var(--text); }
.admin-side a.active { background: var(--accent-soft); color: var(--accent); }
.admin-side .side-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; }
.admin-main { padding: 32px 36px; max-width: 920px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.5px; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.admin-flash { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-weight: 500; }
html[data-theme="dark"] .admin-flash { background: #06281f; color: #6ee7b7; border-color: #0f5132; }

.admin-form label { display: block; font-weight: 600; font-size: .88rem; margin: 14px 0 5px; }
.admin-form input[type=text], .admin-form input[type=email], .admin-form input[type=password],
.admin-form input[type=number], .admin-form input[type=date], .admin-form select, .admin-form textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; }
.admin-form textarea { resize: vertical; min-height: 90px; }
.admin-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form .hint { font-size: .82rem; color: var(--text-soft); margin-top: 4px; }
.admin-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:hover { filter: brightness(1.08); }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: .92rem; vertical-align: top; }
.admin-table th { color: var(--text-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; }
.admin-table .row-actions { display: flex; gap: 8px; white-space: nowrap; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 16px; }
.dash-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.dash-tile strong { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); }
.dash-tile span { color: var(--text-soft); font-size: .9rem; }
.lang-tab { display: inline-flex; gap: 4px; background: var(--bg-alt); border-radius: 10px; padding: 4px; margin: 6px 0 2px; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill-off { background: var(--border); color: var(--text-soft); }
.code-val { font-family: ui-monospace, Menlo, monospace; background: var(--accent-soft); color: var(--accent); padding: 3px 8px; border-radius: 6px; }

@media (max-width: 760px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-side .side-foot { margin: 0; border: 0; padding: 0; }
  .admin-main { padding: 24px 18px; }
  .admin-form .row { grid-template-columns: 1fr; }
}

/* ============================================================
   Post images (cover + in-body)
   ============================================================ */
.post-card .post-cover { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }

.post-row { display: flex; gap: 20px; align-items: flex-start; }
.post-row-main { flex: 1; min-width: 0; }
.post-row-thumb { flex: 0 0 170px; }
.post-row-thumb img { width: 170px; height: 115px; object-fit: cover; border-radius: 12px; display: block; }

.article-cover-img { background: none; padding: 0; height: auto; display: block; }
.article-cover-img img { width: 100%; max-height: 440px; object-fit: cover; border-radius: var(--radius); display: block; }

.article-body figure { margin: 26px 0; }
.article-body figure img { width: 100%; border-radius: 12px; display: block; }
.article-body figcaption { font-size: .85rem; color: var(--text-soft); margin-top: 8px; text-align: center; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; }

@media (max-width: 680px) {
  .post-row { flex-direction: column; }
  .post-row-thumb, .post-row-thumb img { width: 100%; flex: none; height: 190px; }
}
