/*
Theme Name: Modern Journal
Theme URI: https://example.com/modern-journal
Author: OpenAI
Description: Een modern, snel en responsive WordPress blog theme met Gutenberg-ondersteuning en dark mode.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: modern-journal
Tags: blog, news, one-column, two-columns, custom-logo, featured-images, full-site-editing, translation-ready
*/

:root {
  --mj-bg: #f7f7f5;
  --mj-surface: #ffffff;
  --mj-text: #161616;
  --mj-muted: #6b6b6b;
  --mj-border: #e6e6e2;
  --mj-accent: #6c4cff;
  --mj-accent-2: #4b2fe0;
  --mj-radius: 18px;
  --mj-max: 1180px;
  --mj-content: 760px;
  --mj-shadow: 0 12px 40px rgba(20, 20, 20, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mj-bg);
  color: var(--mj-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
.container { width: min(calc(100% - 40px), var(--mj-max)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--mj-bg) 88%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--mj-border) 75%, transparent);
}
.admin-bar .site-header { top: 32px; }
.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.site-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-logo { max-height: 42px; width: auto; }
.site-title {
  font-size: 21px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.04em;
  text-decoration: none;
}
.site-description { color: var(--mj-muted); font-size: 13px; margin: 3px 0 0; }
.primary-nav ul {
  display: flex; align-items: center; gap: 24px; list-style: none; padding: 0; margin: 0;
}
.primary-nav a { text-decoration: none; font-weight: 650; font-size: 15px; }
.primary-nav a:hover, .current-menu-item > a { color: var(--mj-accent); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .menu-toggle {
  width: 42px; height: 42px; border: 1px solid var(--mj-border);
  background: var(--mj-surface); border-radius: 50%; cursor: pointer;
  display: inline-grid; place-items: center; color: var(--mj-text);
}
.menu-toggle { display: none; }

.hero { padding: 86px 0 52px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 26px; align-items: stretch; }
.hero-copy {
  background: var(--mj-text); color: #fff; border-radius: 28px; padding: clamp(30px, 6vw, 70px);
  min-height: 430px; display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; position: relative;
}
.hero-copy::after {
  content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: var(--mj-accent); right: -100px; top: -100px; opacity: .8; filter: blur(2px);
}
.eyebrow { color: var(--mj-accent); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-copy .eyebrow { color: #cfc6ff; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(42px, 6vw, 76px); line-height: .98; letter-spacing: -.065em; max-width: 800px; margin: 18px 0; position: relative; z-index: 1; }
.hero p { color: #c8c8c8; max-width: 640px; margin: 0; position: relative; z-index: 1; }
.hero-card {
  border-radius: 28px; overflow: hidden; background: var(--mj-surface); box-shadow: var(--mj-shadow);
  border: 1px solid var(--mj-border); display: flex; flex-direction: column;
}
.hero-card-image { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero-card-body { padding: 26px; }
.hero-card h2 { font-size: 28px; line-height: 1.1; letter-spacing: -.04em; margin: 8px 0 10px; }
.meta { color: var(--mj-muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.meta a { text-decoration: none; }
.meta .dot::before { content: "•"; margin-right: 14px; color: #aaa; }

.section { padding: 42px 0; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 25px; }
.section-heading h2 { font-size: 34px; line-height: 1.1; letter-spacing: -.05em; margin: 0; }
.section-heading a { font-weight: 700; color: var(--mj-accent); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  background: var(--mj-surface); border: 1px solid var(--mj-border); border-radius: var(--mj-radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--mj-shadow); }
.post-card-image { aspect-ratio: 16/10; width: 100%; object-fit: cover; }
.post-card-placeholder { aspect-ratio: 16/10; background: linear-gradient(135deg, #181818, #6c4cff); }
.post-card-body { padding: 22px; }
.post-card h3 { font-size: 23px; line-height: 1.18; letter-spacing: -.035em; margin: 9px 0 12px; }
.post-card h3 a { text-decoration: none; }
.post-card-excerpt { color: var(--mj-muted); font-size: 15px; line-height: 1.65; margin: 0 0 18px; }

.content-area { padding: 70px 0; }
.content-narrow { width: min(100%, var(--mj-content)); margin-inline: auto; }
.archive-header { padding-bottom: 38px; border-bottom: 1px solid var(--mj-border); margin-bottom: 38px; }
.archive-title { font-size: clamp(42px, 6vw, 68px); line-height: 1; letter-spacing: -.06em; margin: 0 0 14px; }
.archive-description { color: var(--mj-muted); max-width: 700px; }

.single-header { padding: 55px 0 30px; }
.single-title { font-size: clamp(44px, 7vw, 82px); line-height: .98; letter-spacing: -.065em; margin: 14px 0 20px; }
.single-featured { width: 100%; max-height: 650px; object-fit: cover; border-radius: 24px; margin: 25px 0 42px; }
.entry-content { font-size: 19px; }
.entry-content > * { max-width: var(--mj-content); margin-inline: auto; }
.entry-content > .alignwide { max-width: var(--mj-max); }
.entry-content > .alignfull { max-width: none; }
.entry-content h2, .entry-content h3, .entry-content h4 { line-height: 1.15; letter-spacing: -.04em; margin-top: 1.8em; }
.entry-content blockquote {
  border-left: 4px solid var(--mj-accent); margin-block: 2em; padding: 8px 0 8px 24px;
  font-size: 25px; line-height: 1.4;
}
.entry-content pre { overflow-x: auto; padding: 20px; border-radius: 12px; background: #181818; color: #fff; }
.entry-content code { font-size: .9em; }
.post-tags { max-width: var(--mj-content); margin: 42px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags a {
  padding: 7px 12px; background: var(--mj-surface); border: 1px solid var(--mj-border);
  border-radius: 999px; text-decoration: none; font-size: 13px;
}

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 50px; }
.pagination a, .pagination span { padding: 9px 14px; border: 1px solid var(--mj-border); border-radius: 10px; text-decoration: none; background: var(--mj-surface); }
.pagination .current { background: var(--mj-text); color: #fff; }

.site-footer { margin-top: 60px; border-top: 1px solid var(--mj-border); padding: 55px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 45px; }
.footer-title { font-size: 24px; font-weight: 800; letter-spacing: -.04em; margin: 0 0 10px; }
.footer-heading { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.footer-links ul { list-style: none; padding: 0; margin: 12px 0 0; }
.footer-links li { margin: 7px 0; }
.footer-links a { color: var(--mj-muted); text-decoration: none; }
.footer-bottom { margin-top: 45px; padding-top: 20px; border-top: 1px solid var(--mj-border); color: var(--mj-muted); font-size: 13px; display:flex; justify-content:space-between; gap:20px; }

.search-form { display: flex; gap: 10px; margin-top: 25px; }
.search-form label { flex: 1; }
.search-field { width: 100%; padding: 13px 16px; border: 1px solid var(--mj-border); border-radius: 12px; background: var(--mj-surface); color: var(--mj-text); }
.search-submit { border: 0; border-radius: 12px; background: var(--mj-accent); color: #fff; padding: 0 20px; font-weight: 700; cursor: pointer; }

.screen-reader-text { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.wp-block-button__link { border-radius: 999px; }
.wp-block-image img { border-radius: 16px; }
.wp-caption-text { color: var(--mj-muted); font-size: 13px; }
.sticky { outline: 2px solid color-mix(in srgb, var(--mj-accent) 35%, transparent); outline-offset: 3px; }

body.dark-mode {
  --mj-bg: #101010;
  --mj-surface: #181818;
  --mj-text: #f4f4f2;
  --mj-muted: #a5a5a0;
  --mj-border: #2a2a2a;
  --mj-shadow: 0 12px 40px rgba(0,0,0,.22);
}
body.dark-mode .hero-copy { background: #242424; }
body.dark-mode .pagination .current { background: #fff; color: #111; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .primary-nav { display: none; position: absolute; left: 20px; right: 20px; top: 70px; background: var(--mj-surface); border: 1px solid var(--mj-border); border-radius: 16px; padding: 18px; box-shadow: var(--mj-shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 13px; }
  .menu-toggle { display: inline-grid; }
}
@media (max-width: 620px) {
  .container { width: min(calc(100% - 28px), var(--mj-max)); }
  .header-inner { min-height: 68px; }
  .hero { padding-top: 38px; }
  .hero-copy { min-height: 390px; padding: 28px; border-radius: 22px; }
  .hero-card { border-radius: 22px; }
  .post-grid, .footer-grid { grid-template-columns: 1fr; }
  .content-area { padding-top: 40px; }
  .single-header { padding-top: 25px; }
  .single-featured { border-radius: 16px; }
  .footer-bottom { flex-direction: column; }
  .search-form { flex-direction: column; }
  .search-submit { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Real homepage slider */
.hero-slider-section { padding-top: 55px; }
.hero-slider { position: relative; }
.hero-slides { position: relative; overflow: hidden; border-radius: 28px; min-height: 520px; background: #181818; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .55s ease; }
.hero-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; z-index: 2; }
.hero-slide-image-link { position: absolute; inset: 0; display: block; }
.hero-slide-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 7s ease; }
.hero-slide.is-active .hero-slide-image { transform: scale(1.035); }
.hero-slide-placeholder { background: linear-gradient(135deg, #181818, #6c4cff); }
.hero-slide-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.43) 52%, rgba(0,0,0,.08) 100%); }
.hero-slide-content { position: absolute; z-index: 3; left: clamp(28px, 6vw, 78px); bottom: 70px; width: min(680px, calc(100% - 56px)); color: #fff; }
.hero-slide-content .eyebrow { color: #cfc6ff; }
.hero-slide-content h1 { font-size: clamp(42px, 6vw, 76px); line-height: .98; letter-spacing: -.065em; margin: 14px 0; }
.hero-slide-content h1 a { text-decoration: none; }
.hero-slide-content p { color: #ddd; max-width: 620px; margin: 0 0 16px; }
.hero-slide-meta { color: #ddd; font-size: 13px; display: flex; gap: 14px; margin-bottom: 20px; }
.hero-slide-meta .dot::before { content: "•"; margin-right: 14px; color: #aaa; }
.hero-read-more { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: 9px 15px; color: #fff; text-decoration: none; font-size: 13px; font-weight: 750; transition: background .2s ease, color .2s ease; }
.hero-read-more:hover { background: #fff; color: #111; }
.hero-slider-arrow { position: absolute; z-index: 6; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.24); color: #fff; border-radius: 50%; cursor: pointer; backdrop-filter: blur(6px); }
.hero-slider-arrow:hover { background: rgba(0,0,0,.5); }
.hero-slider-prev { left: 20px; }
.hero-slider-next { right: 20px; }
.hero-slider-controls { position: absolute; z-index: 6; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.hero-slider-dot { width: 9px; height: 9px; border: 0; padding: 0; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.hero-slider-dot.is-active { background: #fff; transform: scale(1.35); }
@media (max-width: 620px) {
  .hero-slider-section { padding-top: 25px; }
  .hero-slides { min-height: 520px; border-radius: 20px; }
  .hero-slide-content { bottom: 62px; left: 24px; width: calc(100% - 48px); }
  .hero-slide-content h1 { font-size: 42px; }
  .hero-slide-content p { font-size: 15px; line-height: 1.55; }
  .hero-slider-arrow { width: 40px; height: 40px; top: 24px; transform: none; }
  .hero-slider-prev { left: auto; right: 70px; }
  .hero-slider-next { right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-slide-image, .hero-read-more, .hero-slider-dot { transition: none !important; }
}
