/*
Theme Name: Inkwell
Theme URI: https://example.com
Author: Your Name
Description: A clean, minimal WordPress blog theme with great ad placement. Fast, responsive, and beautifully typeset.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: inkwell
Tags: blog, minimal, clean, two-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ── Variables ── */
:root {
  --bg:       #f8f6f2;
  --surface:  #ffffff;
  --ink:      #1c1917;
  --muted:    #57534e;
  --faint:    #a8a29e;
  --accent:   #b45309;
  --accent-h: #92400e;
  --border:   #e7e5e4;
  --radius:   4px;
  --serif:    'Lora', Georgia, serif;
  --sans:     'DM Sans', -apple-system, sans-serif;
  --maxw:     1140px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-h); }
img, video { display: block; max-width: 100%; height: auto; }
h1,h2,h3,h4,h5,h6 { font-family: var(--serif); line-height: 1.25; letter-spacing: -.01em; }
p { margin-bottom: 1.2rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
blockquote { border-left: 3px solid var(--accent); padding: .75rem 0 .75rem 1.5rem; margin: 2rem 0; font-style: italic; color: var(--muted); }
hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ── Layout ── */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  padding-block: 3rem;
  align-items: start;
}
.no-sidebar .content-area { grid-template-columns: 1fr; max-width: 740px; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(248,246,242,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 1.5rem;
}
.site-title-link {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700;
  color: var(--ink); letter-spacing: -.03em; line-height: 1;
}
.site-title-link:hover { color: var(--accent); }
.site-tagline { display: block; font-size: .7rem; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; margin-top: .15rem; }

/* Nav */
.main-navigation ul { list-style: none; display: flex; gap: .2rem; }
.main-navigation a {
  font-size: .82rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: .35rem .8rem; border-radius: var(--radius); display: block;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--ink); background: var(--border); }

/* Hamburger */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: .4rem; flex-direction: column; gap: 5px;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: all .25s;
}

/* ── Featured Hero ── */
.featured-hero {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 2.5rem;
}
.featured-hero__img {
  background: linear-gradient(135deg,#292524,#78350f);
  min-height: 300px; position: relative; overflow: hidden;
}
.featured-hero__img img { width: 100%; height: 100%; object-fit: cover; opacity: .88; }
.featured-label {
  position: absolute; bottom: 1rem; left: 1rem;
  background: var(--accent); color: #fff;
  font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: .2rem .65rem; border-radius: 2rem;
}
.featured-hero__body {
  padding: 2.5rem 2rem; display: flex; flex-direction: column; justify-content: center;
}
.featured-hero__body h2 { font-size: clamp(1.3rem,2.5vw,2rem); margin: .5rem 0 .75rem; }
.featured-hero__body h2 a { color: var(--ink); }
.featured-hero__body h2 a:hover { color: var(--accent); }
.hero-excerpt { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }

/* ── Section Heading ── */
.section-head {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
}
.section-head h2 {
  font-family: var(--sans); font-size: .8rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.section-head::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Post Cards ── */
.posts-list { display: flex; flex-direction: column; gap: .5rem; }

.post-card {
  display: grid; grid-template-columns: 160px 1fr;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.07); transform: translateY(-1px); }

.post-card__thumb {
  background: linear-gradient(135deg,#e7e5e4,#d6d3d1);
  min-height: 130px; overflow: hidden;
}
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card__thumb img { transform: scale(1.04); }

.post-card__body { padding: 1.1rem 1.25rem; display: flex; flex-direction: column; justify-content: center; }
.post-card__title { font-size: 1.05rem; margin: .3rem 0 .4rem; line-height: 1.3; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--accent); }
.post-card__excerpt { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Category Label ── */
.post-cat { font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.post-cat:hover { color: var(--accent-h); }
.post-cat-wrap { display: block; margin-bottom: .2rem; }

/* ── Post Meta ── */
.post-meta { display: flex; flex-wrap: wrap; gap: .3rem .75rem; font-size: .77rem; color: var(--faint); align-items: center; }
.post-meta a { color: var(--faint); }
.post-meta a:hover { color: var(--accent); }
.post-meta .sep { opacity: .4; }

/* ── Ad Slots ── */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  background: #f1ede8; border: 1px dashed #d6cfc6;
  color: var(--faint); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
}
.ad-slot-rectangle { width: 300px; height: 250px; }
.ad-slot-infeed    { width: 100%; height: 90px; margin: .5rem 0; border-radius: var(--radius); }
.ad-slot-leaderboard { width: 728px; max-width: 100%; height: 90px; margin: .6rem auto; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 .5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .85rem; color: var(--muted);
  transition: all .2s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-inner { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 1.5rem; }

.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem; }
.widget-title { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }

.widget_recent_entries ul { list-style: none; padding: 0; margin: 0; }
.widget_recent_entries li { padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .87rem; line-height: 1.4; }
.widget_recent_entries li:last-child { border-bottom: none; padding-bottom: 0; }
.widget_recent_entries .post-date { display: block; font-size: .72rem; color: var(--faint); margin-top: .1rem; }

.widget_categories ul { list-style: none; padding: 0; margin: 0; }
.widget_categories li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .87rem; }
.widget_categories li:last-child { border-bottom: none; }

.widget_search .search-form { display: flex; gap: .4rem; }
.widget_search input[type="search"] { flex: 1; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--sans); font-size: .87rem; background: var(--bg); outline: none; transition: border-color .2s; }
.widget_search input[type="search"]:focus { border-color: var(--ink); }
.widget_search input[type="submit"] { padding: .5rem .85rem; background: var(--ink); color: var(--bg); border: none; border-radius: var(--radius); font-size: .82rem; cursor: pointer; transition: background .2s; }
.widget_search input[type="submit"]:hover { background: var(--accent); }

.widget_tag_cloud .tagcloud { display: flex; flex-wrap: wrap; gap: .35rem; }
.widget_tag_cloud a { font-size: .78rem !important; padding: .25rem .65rem; border: 1px solid var(--border); border-radius: 2rem; color: var(--muted); transition: all .2s; background: var(--bg); }
.widget_tag_cloud a:hover { border-color: var(--ink); color: var(--ink); }

/* ── Single Post ── */
.single-post-header { margin-bottom: 2rem; }
.single-post-cat { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .75rem; }
.single-post-title { font-size: clamp(1.7rem,4vw,2.7rem); margin-bottom: 1rem; }
.single-post-image { border-radius: var(--radius); overflow: hidden; margin-bottom: 2.5rem; border: 1px solid var(--border); }
.single-post-image img { width: 100%; max-height: 460px; object-fit: cover; }

.entry-content { font-size: 1.05rem; line-height: 1.85; }
.entry-content h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; }
.entry-content h3 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.entry-content a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.entry-content img { border-radius: var(--radius); margin: 1.5rem auto; border: 1px solid var(--border); }
.entry-content pre { background: var(--ink); color: #e7e5e4; padding: 1.25rem; border-radius: var(--radius); overflow-x: auto; font-size: .88rem; margin-bottom: 1.5rem; }
.entry-content code { background: var(--border); padding: .15rem .4rem; border-radius: 3px; font-size: .9em; }
.entry-content pre code { background: none; padding: 0; }

.ad-in-content { margin: 2rem auto; display: flex; justify-content: center; }

.post-tags { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.post-tags .label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: .5rem; }
.post-tags a { display: inline-block; font-size: .78rem; padding: .25rem .65rem; border: 1px solid var(--border); border-radius: 2rem; color: var(--muted); margin: .2rem; transition: all .2s; }
.post-tags a:hover { border-color: var(--ink); color: var(--ink); }

.author-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 2.5rem; }
.author-box .author-avatar { width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0; overflow: hidden; }
.author-box .author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box .author-name { font-family: var(--serif); font-size: 1rem; margin-bottom: .2rem; }
.author-box .author-bio { font-size: .87rem; color: var(--muted); }

.related-posts { margin-top: 3rem; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 1.25rem; }
.related-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.related-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.related-card__thumb { height: 130px; overflow: hidden; background: var(--border); }
.related-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-card__body { padding: .85rem 1rem; }
.related-card__cat { font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: .25rem; }
.related-card__title { font-size: .9rem; line-height: 1.35; }
.related-card__title a { color: var(--ink); }
.related-card__title a:hover { color: var(--accent); }

/* ── Comments ── */
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comments-title { font-size: 1.2rem; margin-bottom: 1.5rem; }
.comment-list { list-style: none; padding: 0; }
.comment { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.comment-author { font-size: .85rem; font-weight: 500; margin-bottom: .2rem; }
.comment-metadata { font-size: .75rem; color: var(--faint); margin-bottom: .6rem; }
.comment-content p { font-size: .92rem; margin-bottom: 0; }
.comment-form label { font-size: .85rem; font-weight: 500; display: block; margin-bottom: .3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea { width: 100%; padding: .55rem .85rem; border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--sans); font-size: .9rem; background: var(--bg); outline: none; margin-bottom: 1rem; transition: border-color .2s; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--ink); }
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form .form-submit input[type="submit"] { background: var(--ink); color: var(--bg); border: none; border-radius: var(--radius); padding: .6rem 1.5rem; font-family: var(--sans); font-size: .88rem; font-weight: 500; cursor: pointer; transition: background .2s; }
.comment-form .form-submit input[type="submit"]:hover { background: var(--accent); }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding-top: 3rem; }
.footer-widgets { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-site-title { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); display: block; margin-bottom: .5rem; }
.footer-site-title:hover { color: var(--accent); }
.footer-brand p { font-size: .85rem; color: var(--muted); max-width: 28ch; }
.footer-col h3 { font-family: var(--serif); font-size: .95rem; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer-col ul a { font-size: .85rem; color: var(--muted); }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding: 1rem 0; display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--faint); }
.footer-bottom ul { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0; }
.footer-bottom a { color: var(--faint); }
.footer-bottom a:hover { color: var(--accent); }

/* ── 404 ── */
.error-404 { text-align: center; padding: 6rem 1rem; }
.error-code { font-family: var(--serif); font-size: 8rem; line-height: 1; color: var(--border); }
.error-404 h1 { font-size: 1.8rem; margin: 1rem 0; }
.error-404 p { color: var(--muted); margin-bottom: 2rem; }
.btn { display: inline-block; background: var(--ink); color: var(--bg); padding: .6rem 1.5rem; border-radius: var(--radius); font-size: .88rem; font-weight: 500; transition: background .2s; }
.btn:hover { background: var(--accent); color: #fff; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .content-area { grid-template-columns: 1fr 260px; gap: 2rem; }
  .featured-hero { grid-template-columns: 1fr; }
  .featured-hero__img { min-height: 220px; }
  .footer-widgets { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .content-area { grid-template-columns: 1fr; }
  .sidebar-inner { position: static; }
  .post-card { grid-template-columns: 120px 1fr; }
  .footer-widgets { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: .4rem; text-align: center; }
  .related-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: flex; }
  .main-navigation {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 1rem;
    z-index: 199;
  }
  .main-navigation.toggled { display: block; }
  .main-navigation ul { flex-direction: column; gap: 0; }
  .main-navigation a { padding: .55rem .75rem; }
}
@media (max-width: 480px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card__thumb { min-height: 180px; }
}
