/* World of Apple — static archive
   Modern responsive rebuild in the spirit of the original 2008–2015 theme
   (navy #2d3f5f, cream #f3f1e6, charcoal #4d4d4d, Georgia). */

:root {
  --navy: #2d3f5f;
  --navy-dark: #223049;
  --navy-light: #4b576d;
  --cream: #f3f1e6;
  --cream-light: #f9f8f2;
  --charcoal: #4d4d4d;
  --ink: #33383f;
  --muted: #6e6e6e;
  --rule: #d9d5c4;
  --link: #3d6194;
  --link-hover: #771a09;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --wrap: 62rem;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover, a:focus { color: var(--link-hover); text-decoration: underline; }

img, video { max-width: 100%; height: auto; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* ---------------------------------------------------------------- header */
.masthead {
  background: var(--charcoal);
  border-bottom: 3px solid var(--navy);
}
.masthead-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.1;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.brand:hover, .brand:focus { color: #fff; text-decoration: none; }

.nav {
  margin-left: auto;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 0.86rem;
}
.nav a {
  color: #ccc;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  text-decoration: none;
}
.nav a:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.nav a[aria-current] { background: var(--navy); color: #fff; }

/* archive banner */
.archive-note {
  background: var(--navy);
  color: #d7dced;
  font-family: var(--sans);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.45rem 1rem;
}
.archive-note a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.archive-note a:hover { color: #fff; text-decoration-thickness: 2px; }

/* ----------------------------------------------------------------- layout */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.wrap-wide { max-width: 76rem; }

.page-title {
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
  color: var(--navy);
  font-weight: normal;
}
.page-sub {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

/* ------------------------------------------------------------ post lists */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list > li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-list > li:first-child { padding-top: 0; }
.entry-title { font-size: 1.4rem; line-height: 1.28; margin: 0 0 0.3rem; font-weight: normal; }
.entry-title a { color: var(--navy); }
.entry-meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.entry-meta a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule); }
.entry-meta a:hover { color: var(--link-hover); }
.entry-summary { margin: 0; color: #4a4f57; }

/* --------------------------------------------------------- single post */
.post-header { margin-bottom: 1.75rem; }
.post-header .page-title { font-size: 2.15rem; margin-bottom: 0.5rem; }

.entry-content { font-size: 1.05rem; }
.entry-content p { margin: 0 0 1.25rem; }
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5 {
  color: var(--navy);
  font-weight: normal;
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
}
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--navy);
  color: #55595f;
  font-style: italic;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content img { border-radius: 2px; }

/* An image that is the whole of its block reads as a block, not as a word in a
   sentence. Old posts relied on the theme for this spacing; give it back. */
.entry-content p > img:only-child,
.entry-content li > img:only-child,
.entry-content div > img:only-child,
.entry-content p > a:only-child > img:only-child {
  display: block;
  margin: 1.75rem auto;
}
.entry-content p > a:only-child:has(> img:only-child) { display: block; }
.entry-content figure.wp-caption img { margin: 0 auto; }
.entry-content a { text-decoration: underline; text-decoration-color: rgba(61,97,148,0.35); text-underline-offset: 2px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: 0.94rem; }
.entry-content th, .entry-content td { border: 1px solid var(--rule); padding: 0.45rem 0.6rem; text-align: left; }
.entry-content th { background: var(--cream-light); }
.entry-content pre {
  background: var(--cream-light);
  border: 1px solid var(--rule);
  padding: 0.9rem;
  overflow-x: auto;
  font-size: 0.85rem;
  border-radius: var(--radius);
}
.entry-content code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; }
.entry-content iframe { max-width: 100%; }

figure.wp-caption {
  margin: 1.75rem 0;
  max-width: 100%;
}
figure.wp-caption:not(.alignleft):not(.alignright) img { display: block; margin-inline: auto; }
figure.wp-caption:not(.alignleft):not(.alignright) figcaption { text-align: center; }
figure.wp-caption img { display: block; }
figure.wp-caption figcaption {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 0.55rem;
  line-height: 1.45;
  font-style: normal;
}
figure.wp-caption.alignright { float: right; margin: 0.4rem 0 1rem 1.5rem; }
figure.wp-caption.alignleft  { float: left;  margin: 0.4rem 1.5rem 1rem 0; }
figure.wp-caption.aligncenter { margin-left: auto; margin-right: auto; }
.alignright { float: right; margin: 0.4rem 0 1rem 1.5rem; }
.alignleft { float: left; margin: 0.4rem 1.5rem 1rem 0; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.woa-rating {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
}

/* missing image placeholder */
.woa-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 180px;
  min-height: 60px;
  padding: 1rem 1.25rem;
  margin: 0.5rem 0;
  background: repeating-linear-gradient(45deg, #eceadf, #eceadf 8px, #e4e1d4 8px, #e4e1d4 16px);
  border: 1px dashed var(--rule);
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  border-radius: var(--radius);
}

.taxonomy-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}
.pill {
  display: inline-block;
  background: #e8e5d6;
  color: #4a5464;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  margin: 0 0.3rem 0.35rem 0;
  text-decoration: none;
  font-size: 0.78rem;
}
.pill:hover { background: var(--navy); color: #fff; text-decoration: none; }

/* -------------------------------------------------------------- adjacent */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.post-nav a {
  display: block;
  padding: 0.9rem 1rem;
  background: var(--cream-light);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
}
.post-nav a:hover { background: #fff; text-decoration: none; }
.post-nav small { display: block; color: var(--muted); font-size: 0.72rem; margin-bottom: 0.2rem; }
.post-nav .next { text-align: right; }

/* ------------------------------------------------------------ pagination */
.pagination {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.pagination a, .pagination span {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--cream-light);
  text-decoration: none;
}
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination .gap { border: 0; background: none; color: var(--muted); }

/* ---------------------------------------------------------- archive index */
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; }
.year-card {
  background: var(--cream-light);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.year-card h3 { margin: 0 0 0.5rem; font-size: 1.3rem; font-weight: normal; }
.year-card h3 a { color: var(--navy); }
.year-card ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 0.82rem; columns: 2; }
.year-card li { margin-bottom: 0.25rem; }
.year-card .count { color: var(--muted); font-size: 0.75rem; }

.term-cloud { line-height: 2.2; }
.term-cloud a { margin-right: 0.35rem; }

/* --------------------------------------------------------------- search */
.search-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.search-box input {
  flex: 1;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.search-box input:focus { outline: 2px solid var(--navy); outline-offset: -1px; }
#search-status { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
mark { background: #fdf3a7; color: inherit; padding: 0 0.1em; }

/* ------------------------------------------------------------- galleries */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.25rem; align-items: stretch; }
.gallery-card {
  background: var(--cream-light);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: var(--navy);
}
.gallery-card:hover { text-decoration: none; box-shadow: 0 2px 10px rgba(45,63,95,0.14); }
.gallery-card .thumb { aspect-ratio: 4/3; background: #ddd9c9; overflow: hidden; display: block; }
.gallery-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-card .label {
  display: block;              /* an inline span won't grow the card for a 2-line title */
  padding: 0.7rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.35;
  flex: 1 0 auto;
}
.gallery-card .label small { display: block; color: var(--muted); font-size: 0.74rem; margin-top: 0.25rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.75rem; }
.photo-grid a { display: block; aspect-ratio: 1; background: #ddd9c9; border-radius: 2px; overflow: hidden; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid a:hover img { opacity: 0.85; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--charcoal);
  color: #b9b9b9;
  font-family: var(--sans);
  font-size: 0.82rem;
  padding: 2.25rem 1.25rem;
  margin-top: 3rem;
}
.site-footer .inner { max-width: var(--wrap); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.site-footer a { color: #dcdcdc; text-decoration: underline; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { margin: 0 0 0.5rem; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8e8e8e; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.25rem; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--navy); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* --------------------------------------------------------------- mobile */
@media (max-width: 44rem) {
  body { font-size: 16px; }
  .masthead-inner { padding: 0.75rem 1rem; }
  .nav { width: 100%; margin-left: 0; }
  .brand { font-size: 1.3rem; }
  .wrap { padding: 1.5rem 1rem 3rem; }
  .page-title { font-size: 1.55rem; }
  .post-header .page-title { font-size: 1.7rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .year-card ul { columns: 1; }
  figure.wp-caption.alignright, figure.wp-caption.alignleft,
  .alignright, .alignleft { float: none; margin: 1.5rem 0; }
}

@media print {
  .masthead, .nav, .site-footer, .pagination, .post-nav, .archive-note { display: none; }
  body { background: #fff; font-size: 12pt; }
  a { color: #000; text-decoration: none; }
}

/* ------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(18, 22, 31, 0.975);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 3.5rem 1rem 4.5rem;
}
.lightbox.is-open { display: flex; }
body.lb-locked { overflow: hidden; }

.lb-stage {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}
.lb-img {
  max-width: min(100%, 1400px);
  max-height: calc(100vh - 9rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  background: #1a1f2a;
}
.lightbox.is-loading .lb-img { opacity: 0.35; transition: opacity 0.15s; }

.lb-meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: #b6bcc9;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.lb-meta a { color: #dfe4ee; text-decoration: underline; }
.lb-meta a:hover { color: #fff; }

.lb-close, .lb-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #eef1f6;
  cursor: pointer;
  border-radius: 50%;
  line-height: 1;
  font-family: var(--sans);
  transition: background 0.12s, transform 0.12s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.2); }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.lb-close {
  top: 1rem; right: 1rem;
  width: 2.6rem; height: 2.6rem;
  font-size: 1.6rem;
}
.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3.2rem; height: 3.2rem;
  font-size: 2.1rem;
}
.lb-nav:hover { transform: translateY(-50%) scale(1.06); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-nav[hidden] { display: none; }

.photo-grid a { cursor: zoom-in; }

@media (max-width: 44rem) {
  .lightbox { padding: 3.25rem 0.5rem 4rem; }
  .lb-nav { width: 2.6rem; height: 2.6rem; font-size: 1.7rem; }
  .lb-prev { left: 0.4rem; }
  .lb-next { right: 0.4rem; }
  .lb-img { max-height: calc(100vh - 8rem); }
}

/* ------------------------------------------------- grouped gallery index */
.gallery-group { margin-bottom: 3rem; }
.gallery-group > h2 {
  font-size: 1.35rem;
  font-weight: normal;
  color: var(--navy);
  margin: 0 0 0.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.gallery-group > p.group-note {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.5rem 0 1.25rem;
}
