/*
Theme Name: Eric Journal
Description: A responsive, dark grey and blue journal matching Eric Tedjamulia's CV.
Version: 1.0.1
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: eric-journal
*/
:root {
  color-scheme: light;
  --cp-bg: #f7f4ef;
  --cp-bg-elevated: #fcfbf8;
  --cp-surface: #ffffff;
  --cp-surface-soft: #f5f5f5;
  --cp-border: #dedede;
  --cp-border-strong: #919191;
  --cp-text: #242424;
  --cp-text-muted: #5c5c5c;
  --cp-text-soft: #6f6f6f;
  --cp-accent: #b11f4b;
  --cp-accent-hover: #9a1a41;
  --cp-accent-soft: rgba(177, 31, 75, 0.08);
  --cp-accent-fg: #ffffff;
  --cp-success: #16a34a;
  --cp-danger: #dc2626;
  --cp-warning: #f59e0b;
  --cp-link: #0078d4;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  --cp-overlay: rgba(255, 255, 255, 0.8);
  --cp-panel: rgba(255, 255, 255, 0.86);
  --cp-panel-strong: rgba(255, 255, 255, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.55);
  --cp-highlight: rgba(177, 31, 75, 0.12);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --cp-bg: #3d3b3a;
  --cp-bg-elevated: #343231;
  --cp-surface: #292929;
  --cp-surface-soft: #2e2e2e;
  --cp-border: #474747;
  --cp-border-strong: #5f5f5f;
  --cp-text: #dedede;
  --cp-text-muted: #919191;
  --cp-text-soft: #b0b0b0;
  --cp-accent: #fd8ea1;
  --cp-accent-hover: #fb7b91;
  --cp-accent-soft: rgba(253, 142, 161, 0.14);
  --cp-accent-fg: #1a1a1a;
  --cp-success: #4ade80;
  --cp-danger: #f87171;
  --cp-warning: #fbbf24;
  --cp-link: #4da6ff;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --cp-overlay: rgba(41, 41, 41, 0.88);
  --cp-panel: rgba(41, 41, 41, 0.72);
  --cp-panel-strong: rgba(41, 41, 41, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.04);
  --cp-highlight: rgba(253, 142, 161, 0.12);
}
:root {
  --cp-bg: #f3f5f8;
  --cp-bg-elevated: #fafbfd;
  --cp-accent: #1b5db4;
  --cp-accent-hover: #144a91;
  --cp-accent-soft: rgba(27, 93, 180, 0.08);
  --cp-highlight: rgba(27, 93, 180, 0.14);
}
html[data-theme="dark"],
.editor-styles-wrapper {
  color-scheme: dark;
  --cp-bg: #1b2028;
  --cp-bg-elevated: #222a35;
  --cp-surface: #202732;
  --cp-surface-soft: #252e3a;
  --cp-border: #35404e;
  --cp-border-strong: #718096;
  --cp-text: #e9edf4;
  --cp-text-muted: #a7b3c5;
  --cp-text-soft: #b7c1d0;
  --cp-accent: #89b9ff;
  --cp-accent-hover: #a9ccff;
  --cp-accent-soft: rgba(137, 185, 255, 0.10);
  --cp-accent-fg: #142237;
  --cp-highlight: rgba(137, 185, 255, 0.18);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, .editor-styles-wrapper {
  margin: 0;
  background: var(--cp-bg);
  color: var(--cp-text);
  font-family: "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--cp-highlight); }
a { color: var(--cp-accent); text-underline-offset: .25em; }
a:hover { color: var(--cp-accent-hover); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--cp-accent); outline-offset: 4px; }
.wrap { width: min(1080px, calc(100% - 96px)); margin-inline: auto; }
.site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(220px, 280px); align-items: center; gap: 24px; min-height: 112px; border-bottom: 1px solid var(--cp-border); }
.site-name { font-weight: 600; color: var(--cp-text); text-decoration: none; }
.site-name span { color: var(--cp-text-muted); font-weight: 400; }
.site-nav, .nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links { padding: 0; margin: 0; list-style: none; flex-wrap: wrap; }
.nav-links a { min-height: 44px; display: inline-flex; align-items: center; color: var(--cp-text-soft); font-size: 14px; text-decoration: none; }
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--cp-accent); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; color: var(--cp-text); background: var(--cp-bg-elevated); border: 1px solid var(--cp-border); border-radius: 50%; }
.theme-toggle:hover { color: var(--cp-accent); border-color: var(--cp-accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.sun { display: none; }
html[data-theme="dark"] .sun { display: block; }
html[data-theme="dark"] .moon { display: none; }
main { min-height: 60vh; padding-bottom: 64px; }
.archive-header { padding-top: 24px; max-width: 760px; }
.archive-header h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; }
h1, h2, h3 { color: var(--cp-text); line-height: 1.2; overflow-wrap: anywhere; }
h1 { margin: 0 0 24px; font-size: clamp(40px, 6vw, 72px); letter-spacing: -.045em; font-weight: 650; }
h2 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.025em; font-weight: 600; }
.archive-description { color: var(--cp-text-soft); margin-top: 8px; }
.archive-description:empty { display: none; }
.search-form { display: flex; gap: 8px; min-width: 0; margin: 0; }
.search-form input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; background: var(--cp-bg-elevated); color: var(--cp-text); border: 1px solid var(--cp-border); border-radius: .625rem; }
.search-form input::placeholder { color: var(--cp-text-soft); }
.search-form button { min-height: 44px; padding: 8px 16px; background: var(--cp-accent); color: var(--cp-accent-fg); border: 1px solid var(--cp-accent); border-radius: .625rem; font-size: 14px; font-weight: 600; }
.search-form button:hover { background: var(--cp-accent-hover); }
.post-list, .reading { max-width: 760px; }
.journal-post { padding: 40px 0; border-top: 1px solid var(--cp-border); }
.post-list > .journal-post:first-child { border-top: 0; }
.reading .journal-post { padding-top: 64px; border: 0; }
.post-header h2 { margin: 12px 0 20px; }
.post-header h2 a { color: inherit; text-decoration: none; }
.post-header h2 a:hover { color: var(--cp-accent); }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: var(--cp-text-soft); font-size: 13px; }
.post-header h1 { font-size: clamp(32px, 5vw, 56px); margin-top: 20px; }
.post-excerpt { color: var(--cp-text-soft); }
.read-more { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; font-size: 14px; font-weight: 600; }
.featured-image { margin: 24px 0; }
.featured-image img { display: block; width: 100%; height: auto; border-radius: 16px; }
.entry-content { overflow-wrap: anywhere; }
.entry-content > * { max-width: 100%; }
.entry-content :is(h2,h3,h4) { margin-top: 1.75em; }
.entry-content :is(img,video,iframe), .editor-styles-wrapper img { max-width: 100%; }
.entry-content img { height: auto; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content blockquote { margin-inline: 0; padding: 4px 24px; color: var(--cp-text-soft); border-left: 3px solid var(--cp-accent); }
.entry-content pre { padding: 20px; border: 1px solid var(--cp-border); border-radius: .625rem; overflow-x: auto; background: var(--cp-bg-elevated); color: var(--cp-text); }
.entry-content code { font-family: Consolas, "Courier New", Courier, monospace; font-size: .9em; }
.entry-content figcaption { color: var(--cp-text-soft); font-size: 13px; }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content :is(th,td) { padding: 10px; border: 1px solid var(--cp-border); }
.entry-content .wp-block-separator { border-color: var(--cp-border); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.post-tags a { padding: 4px 12px; background: var(--cp-bg-elevated); border: 1px solid var(--cp-border); border-radius: 6px; font-size: 12px; }
.empty-state { padding: 32px; border: 1px solid var(--cp-border); border-radius: 16px; max-width: 760px; background: var(--cp-bg-elevated); }
.empty-state h2 { font-size: 24px; margin: 0 0 12px; }
.empty-state p { margin: 0 0 12px; color: var(--cp-text-soft); }
.navigation { max-width: 760px; margin-top: 32px; }
.nav-links .page-numbers { padding: 8px 14px; border: 1px solid var(--cp-border); border-radius: .625rem; }
.pagination .nav-links { gap: 8px; }
.post-navigation .nav-links { justify-content: space-between; align-items: start; gap: 24px; }
.post-navigation .nav-links > div { max-width: 45%; overflow-wrap: anywhere; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 28px 0 36px; border-top: 1px solid var(--cp-border); font-size: 12px; color: var(--cp-text-soft); }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 16px; left: 16px; z-index: 100001; padding: 12px 20px; background: var(--cp-surface); border: 1px solid var(--cp-accent); }
@media (max-width: 800px) {
  .wrap { width: calc(100% - 48px); }
  .site-header { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; gap: 16px; padding-block: 20px; }
  .site-header .search-form { grid-column: 1 / -1; }
  .site-nav, .nav-links { gap: 20px; }
  .reading .journal-post { padding-top: 40px; }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { gap: 12px; }
  .site-name { font-size: 14px; }
  .site-name span { display: none; }
  .site-nav, .nav-links { gap: 16px; }
  .empty-state { padding: 24px; }
}
@media print {
  .site-nav, .search-form, .site-footer nav, .navigation { display: none; }
  .wrap { width: 100%; }
  main { min-height: 0; }
  .site-header { min-height: 64px; }
}
