/* ============================================================
   Tim Spalding theme — front-end styles
   Part 1: the original template stylesheet (lightly adapted).
   Part 2 (bottom): WordPress additions — content blocks, forms,
   professional access, widgets, admin bar.
   ============================================================ */

:root {
  --primary: #50c7e8;        /* cyan accent — menu highlights, avatar ring, on dark surfaces */
  --link: #1c2541;           /* deep navy — links on white backgrounds (high contrast) */
  --secondary: #00aeef;      /* "Featured" tag blue */
  --text: #2a2a2a;
  --text-soft: #6a6a6a;
  --bg: #ffffff;
  --bg-soft: #f7f6f4;
  --border: #e8e6e2;
  --dark: #65696a;           /* the aside menu background (warm gray) */
  --strip: 78px;
  --font-body: 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-heading: 'Roboto Condensed', 'Helvetica Neue', Arial, sans-serif;
  --font-logo: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Default link colour is navy (high contrast on white).
   Cyan (--primary) is reserved for the menu, hero overlay, and hover states. */
a { color: var(--link); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }

/* ====== Layout ====== */
.layout { display: flex; min-height: 100vh; }
.content-col { width: 66.6667%; position: relative; min-width: 0; }
.sidebar-col {
  width: 33.3333%;
  background: var(--bg-soft);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* On content pages: sidebar sticks, content scrolls */
body.content-page .layout { align-items: flex-start; }
body.content-page .content-col { padding-left: var(--strip); }
body.content-page .sidebar-col {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* On the home page: hero stays put, sidebar scrolls past it.
   This matches the original "Overlay" front page template. */
body.home-page .layout { align-items: flex-start; }
body.home-page .content-col {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
body.home-page .sidebar-col { height: auto; }

/* ====== Hero (index page) ====== */
.hero { position: relative; height: 100vh; overflow: hidden; background: #222; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.02); transition: transform 6s ease;
}
.hero:hover .hero-bg { transform: scale(1.06); }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.25) 50%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 60px 70px 60px calc(70px + var(--strip)); color: #fff; z-index: 2;
}
.hero-caption .kicker {
  display: inline-block; font-family: var(--font-heading);
  font-size: 12px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--primary); margin-bottom: 14px; font-weight: 700;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.hero-caption h1 {
  font-family: var(--font-heading); font-size: 56px; font-weight: 700;
  line-height: 1.05; max-width: 720px; margin-bottom: 18px;
}
.hero-caption h1::before {
  content: ''; display: block; width: 56px; height: 3px;
  background: var(--primary); margin-bottom: 22px;
}
.hero-caption h1 a { color: #fff; }
.hero-caption h1 a:hover { color: var(--primary); }
.hero-caption p { font-size: 17px; max-width: 580px; margin-bottom: 26px; color: rgba(255,255,255,.85); }

/* ====== Buttons ====== */
.btn {
  display: inline-block; padding: 13px 30px;
  border: 2px solid var(--text); color: var(--text);
  font-family: var(--font-heading); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 1.5px;
  transition: all .2s ease; cursor: pointer; background: transparent;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn--solid { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--solid:hover { background: var(--text); border-color: var(--text); }
.btn--small { padding: 8px 18px; font-size: 11px; }
.btn--light { border-color: #fff; color: #fff; }
.btn--light:hover { border-color: var(--primary); color: var(--primary); background: rgba(255,255,255,.08); }

/* ====== Page header (non-index pages) ====== */
.page-header {
  padding: 70px 60px 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
/* Small brand logo in the page header (top-right) */
.page-logo {
  position: absolute;
  top: 32px;
  right: 60px;
  display: block;
  max-width: 140px;
  z-index: 2;
}
.page-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.12));
  transition: transform .3s ease;
}
.page-logo:hover img { transform: scale(1.04); }
.page-kicker {
  font-family: var(--font-heading); font-size: 12px; text-transform: uppercase;
  letter-spacing: 2px; color: var(--link); font-weight: 700; margin-bottom: 10px;
}
.page-title {
  font-family: var(--font-heading); font-size: 44px; font-weight: 700;
  line-height: 1.1; margin-bottom: 12px;
}
.page-title::before {
  content: ''; display: block; width: 48px; height: 3px;
  background: var(--primary); margin-bottom: 20px;
}
.page-subtitle { font-size: 17px; color: var(--text-soft); max-width: 600px; }

/* ====== Content area (scrollable) ====== */
.content-area { padding: 50px 60px 80px; }

/* ====== Sidebar ====== */
.sidebar-top {
  padding: 22px 28px; background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 18px;
}
.sidebar-top .row { display: flex; align-items: center; gap: 16px; }

/* Brand logo at the top of the sidebar — right-aligned, max width */
.sidebar-logo {
  display: block;
  margin-left: auto;          /* right-align */
  max-width: 100%;             /* never overflow the sidebar */
  width: auto;
  height: auto;
}
.sidebar-logo img {
  display: block;
  margin-left: auto;          /* right-align the image itself */
  max-width: 100%;
  height: auto;
}

/* Brand logo overlaid on the hero (top-right of the middle zone) */
.hero-logo {
  position: absolute;
  top: 36px;
  right: 36px;
  z-index: 3;
  display: block;
  max-width: 30%;              /* never wider than 30% of the hero */
  transition: transform .4s ease;
}
.hero-logo:hover { transform: scale(1.04); }
.hero-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.45));   /* lift it off the photo */
}
.login-link {
  font-family: var(--font-heading); font-size: 13px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text); display: inline-flex;
  align-items: center; gap: 8px; flex-shrink: 0;
}
.login-link:hover { color: var(--primary); }
.search-form { display: flex; flex: 1; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.search-form input {
  flex: 1; border: none; background: transparent;
  font-family: var(--font-body); font-size: 14px; padding: 6px 0;
  outline: none; color: var(--text);
}
.search-form button { background: transparent; border: none; color: var(--text-soft); cursor: pointer; padding: 0 4px; }
.search-form button:hover { color: var(--primary); }
.social-menu { list-style: none; display: flex; gap: 14px; flex-wrap: wrap; }
.social-menu a {
  color: var(--text); font-size: 16px; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%;
}
.social-menu a:hover { color: var(--primary); border-color: var(--primary); }
.sidebar-body { padding: 28px; overflow-y: auto; flex: 1; }
.widget { margin-bottom: 44px; }
.widget-title {
  font-family: var(--font-heading); font-size: 13px; text-transform: uppercase;
  letter-spacing: 2px; color: var(--text); border-bottom: 2px solid var(--primary);
  padding-bottom: 10px; margin-bottom: 22px; display: inline-block;
}
.post-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.post-item:first-child { padding-top: 0; }
.post-thumb { flex-shrink: 0; width: 90px; height: 64px; overflow: hidden; background: #ddd; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-body { min-width: 0; }
.post-body h4 { font-family: var(--font-heading); font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 5px; }
.post-body h4 a { color: var(--text); }
.post-body h4 a:hover { color: var(--primary); }
.post-meta { font-family: var(--font-heading); font-size: 12px; color: var(--text-soft); letter-spacing: .5px; }
.post-meta a { color: var(--text-soft); }
.post-meta a:hover { color: var(--primary); }
.featured-tag {
  display: inline-block; background: var(--secondary); color: #fff;
  font-family: var(--font-heading); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; margin-top: 5px;
}
.text-widget p { font-size: 14px; color: var(--text-soft); margin-bottom: 12px; }

/* ====== Aside menu (Writer-style strip + slide-out panel) ====== */
.aside-menu {
  position: fixed; top: 0; left: 0;
  width: 380px; max-width: 90vw; height: 100vh;
  background: var(--dark); color: #fff; z-index: 1000;
  transform: translateX(calc(-1 * (100% - var(--strip))));
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  overflow: visible; box-shadow: 4px 0 40px rgba(0,0,0,.3);
}
.aside-menu.open { transform: translateX(0); }
.aside-strip {
  position: absolute; top: 0; right: 0;
  width: var(--strip); height: 100%; background: var(--dark);
  border-left: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 0 22px; z-index: 3;
}
.strip-avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--primary); display: block;
}
.strip-trigger {
  margin-top: auto; background: transparent; border: none; color: #fff;
  cursor: pointer; font-family: var(--font-heading); font-weight: 700;
  font-size: 12px; text-transform: uppercase; letter-spacing: 3px;
  writing-mode: vertical-rl; transform: rotate(180deg);
  padding: 18px 0; display: inline-flex; align-items: center; gap: 12px;
  transition: color .2s;
}
.strip-trigger:hover { color: var(--primary); }
.strip-trigger .bars { width: 18px; height: 12px; position: relative; display: inline-block; transform: rotate(180deg); }
.strip-trigger .bars::before, .strip-trigger .bars::after, .strip-trigger .bars span {
  content: ''; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor;
}
.strip-trigger .bars::before { top: 0; }
.strip-trigger .bars span    { top: 5px; }
.strip-trigger .bars::after  { top: 10px; }
.strip-helper { margin-top: 14px; color: rgba(255,255,255,.5); font-size: 16px; transition: color .2s; }
.strip-helper:hover { color: var(--primary); }
.aside-panel {
  width: calc(100% - var(--strip)); height: 100%; overflow-y: auto;
  display: flex; flex-direction: column;
  scrollbar-width: thin;                          /* Firefox */
  scrollbar-color: var(--primary) transparent;    /* Firefox: thumb, track */
}
/* WebKit (Chrome / Safari / Edge) */
.aside-panel::-webkit-scrollbar { width: 8px; }
.aside-panel::-webkit-scrollbar-track { background: transparent; }
.aside-panel::-webkit-scrollbar-thumb {
  background: var(--primary);            /* cyan */
  border-radius: 4px;
  border: 2px solid var(--dark);         /* blends against the gray menu bg */
}
.aside-panel::-webkit-scrollbar-thumb:hover { background: #3a8eaa; }
.aside-close {
  position: absolute; top: 22px; right: calc(var(--strip) + 14px);
  background: transparent; border: none; color: var(--primary);
  font-size: 24px; cursor: pointer; width: 36px; height: 36px;
  z-index: 4; opacity: 0; pointer-events: none;
  transition: opacity .25s ease .1s;
}
.aside-menu.open .aside-close { opacity: 1; pointer-events: auto; }
.aside-close:hover { color: #fff; }
.aside-header { padding: 50px 36px 32px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.07); }
.avatar-wrap { display: inline-block; padding: 4px; border: 2px solid var(--primary); border-radius: 50%; }
.avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; display: block; }
.site-logo { font-family: var(--font-logo); font-weight: 900; font-size: 30px; line-height: 1.15; letter-spacing: -1px; margin-top: 18px; color: #fff; }
.site-tagline { font-family: var(--font-heading); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,.5); margin-top: 4px; }
.main-nav { padding: 16px 0; flex: 1; }
.main-nav ul { list-style: none; }
.main-nav > ul > li { border-bottom: 1px solid rgba(255,255,255,.06); }
.main-nav li { position: relative; }
.main-nav a {
  display: block; padding: 16px 36px; color: #fff;
  font-family: var(--font-heading); font-size: 17px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 1.5px;
  transition: color .2s, background .2s;
}
.main-nav a:hover, .main-nav li.active > a { color: var(--primary); background: rgba(80,199,232,.10); }
.main-nav .has-children > a { padding-right: 56px; }
.expand {
  position: absolute; top: 0; right: 30px;
  background: transparent; border: none; color: rgba(255,255,255,.6);
  padding: 16px 6px; cursor: pointer; font-size: 12px;
  transition: transform .25s, color .2s;
}
.expand:hover { color: var(--primary); }
.expand.open { transform: rotate(180deg); color: var(--primary); }
.submenu { max-height: 0; overflow: hidden; transition: max-height .35s ease; background: rgba(0,0,0,.25); }
.submenu.open { max-height: 4000px; }
.submenu a { font-size: 13px; padding: 11px 36px 11px 56px; text-transform: none; letter-spacing: .5px; color: rgba(255,255,255,.75); }
.submenu a:hover { color: var(--primary); background: transparent; }
.submenu .submenu a { padding-left: 76px; }
.submenu li.active > a { color: var(--primary); }
.aside-footer { padding: 22px 36px; border-top: 1px solid rgba(255,255,255,.07); font-family: var(--font-heading); font-size: 12px; color: rgba(255,255,255,.4); letter-spacing: .5px; }
.aside-footer a { color: var(--primary); }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 999; opacity: 0; pointer-events: none; transition: opacity .35s; }
.backdrop.open { opacity: 1; pointer-events: auto; }

/* ====== Login popup modal ====== */
.login-popup {
  position: fixed; inset: 0;
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.login-popup.open { opacity: 1; visibility: visible; }
.login-popup__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(2px);
}
.login-popup__card {
  position: relative;
  background: #fff;
  width: 100%; max-width: 380px;
  padding: 44px 38px 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  transform: translateY(-16px) scale(.98);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.login-popup.open .login-popup__card { transform: translateY(0) scale(1); }
.login-popup__close {
  position: absolute; top: 14px; right: 14px;
  background: transparent; border: none;
  color: var(--text-soft); font-size: 26px;
  width: 36px; height: 36px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .2s;
}
.login-popup__close:hover { color: var(--primary); }
.login-popup__title {
  font-family: var(--font-heading); font-size: 26px; font-weight: 700;
  margin-bottom: 6px;
}
.login-popup__title::before {
  content: ''; display: block; width: 42px; height: 3px;
  background: var(--primary); margin-bottom: 16px;
}
.login-popup__subtitle {
  font-size: 14px; color: var(--text-soft); margin-bottom: 26px;
}
.login-form .form-row { margin-bottom: 16px; }
.login-form label {
  display: block; font-family: var(--font-heading); font-size: 12px;
  text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
}
.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border);
  font-family: var(--font-body); font-size: 15px;
  color: var(--text); background: #fff;
  outline: none; transition: border-color .2s;
}
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus { border-color: var(--primary); }
.login-remember {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-size: 13px;
  color: var(--text-soft); text-transform: none; letter-spacing: 0;
}
.login-remember input { margin: 0; }
.login-remember label { display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-soft); cursor: pointer; }
.login-form .btn { width: 100%; }
.login-popup__footer {
  margin-top: 24px; padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.login-popup__footer a {
  font-family: var(--font-heading); font-size: 13px;
  text-transform: uppercase; letter-spacing: 1px;
}
.login-popup__footer .btn--small { width: 100%; }

/* ====== Blog post grid ====== */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.post-card { background: #fff; }
.post-card__thumb { position: relative; display: block; overflow: hidden; aspect-ratio: 16/10; background: #ddd; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card__thumb:hover img { transform: scale(1.05); }
.post-card__cat {
  position: absolute; top: 14px; left: 14px;
  background: var(--primary); color: #fff; font-family: var(--font-heading);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 10px;
}
.post-card__body { padding: 20px 0 0; }
.post-card__meta { font-family: var(--font-heading); font-size: 12px; color: var(--text-soft); letter-spacing: .5px; margin-bottom: 8px; }
.post-card__title { font-family: var(--font-heading); font-size: 22px; font-weight: 700; line-height: 1.25; margin-bottom: 10px; }
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--primary); }
.post-card__excerpt { font-size: 15px; color: var(--text-soft); margin-bottom: 14px; }
.post-card__more { font-family: var(--font-heading); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* ====== Pagination ====== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border); }
.page-num {
  font-family: var(--font-heading); font-size: 14px; font-weight: 700;
  padding: 8px 14px; border: 1px solid var(--border); color: var(--text);
  transition: all .2s;
}
.page-num:hover, .page-num.active { border-color: var(--primary); color: var(--primary); }
.page-num.prev, .page-num.next { text-transform: uppercase; letter-spacing: 1px; font-size: 12px; }

/* ====== Single article ====== */
.article { max-width: 760px; }
.article-header { margin-bottom: 30px; position: relative; }
.article-kicker { font-family: var(--font-heading); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--link); font-weight: 700; margin-bottom: 12px; }
.article-title { font-family: var(--font-heading); font-size: 42px; font-weight: 700; line-height: 1.15; margin-bottom: 18px; }
.article-title::before { content: ''; display: block; width: 48px; height: 3px; background: var(--primary); margin-bottom: 18px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--font-heading); font-size: 13px; color: var(--text-soft); }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta a { color: var(--text-soft); }
.article-meta a:hover { color: var(--primary); }
.article-featured { margin: 0 0 36px; }
.article-featured img { width: 100%; height: auto; }
.article-body { font-size: 17px; line-height: 1.75; }
.article-body p { margin-bottom: 22px; }
.article-body .lead { font-size: 20px; color: var(--text); font-style: italic; border-left: 3px solid var(--primary); padding-left: 20px; margin-bottom: 30px; }
.article-body h2 { font-family: var(--font-heading); font-size: 28px; margin: 36px 0 16px; }
.article-body h3 { font-family: var(--font-heading); font-size: 22px; margin: 30px 0 14px; }
.article-body blockquote {
  border-left: 3px solid var(--primary); padding: 16px 24px;
  margin: 28px 0; font-size: 18px; font-style: italic;
  color: var(--text); background: var(--bg-soft);
}
.article-body ul, .article-body ol { margin: 0 0 22px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body pre { background: var(--dark); color: #e8e6e2; padding: 20px 24px; border-left: 3px solid var(--primary); overflow-x: auto; margin: 24px 0; font-size: 14px; line-height: 1.6; }
.article-body code { font-family: 'Courier New', monospace; }
.article-body p > code { background: var(--bg-soft); padding: 2px 6px; border-left: 2px solid var(--primary); font-size: 15px; }
.article-image { margin: 28px 0; }
.article-image img { width: 100%; height: auto; }
.article-image figcaption { font-family: var(--font-heading); font-size: 13px; color: var(--text-soft); margin-top: 8px; text-align: center; }
.article-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-family: var(--font-heading); font-size: 13px; }
.tag-list span { color: var(--text-soft); text-transform: uppercase; letter-spacing: 1px; }
.tag-list a { display: inline-block; padding: 4px 12px; border: 1px solid var(--border); color: var(--text); font-size: 12px; }
.tag-list a:hover { border-color: var(--primary); color: var(--primary); }

/* ====== Author bio ====== */
.author-bio { display: flex; gap: 24px; margin: 50px 0; padding: 30px; background: var(--bg-soft); border-left: 3px solid var(--primary); }
.author-bio__avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid #fff; }
.author-bio h3 { font-family: var(--font-heading); font-size: 22px; margin-bottom: 2px; }
.author-bio__role { font-family: var(--font-heading); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--link); margin-bottom: 10px; }
.author-bio__social { display: flex; gap: 10px; margin-top: 12px; }
.author-bio__social a { color: var(--text-soft); font-size: 16px; }
.author-bio__social a:hover { color: var(--primary); }

/* ====== Related posts ====== */
.section-title { font-family: var(--font-heading); font-size: 24px; margin-bottom: 24px; }
.section-title::before { content: ''; display: block; width: 40px; height: 3px; background: var(--primary); margin-bottom: 14px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 50px; }
.related-grid .post-card__title { font-size: 16px; }
.related-grid .post-card__thumb { aspect-ratio: 16/11; }

/* ====== Comments ====== */
.comment-list { list-style: none; margin-bottom: 40px; }
.comment-list .comment { padding: 24px 0; border-bottom: 1px solid var(--border); }
.comment-list .comment-body { display: flex; gap: 16px; }
.comment-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-meta { margin-bottom: 8px; }
.comment-author { font-family: var(--font-heading); font-weight: 700; font-size: 15px; }
.comment-date { font-family: var(--font-heading); font-size: 12px; color: var(--text-soft); margin-left: 10px; }
.comment-content { font-size: 15px; color: var(--text-soft); }
.comment-form { margin-top: 30px; }
.comment-form .form-row { margin-bottom: 18px; }

/* ====== Portfolio ====== */
.portfolio-filter { display: flex; gap: 6px; margin-bottom: 36px; flex-wrap: wrap; }
.filter-btn {
  font-family: var(--font-heading); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; padding: 8px 18px;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  cursor: pointer; transition: all .2s;
}
.filter-btn:hover, .filter-btn.active { border-color: var(--primary); color: var(--primary); }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.portfolio-item { position: relative; overflow: hidden; aspect-ratio: 4/3; background: #ddd; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.portfolio-item:hover img { transform: scale(1.06); }
.portfolio-overlay {
  position: absolute; inset: 0; background: rgba(26,26,26,.75);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 30px; color: #fff; opacity: 0; transition: opacity .3s ease;
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-cat { font-family: var(--font-heading); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--primary); font-weight: 700; margin-bottom: 8px; }
.portfolio-overlay h3 { font-family: var(--font-heading); font-size: 22px; margin-bottom: 6px; }
.portfolio-overlay p { font-size: 14px; color: rgba(255,255,255,.8); }

/* ====== Archive / category list ====== */
.archive-list { display: flex; flex-direction: column; }
.archive-item { display: flex; gap: 28px; padding: 30px 0; border-bottom: 1px solid var(--border); }
.archive-item:first-child { padding-top: 0; }
.archive-item__thumb { flex-shrink: 0; width: 240px; height: 160px; overflow: hidden; background: #ddd; }
.archive-item__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.archive-item__thumb:hover img { transform: scale(1.05); }
.archive-item__body { min-width: 0; }
.archive-item__meta { font-family: var(--font-heading); font-size: 12px; color: var(--text-soft); letter-spacing: .5px; margin-bottom: 8px; }
.archive-item__title { font-family: var(--font-heading); font-size: 24px; font-weight: 700; line-height: 1.25; margin-bottom: 10px; }
.archive-item__title a { color: var(--text); }
.archive-item__title a:hover { color: var(--primary); }
.archive-item__excerpt { font-size: 15px; color: var(--text-soft); margin-bottom: 12px; }
.archive-item__more { font-family: var(--font-heading); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* ====== About page ====== */
.about-header { text-align: center; padding: 80px 60px 50px; position: relative; }
.about-header__avatar { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 4px solid var(--primary); margin: 0 auto 24px; }
.about-header .page-title::before { display: none; }
.about-header .page-title { font-size: 40px; }
.about-social { display: flex; gap: 14px; justify-content: center; margin-top: 20px; }
.about-social a { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--text); font-size: 16px; }
.about-social a:hover { border-color: var(--primary); color: var(--primary); }
.about-body { max-width: 700px; padding: 20px 60px 80px; font-size: 17px; line-height: 1.75; }
.about-body p { margin-bottom: 22px; }
.about-body .lead { font-size: 20px; font-style: italic; color: var(--text); border-left: 3px solid var(--primary); padding-left: 20px; }
.about-body h2 { font-family: var(--font-heading); font-size: 28px; margin: 40px 0 16px; }
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin: 24px 0; }
.skill { padding: 20px; background: var(--bg-soft); border-left: 3px solid var(--primary); }
.skill h3 { font-family: var(--font-heading); font-size: 18px; margin-bottom: 6px; }
.skill p { font-size: 14px; color: var(--text-soft); margin: 0; }
.publication-list { list-style: none; margin: 16px 0 24px; }
.publication-list li { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.publication-list li strong { font-family: var(--font-heading); display: block; }
.publication-list li span { color: var(--text-soft); font-size: 13px; }

/* ====== Contact page ====== */
.contact-layout { display: grid; grid-template-columns: 1fr 280px; gap: 50px; }
.contact-form .form-row { margin-bottom: 20px; }
.contact-form label { display: block; font-family: var(--font-heading); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text); margin-bottom: 6px; font-weight: 700; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  font-family: var(--font-body); font-size: 15px; color: var(--text);
  background: #fff; outline: none; transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { border-color: var(--primary); }
.contact-form textarea { resize: vertical; }
.form-note { font-size: 13px; color: var(--text-soft); margin-top: 14px; font-style: italic; }
.contact-info h3 { font-family: var(--font-heading); font-size: 16px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; border-bottom: 2px solid var(--primary); padding-bottom: 6px; display: inline-block; }
.contact-info p { font-size: 15px; margin-bottom: 24px; }
.contact-info p a { color: var(--text); }
.contact-info p a:hover { color: var(--primary); }
.contact-social { list-style: none; display: flex; gap: 10px; margin-bottom: 24px; }
.contact-social a { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.contact-social a:hover { border-color: var(--primary); color: var(--primary); }

/* ====== Typography reference ====== */
.typo-section { margin-bottom: 50px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.typo-section:last-child { border-bottom: none; }
.typo-label { font-family: var(--font-heading); font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--link); margin-bottom: 20px; }
.typo-section h1, .typo-section h2, .typo-section h3, .typo-section h4, .typo-section h5, .typo-section h6 { margin: 10px 0; }
.typo-section table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.typo-section th, .typo-section td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; font-size: 15px; }
.typo-section th { background: var(--bg-soft); font-family: var(--font-heading); font-weight: 700; }
.typo-section figure { margin: 20px 0; }
.typo-section figcaption { font-family: var(--font-heading); font-size: 13px; color: var(--text-soft); margin-top: 8px; text-align: center; }
.typo-samples { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.typo-form-samples { display: flex; flex-direction: column; gap: 14px; max-width: 400px; }
.typo-form-samples input, .typo-form-samples textarea, .typo-form-samples select { padding: 10px 14px; border: 1px solid var(--border); font-family: var(--font-body); font-size: 15px; }

/* ====== Responsive ====== */
@media (max-width: 1040px) {
  .content-col, .sidebar-col { width: 100%; }
  .layout { flex-direction: column; }
  .hero { height: 70vh; min-height: 480px; }
  .hero-caption { padding: 40px 32px 40px calc(32px + var(--strip)); }
  .hero-caption h1 { font-size: 40px; }
  /* Disable home-page sticky behaviour on mobile (layout stacks) */
  body.home-page .content-col { position: static; height: 70vh; min-height: 480px; }
  /* Push all content clear of the persistent menu strip */
  body.content-page .content-col,
  body.home-page .sidebar-col { padding-left: var(--strip); }
  body.content-page .sidebar-col { position: static; height: auto; overflow-y: visible; }
  .post-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .archive-item { flex-direction: column; gap: 16px; }
  .archive-item__thumb { width: 100%; height: 200px; }
  .contact-layout { grid-template-columns: 1fr; }
  .page-header { padding: 50px 32px 30px; padding-left: calc(32px + var(--strip)); }
  .content-area { padding: 36px 32px 60px; padding-left: calc(32px + var(--strip)); }
  .about-body { padding: 20px 32px 60px; padding-left: calc(32px + var(--strip)); }
  .about-header { padding: 50px 32px 30px; padding-left: calc(32px + var(--strip)); }
  .skills-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --strip: 60px; }
  .hero-caption { padding: 28px 22px; padding-left: calc(22px + var(--strip)); }
  .hero-caption h1 { font-size: 28px; }
  .hero-caption p { font-size: 15px; }
  .hero-logo { top: 18px; right: 18px; max-width: 38%; }
  .hero-logo img { max-height: 110px; }
  .sidebar-top { padding: 18px 20px; padding-left: calc(20px + var(--strip)); }
  .sidebar-body { padding: 22px 20px; padding-left: calc(20px + var(--strip)); }
  .aside-menu { width: 100%; max-width: 100vw; }
  .strip-avatar { width: 38px; height: 38px; }
  .page-title { font-size: 30px; }
  .article-title { font-size: 28px; }
  .article-body { font-size: 16px; }
  .author-bio { flex-direction: column; gap: 16px; }
  .related-grid { grid-template-columns: 1fr; }
  .post-grid { gap: 28px; }
  .page-header { padding: 36px 20px 24px; padding-left: calc(20px + var(--strip)); }
  .page-logo { top: 18px; right: 18px; max-width: 90px; }
  .page-logo img { max-height: 60px; }
  .content-area { padding: 28px 20px 50px; padding-left: calc(20px + var(--strip)); }
  .about-body { padding: 16px 20px 50px; padding-left: calc(20px + var(--strip)); }
  .about-header { padding: 40px 20px 24px; padding-left: calc(20px + var(--strip)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ============================================================
   Part 2 — WordPress additions
   ============================================================ */

/* ====== Accessibility helpers ====== */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 3000;
  background: #fff; color: var(--link); padding: 10px 16px;
  font-family: var(--font-heading); font-weight: 700;
}
.skip-link:focus { left: calc(var(--strip) + 8px); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ====== Layout variants ====== */
body.no-sidebar .content-col { width: 100%; }
body.no-sidebar .content-area { max-width: 1280px; }

/* WordPress admin bar (editors only) */
body.admin-bar .aside-menu { top: 32px; height: calc(100vh - 32px); }
body.admin-bar.content-page .sidebar-col { top: 32px; height: calc(100vh - 32px); }
body.admin-bar.home-page .content-col { top: 32px; height: calc(100vh - 32px); }
body.admin-bar .hero { height: calc(100vh - 32px); }
@media (max-width: 782px) {
  body.admin-bar .aside-menu { top: 46px; height: calc(100vh - 46px); }
}

/* ====== Avatar fallback (initials) ====== */
.avatar-initials {
  display: inline-flex !important; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-family: var(--font-heading);
  font-weight: 700; letter-spacing: 1px;
}
.avatar.avatar-initials { font-size: 38px; }
.strip-avatar.avatar-initials { font-size: 16px; }
.about-header__avatar.avatar-initials { font-size: 44px; }
.author-bio__avatar.avatar-initials { font-size: 28px; }

/* ====== Thumbnail placeholder (no featured image) ====== */
.thumb-placeholder {
  display: block; width: 100%; height: 100%;
  background-color: var(--bg-soft); background-repeat: no-repeat;
  background-position: center; background-size: 60% auto; opacity: .55;
}
.post-thumb .thumb-placeholder { background-size: 80% auto; }

/* ====== Slide-out menu (WordPress markup) ====== */
.main-nav .menu-hint { padding: 16px 36px; font-family: var(--font-heading); font-size: 13px; }
.main-nav .menu-hint a { color: var(--primary); padding: 0; text-transform: none; font-size: 13px; display: inline; }
.aside-footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.aside-footer-links a { color: rgba(255,255,255,.7); }
.aside-footer-links a:hover { color: var(--primary); }
.aside-footer p + p { margin-top: 6px; }
.strip-home { display: block; }

/* ====== Hero additions ====== */
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--ghost { border-color: rgba(255,255,255,.55); }
.hero-bg:not([style]) { background: linear-gradient(135deg, #3a3f41, #1d2022); }

/* ====== Sidebar additions ====== */
.login-link--in { gap: 6px; }
.login-link--in a { color: var(--text-soft); margin-left: 6px; font-size: 12px; }
.login-link--in a:hover { color: var(--primary); }
.widget-intro { font-size: 14px; color: var(--text-soft); margin-bottom: 18px; }
.post-teaser { font-size: 13px; color: var(--text-soft); line-height: 1.5; margin-top: 4px; }
.lock-icon { font-size: 10px; color: var(--secondary); margin-left: 4px; }
.widget-more { margin-top: 18px; font-family: var(--font-heading); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
/* Core widgets in the sidebar */
.sidebar-body .widget ul { list-style: none; }
.sidebar-body .widget li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.sidebar-body .widget li a { color: var(--text); }
.sidebar-body .widget li a:hover { color: var(--primary); }
.sidebar-body .widget p { font-size: 14px; color: var(--text-soft); margin-bottom: 12px; }
.sidebar-body .widget .wp-block-heading { font-family: var(--font-heading); font-size: 13px; text-transform: uppercase; letter-spacing: 2px; border-bottom: 2px solid var(--primary); padding-bottom: 10px; margin-bottom: 22px; display: inline-block; }
.sidebar-body .widget .wp-block-buttons { margin-top: 8px; }

/* ====== Cards / lists additions ====== */
.lock-note { color: var(--secondary); white-space: nowrap; }
.lock-note i { font-size: 10px; }
.listing-intro { margin-bottom: 44px; max-width: 760px; }
.post-card__thumb img, .archive-item__thumb img, .portfolio-item img { height: 100%; }
.pagination .dots { padding: 8px 6px; font-family: var(--font-heading); }
.pagination .page-num.current { border-color: var(--primary); color: var(--primary); }

/* ====== Article additions ====== */
.article-header .page-logo { top: 0; right: 0; }
.article-header { padding-right: 160px; }
.article-header .page-subtitle { margin-bottom: 16px; }
.article-meta__access { color: var(--secondary); }
.article-featured figcaption { font-family: var(--font-heading); font-size: 13px; color: var(--text-soft); margin-top: 8px; }
.page-featured { max-width: 760px; }
.author-bio__more { margin-top: 10px; font-family: var(--font-heading); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.related-posts { margin-top: 10px; }

/* ====== Content written in the block editor ====== */
.entry-content { font-size: 17px; line-height: 1.75; max-width: 760px; }
body.no-sidebar .entry-content { max-width: none; }
.entry-content > * + * { margin-top: 22px; }
.entry-content p { margin-bottom: 0; }
.entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 { font-family: var(--font-heading); line-height: 1.25; }
.entry-content h2 { font-size: 28px; margin-top: 40px; }
.entry-content h3 { font-size: 22px; margin-top: 32px; }
.entry-content h4 { font-size: 18px; margin-top: 26px; }
.entry-content h5, .entry-content h6 { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; margin-top: 24px; }
.entry-content > h2:first-child, .entry-content > h3:first-child { margin-top: 0; }
.entry-content a:not(.wp-block-button__link):not(.btn) { color: var(--link); text-decoration: underline; text-decoration-color: rgba(80,199,232,.6); text-underline-offset: 3px; }
.entry-content a:not(.wp-block-button__link):not(.btn):hover { color: var(--primary); }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content li + li { margin-top: 8px; }
.entry-content li > ul, .entry-content li > ol { margin-top: 8px; }
.entry-content blockquote, .entry-content .wp-block-quote {
  border-left: 3px solid var(--primary); padding: 16px 24px;
  font-size: 18px; font-style: italic; background: var(--bg-soft);
}
.entry-content blockquote cite { display: block; margin-top: 10px; font-family: var(--font-heading); font-style: normal; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-soft); }
.entry-content .wp-block-pullquote { border-top: 3px solid var(--primary); border-bottom: 3px solid var(--primary); padding: 30px 0; text-align: center; }
.entry-content .wp-block-pullquote blockquote { background: none; border: 0; font-size: 22px; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content img { height: auto; }
.entry-content figcaption, .entry-content .wp-element-caption { font-family: var(--font-heading); font-size: 13px; color: var(--text-soft); margin-top: 8px; text-align: center; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry-content th, .entry-content td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.entry-content th, .entry-content thead td { background: var(--bg-soft); font-family: var(--font-heading); font-weight: 700; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content hr, .entry-content .wp-block-separator { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.entry-content .wp-block-separator.is-style-wide { border-top-width: 2px; }
.entry-content pre { background: var(--dark); color: #e8e6e2; padding: 20px 24px; border-left: 3px solid var(--primary); overflow-x: auto; font-size: 14px; line-height: 1.6; }
.entry-content code { font-family: 'Courier New', monospace; }
.entry-content p > code { background: var(--bg-soft); padding: 2px 6px; font-size: 15px; }
.entry-content iframe { max-width: 100%; }
.entry-content .wp-block-embed iframe { width: 100%; }
.entry-content .wp-block-gallery { gap: 12px; }
.entry-content .wp-block-columns { gap: 28px; }
.entry-content .alignleft { float: left; margin: 6px 28px 16px 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: 6px 0 16px 28px; max-width: 50%; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.entry-content .aligncenter img { margin: 0 auto; }
.entry-content .alignwide { max-width: none; }
.entry-content::after { content: ''; display: table; clear: both; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .wp-caption-text { font-family: var(--font-heading); font-size: 13px; color: var(--text-soft); text-align: center; margin-top: 6px; }
.entry-content .wp-block-file { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--bg-soft); border-left: 3px solid var(--primary); }
.entry-content .wp-block-file a:first-child::before { content: '\f1c1'; font-family: 'Font Awesome 6 Free'; font-weight: 400; margin-right: 8px; color: var(--secondary); text-decoration: none; display: inline-block; }
.entry-content .wp-block-file__button { margin-left: auto; }
.entry-content .wp-block-details { border: 1px solid var(--border); padding: 14px 18px; }
.entry-content .wp-block-details summary { font-family: var(--font-heading); font-weight: 700; cursor: pointer; }

/* Buttons block → template buttons */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button__link, .wp-element-button {
  display: inline-block; padding: 13px 30px; border-radius: 0;
  border: 2px solid var(--text); color: var(--text); background: transparent;
  font-family: var(--font-heading); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 1.5px; text-decoration: none;
  transition: all .2s ease;
}
.wp-block-button__link:hover { border-color: var(--primary); color: var(--primary); }
.wp-block-button.is-style-fill .wp-block-button__link,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) { background: var(--primary); border-color: var(--primary); color: #fff; }
.wp-block-button.is-style-fill .wp-block-button__link:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):hover { background: var(--text); border-color: var(--text); color: #fff; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--text); border-color: var(--text); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { color: var(--primary); border-color: var(--primary); }

/* Block styles registered by the theme */
.entry-content .is-style-lead { font-size: 20px; font-style: italic; border-left: 3px solid var(--primary); padding-left: 20px; }
.entry-content .is-style-accent::before { content: ''; display: block; width: 40px; height: 3px; background: var(--primary); margin-bottom: 14px; }
.is-style-callout { background: var(--bg-soft); border-left: 3px solid var(--primary); padding: 24px 28px; }
.is-style-callout > * + * { margin-top: 14px; }
.is-style-callout h3, .is-style-callout h4 { margin-top: 0 !important; }
.entry-content .is-style-publications { list-style: none; padding-left: 0; }
.entry-content .is-style-publications li { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-soft); margin: 0; }
.entry-content .is-style-publications li strong { font-family: var(--font-heading); display: block; font-size: 16px; color: var(--text); }
.entry-content .is-style-ticks { list-style: none; padding-left: 0; }
.entry-content .is-style-ticks li { padding-left: 28px; position: relative; }
.entry-content .is-style-ticks li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--primary); position: absolute; left: 0; top: 1px; font-size: 14px; }
.entry-content .skills-grid, .entry-content .skills-grid > .wp-block-group__inner-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.entry-content .skills-grid > .wp-block-group__inner-container { grid-column: 1 / -1; }
.entry-content .skill > * + * { margin-top: 6px; }
.entry-content .skill h3 { font-size: 18px; margin-top: 0; }
.entry-content .skill p { font-size: 14px; color: var(--text-soft); line-height: 1.6; }

/* Profile layout body uses entry-content */
.about-body.entry-content { max-width: 760px; }

/* ====== Forms (contact form plugins, comments, register) ====== */
.entry-content input[type="text"], .entry-content input[type="email"], .entry-content input[type="tel"],
.entry-content input[type="url"], .entry-content input[type="number"], .entry-content input[type="password"],
.entry-content input[type="date"], .entry-content select, .entry-content textarea,
.contact-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .contact-form select, .contact-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 0;
  font-family: var(--font-body); font-size: 15px; color: var(--text); background: #fff;
  outline: none; transition: border-color .2s;
}
.entry-content input:focus, .entry-content select:focus, .entry-content textarea:focus { border-color: var(--primary); }
.entry-content label { font-family: var(--font-heading); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.entry-content input[type="submit"], .entry-content button[type="submit"]:not(.btn) {
  display: inline-block; padding: 13px 30px; background: var(--primary); border: 2px solid var(--primary); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; cursor: pointer;
}
.entry-content input[type="submit"]:hover, .entry-content button[type="submit"]:not(.btn):hover { background: var(--text); border-color: var(--text); }
.contact-main .wpcf7-form p, .contact-main .ff-el-group { margin-bottom: 18px; }

.register-layout { max-width: 760px; }
.register-form fieldset { border: 0; margin-bottom: 34px; }
.register-form legend { font-family: var(--font-heading); font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.register-form legend::before { content: ''; display: block; width: 36px; height: 3px; background: var(--primary); margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.register-form small { display: block; font-size: 13px; color: var(--text-soft); margin-top: 6px; }
.req { color: var(--secondary); }
.form-consent label { display: flex; gap: 12px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-weight: 400; font-family: var(--font-body); font-size: 15px; color: var(--text); }
.form-consent input { margin-top: 5px; width: auto; flex-shrink: 0; }
.form-consent { margin-bottom: 24px; }
.hp-field { position: absolute !important; left: -9999px; }
.form-notice { padding: 18px 22px; background: var(--bg-soft); border-left: 3px solid var(--primary); margin-bottom: 30px; font-size: 16px; }
.form-notice ul { margin: 8px 0 0 20px; }
.form-notice--success { border-left-color: #2e9e5b; }
.form-notice--error { border-left-color: #c0392b; background: #fdf3f2; }
.contact-form .form-note a { text-decoration: underline; }

/* Comments (WordPress markup) */
.comments { margin-top: 50px; }
.comment-list .comment-body { display: block; position: relative; padding-left: 72px; min-height: 56px; }
.comment-list .avatar { position: absolute; left: 0; top: 0; border-radius: 50%; }
.comment-list .comment-author { display: block; }
.comment-list .comment-author .says { display: none; }
.comment-list .comment-metadata { font-family: var(--font-heading); font-size: 12px; margin-bottom: 8px; }
.comment-list .comment-metadata a { color: var(--text-soft); }
.comment-list .comment-content p { font-size: 15px; color: var(--text-soft); margin-bottom: 10px; }
.comment-list .reply a { font-family: var(--font-heading); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.comment-list .children { list-style: none; margin-left: 40px; }
.comment-form p { margin-bottom: 16px; }
.comment-form label { display: block; font-family: var(--font-heading); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 6px; }
.comment-form .comment-form-cookies-consent label { display: inline; text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Search form inside content */
.search-again { max-width: 460px; }
.search-again .search-form { border-bottom: 2px solid var(--border); }
.search-again .search-form input { font-size: 18px; }

/* ====== Medical professionals: teaser + gate ====== */
.mp-teaser { position: relative; }
.mp-teaser > * + * { margin-top: 22px; }
.mp-teaser::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff); pointer-events: none;
}
.mp-gate {
  margin-top: 10px; padding: 34px 36px; text-align: center;
  background: var(--bg-soft); border-top: 3px solid var(--primary);
  font-style: normal;
}
.mp-gate__icon {
  display: inline-flex; width: 52px; height: 52px; border-radius: 50%;
  align-items: center; justify-content: center; background: #fff;
  color: var(--secondary); font-size: 20px; border: 1px solid var(--border); margin-bottom: 14px;
}
.mp-gate__title { font-family: var(--font-heading); font-size: 22px; margin: 0 0 10px !important; }
.mp-gate p { font-size: 15px; color: var(--text-soft); max-width: 520px; margin: 0 auto; }
.mp-gate__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.entry-content .mp-gate a.btn { text-decoration: none; }

/* ====== Login pop-up (WordPress) ====== */
.login-popup[hidden] { display: none; }

/* ====== Responsive additions ====== */
@media (max-width: 1040px) {
  body.no-sidebar .content-col { padding-left: var(--strip); }
  .entry-content .skills-grid, .entry-content .skills-grid > .wp-block-group__inner-container { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .article-header { padding-right: 90px; }
  .form-grid { grid-template-columns: 1fr; }
  .mp-gate { padding: 26px 20px; }
  .entry-content .alignleft, .entry-content .alignright { float: none; margin: 0 0 16px; max-width: 100%; }
  .hero-buttons .btn { padding: 11px 20px; }
}
@media print {
  .aside-menu, .sidebar-col, .backdrop, .login-popup { display: none !important; }
  .content-col { width: 100% !important; padding: 0 !important; }
}

/* Social icon lists rendered as <ul> */
ul.about-social, ul.contact-social, ul.social-menu { list-style: none; padding: 0; }
.entry-content .is-style-publications li strong + br { display: none; }

/* Stacked layout: the sidebar always clears the fixed menu strip exactly once */
@media (max-width: 1040px) {
  body.content-page .sidebar-col, body.home-page .sidebar-col { padding-left: var(--strip); }
}
@media (max-width: 640px) {
  .sidebar-top { padding-left: 20px; }
  .sidebar-body { padding-left: 20px; }
  .post-thumb { width: 72px; height: 54px; }
}

/* ====== Hero slideshow (Full-screen hero with several images) ====== */
.hero--slides .hero-bg {
  opacity: 0; transform: scale(1.02);
  transition: opacity 1.8s ease, transform 9s ease-out;
}
.hero--slides .hero-bg.is-active { opacity: 1; transform: scale(1.07); }
.hero--slides:hover .hero-bg.is-active { transform: scale(1.07); }
.hero--slides .hero-bg.is-leaving { opacity: 0; transform: scale(1.07); }
.hero-pause {
  position: absolute; right: 22px; bottom: 22px; z-index: 4;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.45); background: rgba(0,0,0,.25);
  color: #fff; font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: .6; transition: opacity .2s, border-color .2s;
}
.hero-pause:hover, .hero-pause:focus-visible { opacity: 1; border-color: var(--primary); }
@media (prefers-reduced-motion: reduce) {
  .hero--slides .hero-bg { transition: none; transform: none !important; }
  .hero-pause { display: none; }
}
/* Light shade at the top so the white/cyan logo stays readable on bright photos */
.hero::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 45%;
  background: linear-gradient(to bottom, rgba(0,0,0,.38), rgba(0,0,0,0));
  z-index: 1; pointer-events: none;
}
