/*
Theme Name: Woman 2407
Theme URI: https://thewoman2407.wordpress.com
Author: Shreya
Author URI: https://thewoman2407.wordpress.com
Description: A bold, magazine-style blog theme in lavender and purple hues. Built for long-form writing on society, books and travel — with a featured hero, post grid, author sidebar and a built-in dark mode.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: woman2407
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready, editor-style
*/

:root {
  --bg: #faf8fd;
  --bg-alt: #efe8f9;
  --text: #2e1f47;
  --text-muted: #6f5f8a;
  --accent: #8b5cf6;
  --accent-dark: #6d28d9;
  --border: #ded0f2;
  --card-bg: #ffffff;
  --font-display: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --radius: 4px;
}

[data-theme="dark"] {
  --bg: #150f22;
  --bg-alt: #201736;
  --text: #ede7fb;
  --text-muted: #b3a3d6;
  --accent: #b794f6;
  --accent-dark: #d6bcfa;
  --border: #382a54;
  --card-bg: #1c1430;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; display: block; }

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Top utility bar ===== */
.top-bar {
  background: var(--text);
  color: var(--bg);
}
[data-theme="dark"] .top-bar { background: #0c0817; }
.top-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.4rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.top-bar-inner a { color: var(--bg); opacity: 0.85; }
.top-bar-inner a:hover { color: var(--accent); opacity: 1; }

/* ===== Header / Brand ===== */
.site-header {
  border-bottom: 3px solid var(--text);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.brand span { color: var(--accent); }
.brand:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  width: 2.25rem;
  height: 2.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.theme-toggle:hover { border-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: 0.25rem;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

/* ===== Category bar ===== */
.category-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.nav-links {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 0.8rem 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 3px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== Hero / Featured ===== */
.hero {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  color: var(--accent);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 60ch;
  margin: 0;
}

/* ===== Post grid ===== */
.section-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--text);
  display: inline-block;
  padding-bottom: 0.35rem;
  margin: 2.5rem 0 1.5rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.post-card {
  background: var(--card-bg);
  border-top: 3px solid var(--text);
  padding: 1.25rem 0 0;
  transition: border-color 0.15s ease;
}
.post-card:hover { border-top-color: var(--accent); }

.card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.9rem;
}

.post-body img {
  border-radius: var(--radius);
  margin: 1.5rem auto;
  max-width: 100%;
  height: auto;
}
.post-body ul, .post-body ol { margin: 0 0 1.2rem 1.2rem; }
.post-body li { margin-bottom: 0.4rem; }

.search-results {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.search-results li { margin-bottom: 0.6rem; }
.search-results a { font-size: 0.9rem; font-weight: 700; }
.search-results .sr-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: uppercase;
}

.hero h1 a { color: var(--text); }
.hero h1 a:hover { color: var(--accent); }

.post-meta {
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.post-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--accent); }

.post-card p.excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 0.85rem;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-alt);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-right: 0.4rem;
  text-transform: uppercase;
}

.read-more {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
}
.read-more:hover { color: var(--accent-dark); }

/* ===== Single post ===== */
.post {
  padding: 2.5rem 0 4rem;
  max-width: 760px;
  margin: 0 auto;
}
.post-header { margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; }
.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0.4rem 0;
  letter-spacing: -0.02em;
}
.post-body { font-size: 1.08rem; }
.post-body p { margin: 0 0 1.2rem; }
.post-body h2 {
  font-family: var(--font-display);
  font-weight: 800;
  margin-top: 2rem;
}
.post-body blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.25rem 1.25rem;
  color: var(--text-muted);
  font-style: italic;
  font-size: 1.15rem;
}
.post-body code {
  background: var(--bg-alt);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-nav {
  border-top: 3px solid var(--text);
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===== About page ===== */
.page-content { padding: 2.5rem 0 4rem; max-width: 760px; margin: 0 auto; }
.page-content h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.page-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  margin: 1.75rem 0 0.75rem;
}
.about-photo {
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ===== Content layout (main + sidebar) ===== */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 3rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: sticky;
  top: 5.5rem;
}

.widget {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.widget-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  border-bottom: 2px solid var(--text);
  padding-bottom: 0.5rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}
.search-form input {
  flex: 1;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}
.search-form button {
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 0 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.search-form button:hover { background: var(--accent); }

.author-widget { text-align: left; }
.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--border);
  margin-bottom: 0.85rem;
}
.author-widget h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
}
.author-widget p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.author-photo {
  width: 100%;
  border-radius: var(--radius);
  margin: 0 0 1rem;
  border: 1px solid var(--border);
}

.author-links {
  display: flex;
  gap: 0.6rem;
}
.author-links a {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}
.author-links a:hover { border-color: var(--accent); }

.recent-posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.recent-posts li { padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.recent-posts li:last-child { border-bottom: none; padding-bottom: 0; }
.recent-posts a { font-weight: 700; font-size: 0.92rem; line-height: 1.35; display: block; }
.recent-posts a:hover { color: var(--accent); }
.recent-posts .rp-date { display: block; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; margin-top: 0.25rem; }

.category-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.category-list a {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}
.category-list a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* ===== Footer ===== */
.site-footer {
  border-top: 3px solid var(--text);
  padding: 2rem 0;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .post-grid { grid-template-columns: 1fr; }
  .category-bar .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: 0.5rem;
    display: none;
  }
  .category-bar .nav-links.open { display: flex; }
  .brand { font-size: 1.5rem; }
}

/* ===================================================================
   WordPress core classes
   =================================================================== */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--bg-alt);
  clip: auto !important;
  clip-path: none;
  color: var(--text);
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

.alignleft {
  float: left;
  margin: 0.4rem 1.5rem 1rem 0;
}
.alignright {
  float: right;
  margin: 0.4rem 0 1rem 1.5rem;
}
.aligncenter {
  clear: both;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100%; }

.wp-caption { max-width: 100%; margin-bottom: 1.5rem; }
.wp-caption img { margin: 0 auto; }
.wp-caption-text, .wp-element-caption, figcaption {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 0.5rem;
}

.sticky .post-card { border-top-color: var(--accent); }

.post-body .wp-block-image,
.post-body figure { margin: 1.5rem 0; }

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.post-body th, .post-body td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.7rem;
  text-align: left;
}
.post-body pre {
  background: var(--bg-alt);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
}

/* Widgets added via Appearance → Widgets */
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.widget ul li:last-child { border-bottom: none; }
.widget select, .widget input[type="text"], .widget input[type="search"] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 0 3rem;
}
.pagination .page-numbers {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.85rem;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Comments */
.comments-area {
  border-top: 3px solid var(--text);
  margin-top: 3rem;
  padding-top: 1.5rem;
}
.comments-area .comment-list { list-style: none; padding: 0; }
.comments-area .comment-list ol { list-style: none; }
.comments-area li.comment { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.comments-area .comment-author img { border-radius: 50%; margin-right: 0.5rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 0.75rem;
  font-family: inherit;
}
.comment-form input[type="submit"],
.wp-block-button__link {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1.4rem;
  font-weight: 700;
  cursor: pointer;
}
.comment-form input[type="submit"]:hover { background: var(--accent-dark); }

/* Admin bar offset for the sticky header */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

.entry-content > *:first-child { margin-top: 0; }

/* Theme-specific additions */
.post-hero-image {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
}
.post-tags {
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
a.tag { color: var(--text-muted); }
a.tag:hover { color: var(--accent); border-color: var(--accent); }

.category-list li,
.recent-posts li { border-bottom: none; }
.category-list { flex-direction: row; }

.nav-links .active-parent > a,
.nav-links li.current-menu-item > a {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.page-links { margin: 1.5rem 0; font-weight: 700; }

.site-header .custom-logo-link { display: inline-block; }
.site-header .custom-logo { max-height: 60px; width: auto; }
