/*
Theme Name: Doors Journal
Theme URI: https://github.com/zzzmisa/hugo-theme-doors
Author: Doors Journal contributors
Description: A minimal editorial WordPress theme inspired by Hugo Theme Doors.
Version: 2.3.1
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: doors-journal
Tags: blog, portfolio, grid-layout, custom-logo, featured-images
*/

:root {
  --dj-paper: #fff;
  --dj-ink: #242424;
  --dj-soft: #f2f3f3;
  --dj-muted: #6d6d6d;
  --dj-line: #d9d9d9;
  --dj-accent: #242424;
  --dj-width: 650px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--dj-paper); color: var(--dj-ink); font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 14px; line-height: 1.7; }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
a:hover { opacity: .62; }
img { display: block; max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { width: auto; height: auto; clip: auto; background: #fff; color: #111; padding: .75rem; z-index: 9999; }

.site-header { width: min(var(--dj-width), calc(100% - 36px)); margin: 0 auto; padding: 26px 0 30px; text-align: center; }
.site-branding { font-size: 13px; font-style: italic; letter-spacing: .01em; }
.site-branding a { text-decoration: none; }
.custom-logo-link { display: inline-block; }
.custom-logo {
  width: 120px;
  max-width: 120px;
  height: auto;
  max-height: none;
  margin: 0 auto;
}
.site-nav { margin-top: 14px; }
.site-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font: 700 10px/1.4 Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.site-nav a { text-decoration: none; }
.menu-toggle { display: none; }

.hero { position: relative; width: min(var(--dj-width), calc(100% - 36px)); height: 360px; margin: 0 auto 32px; background: var(--dj-soft) center/cover no-repeat; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.03); pointer-events: none; }
.hero-inner { position: absolute; z-index: 1; left: 24px; right: 24px; top: 50%; transform: translateY(-50%); padding: 28px 22px 30px; background: rgba(255,255,255,.91); text-align: center; }
.hero-kicker { margin: 0 0 12px; font: 700 10px/1.4 Arial, sans-serif; letter-spacing: .025em; text-transform: uppercase; }
.hero h1 { margin: 0; font: 700 11px/1.4 Arial, sans-serif; letter-spacing: .03em; text-transform: uppercase; }
.hero-description { max-width: 560px; margin: 12px auto 0; color: #525252; font-size: clamp(16px, 2.4vw, 20px); line-height: 1.55; }

.site-main { width: min(var(--dj-width), calc(100% - 36px)); margin: 0 auto; padding: 0 0 92px; }
.section-heading { margin: 0 0 22px; text-align: center; }
.section-heading h1, .section-heading h2, .archive-title { margin: 0; font: 700 11px/1.4 Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.section-heading p { margin: 6px 0 0; color: var(--dj-muted); font-style: italic; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; row-gap: 32px; }
.post-card { min-width: 0; }
.post-card-link { display: block; height: 100%; text-decoration: none; }
.post-card-media { position: relative; aspect-ratio: 1.5 / 1; overflow: hidden; background: var(--dj-soft); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.post-card-link:hover img { opacity: .78; }
.post-card-number {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: rgba(0, 0, 0, .58);
  color: #fff;
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: .04em;
  pointer-events: none;
}
.post-card-body { padding-top: 13px; }
.post-card-meta { margin-bottom: 5px; color: var(--dj-muted); font: 9px/1.4 Arial, sans-serif; letter-spacing: .025em; text-transform: uppercase; }
.post-card-meta span::before { content: " / "; }
.post-card-title { margin: 0 0 4px; font: 700 11px/1.45 Arial, sans-serif; letter-spacing: .01em; }
.post-card-excerpt { color: #555; font-size: 13px; line-height: 1.55; text-decoration: underline; text-underline-offset: 2px; }
.post-card-excerpt p { margin: 0; }

.pagination, ul.page-numbers { margin-top: 54px; }
ul.page-numbers { padding: 0; list-style: none; text-align: center; }
ul.page-numbers li { display: inline-block; }
.nav-links { display: flex; justify-content: center; gap: 6px; }
a.page-numbers, span.page-numbers { display: inline-grid; min-width: 32px; height: 32px; place-items: center; border: 1px solid var(--dj-line); padding: 0 8px; text-decoration: none; }
span.page-numbers.current, a.page-numbers:hover { background: var(--dj-ink); color: #fff; opacity: 1; }

.profile { width: min(430px, calc(100% - 36px)); margin: 8px auto 82px; text-align: center; }
.profile-image { width: 96px; height: 96px; margin: 0 auto 13px; border-radius: 50%; object-fit: cover; }
.profile h2 { margin: 0 0 14px; font: 700 11px/1.4 Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.profile-text { margin: 0; text-align: left; font-size: 13px; line-height: 1.65; }
.profile-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; font: 700 10px/1.4 Arial, sans-serif; text-transform: uppercase; }
.profile-links a {
  display: inline-block;
  width: 22px;
  height: 22px;
  overflow: hidden;
  background-color: var(--dj-ink);
  font-size: 0;
  line-height: 0;
  text-decoration: none;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.profile-links a:hover { background-color: var(--dj-accent); opacity: 1; }
/* 1: Threads */
.profile-links a:nth-child(1) {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12.2 2C6.6 2 3 5.8 3 11.8c0 5.9 3.6 10.2 9.2 10.2 5 0 8.8-3 8.8-7.3 0-3.5-2.2-5.8-5.7-6.1-.4-1.9-1.7-3-3.7-3-2.3 0-4 1.3-4.7 3.5l2.3.6c.4-1.2 1.2-1.8 2.4-1.8.7 0 1.2.3 1.5.8-3.9.2-6.2 2.1-6.2 5 0 2.6 2 4.5 4.8 4.5 2.7 0 4.7-1.8 4.7-4.4 0-1-.1-1.9-.3-2.8 1.6.5 2.4 1.8 2.4 3.7 0 3-2.6 5-6.3 5-4.2 0-6.8-3.2-6.8-7.9 0-4.7 2.6-7.5 6.8-7.5 3.1 0 5.5 1.5 6.7 4.3l2.2-1C19.5 4 16.3 2 12.2 2Zm-.4 13.9c-1.4 0-2.4-.9-2.4-2.2 0-1.7 1.5-2.7 4.3-2.8.2.8.3 1.6.3 2.4 0 1.6-.9 2.6-2.2 2.6Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12.2 2C6.6 2 3 5.8 3 11.8c0 5.9 3.6 10.2 9.2 10.2 5 0 8.8-3 8.8-7.3 0-3.5-2.2-5.8-5.7-6.1-.4-1.9-1.7-3-3.7-3-2.3 0-4 1.3-4.7 3.5l2.3.6c.4-1.2 1.2-1.8 2.4-1.8.7 0 1.2.3 1.5.8-3.9.2-6.2 2.1-6.2 5 0 2.6 2 4.5 4.8 4.5 2.7 0 4.7-1.8 4.7-4.4 0-1-.1-1.9-.3-2.8 1.6.5 2.4 1.8 2.4 3.7 0 3-2.6 5-6.3 5-4.2 0-6.8-3.2-6.8-7.9 0-4.7 2.6-7.5 6.8-7.5 3.1 0 5.5 1.5 6.7 4.3l2.2-1C19.5 4 16.3 2 12.2 2Zm-.4 13.9c-1.4 0-2.4-.9-2.4-2.2 0-1.7 1.5-2.7 4.3-2.8.2.8.3 1.6.3 2.4 0 1.6-.9 2.6-2.2 2.6Z'/%3E%3C/svg%3E");
}
/* 2: Marshmallow / heart */
.profile-links a:nth-child(2) {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 21s-8.5-5.2-8.5-12A4.7 4.7 0 0 1 12 6.2 4.7 4.7 0 0 1 20.5 9c0 6.8-8.5 12-8.5 12Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 21s-8.5-5.2-8.5-12A4.7 4.7 0 0 1 12 6.2 4.7 4.7 0 0 1 20.5 9c0 6.8-8.5 12-8.5 12Z'/%3E%3C/svg%3E");
}
/* 3: RSS */
.profile-links a:nth-child(3) {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle fill='black' cx='5' cy='19' r='2.2'/%3E%3Cpath fill='black' d='M3 3v3.2c8.2 0 14.8 6.6 14.8 14.8H21C21 11.1 12.9 3 3 3Zm0 6v3.2c4.9 0 8.8 3.9 8.8 8.8H15c0-6.6-5.4-12-12-12Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle fill='black' cx='5' cy='19' r='2.2'/%3E%3Cpath fill='black' d='M3 3v3.2c8.2 0 14.8 6.6 14.8 14.8H21C21 11.1 12.9 3 3 3Zm0 6v3.2c4.9 0 8.8 3.9 8.8 8.8H15c0-6.6-5.4-12-12-12Z'/%3E%3C/svg%3E");
}

.article-shell { width: min(var(--dj-width), calc(100% - 36px)); margin: 0 auto; padding: 30px 0 88px; }
.article-header { max-width: 570px; margin: 0 auto 34px; text-align: center; }
.article-header h1 { margin: 8px 0 13px; font: 700 clamp(22px, 5vw, 34px)/1.35 Arial, sans-serif; letter-spacing: -.015em; }
.article-meta { color: var(--dj-muted); font: 9px/1.4 Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.article-thumbnail { width: min(var(--dj-width), calc(100% - 36px)); margin: 0 auto 38px; }
.article-thumbnail img { width: 100%; max-height: 620px; object-fit: cover; }
.entry-content { font-size: 15px; line-height: 1.9; }
.entry-content > * { margin-top: 0; margin-bottom: 1.6em; }
.entry-content h2, .entry-content h3 { margin-top: 2.4em; font-family: Arial, sans-serif; line-height: 1.45; }
.entry-content h2 { font-size: 23px; }
.entry-content h3 { font-size: 18px; }
.entry-content blockquote { margin-left: 0; padding-left: 18px; border-left: 2px solid var(--dj-ink); color: var(--dj-muted); font-style: italic; }
.post-navigation, .comments-area { margin-top: 58px; padding-top: 24px; border-top: 1px solid var(--dj-line); }
.post-navigation .nav-links { justify-content: space-between; }
.after-post-widgets { margin-top: 58px; padding-top: 28px; border-top: 1px solid var(--dj-line); }
.after-post-widgets .widget { margin: 0 0 34px; }
.after-post-widgets .widget:last-child { margin-bottom: 0; }
.after-post-widgets .widget-title { margin: 0 0 14px; font: 700 11px/1.4 Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.after-post-widgets ul { margin: 0; padding-left: 18px; }
.after-post-widgets li { margin-bottom: 6px; }
.comment-list { padding-left: 20px; }
input, textarea { width: 100%; border: 1px solid var(--dj-line); background: #fff; color: var(--dj-ink); padding: 10px; }
button, input[type="submit"] { width: auto; cursor: pointer; border: 1px solid var(--dj-ink); background: #fff; color: var(--dj-ink); padding: 9px 14px; }

.site-footer { width: min(var(--dj-width), calc(100% - 36px)); margin: 0 auto; border-top: 1px solid #eee; padding: 24px 0 34px; color: var(--dj-muted); text-align: center; font-size: 11px; }
.site-footer .site-nav { margin: 0 0 22px; color: var(--dj-ink); }
.site-footer .menu-toggle { margin: 0 auto 14px; }
.footer-navigation { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 22px; }
.footer-navigation .site-nav { margin: 0; }
.search-toggle { display: inline-grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border: 0; background: transparent; color: var(--dj-ink); padding: 0; }
.search-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.search-toggle:hover { opacity: .62; }
.site-footer p { margin: 2px 0; }
.site-footer .footer-credit { font-style: italic; }
.search-overlay { position: fixed; z-index: 9998; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(28, 27, 25, .92); opacity: 0; visibility: hidden; transition: opacity .22s, visibility .22s; }
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-overlay-panel { position: relative; width: min(620px, 100%); padding: 58px 42px 46px; background: var(--dj-paper); }
.search-overlay-title { margin: 0 0 20px; color: var(--dj-ink); font: 700 12px/1.4 Arial, sans-serif; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.search-overlay-close { position: absolute; top: 15px; right: 15px; display: grid; width: 32px; height: 32px; place-items: center; border: 0; background: transparent; color: var(--dj-ink); padding: 0; font: 300 27px/1 Arial, sans-serif; }
.search-overlay .search-form { display: flex; align-items: stretch; }
.search-overlay .search-field { min-width: 0; border: 0; border-bottom: 1px solid var(--dj-ink); background: transparent; padding: 10px 2px; font: 16px/1.5 Arial, sans-serif; }
.search-overlay .search-field:focus { outline: 0; border-bottom-width: 2px; }
.search-overlay .search-submit { flex: 0 0 auto; border: 0; border-bottom: 1px solid var(--dj-ink); background: transparent; color: var(--dj-ink); padding: 10px 8px; font: 700 10px/1 Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
body.search-overlay-open { overflow: hidden; }
.empty-state { padding: 55px 0; text-align: center; color: var(--dj-muted); }

@media (max-width: 650px) {
  .site-header { padding-bottom: 22px; }
  .site-footer .menu-toggle { display: flex; align-items: center; gap: 8px; border: 0; padding: 6px 8px; font: 700 10px Arial, sans-serif; text-transform: uppercase; }
  .menu-toggle-icon, .menu-toggle-icon::before, .menu-toggle-icon::after { display: block; width: 17px; height: 1px; background: currentColor; transition: transform .2s, opacity .2s; }
  .menu-toggle-icon { position: relative; }
  .menu-toggle-icon::before, .menu-toggle-icon::after { content: ""; position: absolute; left: 0; }
  .menu-toggle-icon::before { top: -5px; }
  .menu-toggle-icon::after { top: 5px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { top: 0; transform: rotate(-45deg); }
  .site-footer .site-nav { display: none; }
  .site-footer .site-nav.is-open { display: block; }
  .site-footer .site-nav ul { display: grid; gap: 10px; padding: 14px 0 20px; }
  .footer-navigation { position: relative; flex-wrap: wrap; gap: 4px; }
  .footer-navigation .menu-toggle { margin: 0; }
  .footer-navigation .site-nav { flex-basis: 100%; order: 3; }
  .search-overlay-panel { padding: 54px 24px 36px; }
  .hero { height: min(68vw, 340px); min-height: 260px; }
  .hero-inner { left: 16px; right: 16px; padding: 22px 16px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .post-grid { grid-template-columns: 1fr; row-gap: 35px; }
  .post-card-media { aspect-ratio: 1.5 / 1; }
}
