/*
Theme Name: Surbhikarn Studio
Theme URI: https://surbhikarn.com
Author: Surbhi Karn
Description: Brutalist editorial theme — Archivo display, Space Mono meta, cream/pink/lime palette, brick-shadow cards. Matches the studio.surbhikarn.com aesthetic.
Version: 1.0.0
Requires at least: 6.0
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: surbhikarn-studio
Tags: editorial, brutalist, two-columns, custom-menu, featured-image-header, custom-logo, threaded-comments, sticky-post
*/

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;700;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #fdf8f3;
  --ink: #0a0a0a;
  --pink: #ff2e88;
  --pink-soft: #ffd6e6;
  --lime: #d4ff3a;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Archivo', system-ui, -apple-system, Segoe UI, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); }
a:hover { color: var(--pink); }

.mono { font-family: 'Space Mono', monospace; letter-spacing: 0.15em; text-transform: uppercase; font-size: 0.75rem; }
.display { font-family: 'Archivo', sans-serif; font-weight: 900; letter-spacing: -0.04em; line-height: 0.9; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 4px solid var(--ink);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}
.site-branding { display: flex; align-items: center; gap: 0.75rem; }
.site-logo img { height: 40px; width: 40px; object-fit: contain; border: 2px solid var(--ink); padding: 4px; background: var(--ink); }
.site-title {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  margin: 0;
  line-height: 1;
}
.site-title a { text-decoration: none; color: var(--ink); }
.site-title a::after { content: "."; color: var(--pink); }
.site-description {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
  opacity: 0.7;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.main-nav a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
}
.main-nav a:hover,
.main-nav .current-menu-item a { background: var(--pink-soft); }

.nav-toggle {
  display: none;
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  padding: 0.4rem 0.8rem;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--pink);
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .main-nav { width: 100%; display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; border-top: 2px solid var(--ink); margin-top: 0.5rem; }
  .main-nav li { border-bottom: 2px solid var(--ink); }
  .main-nav a { display: block; padding: 0.75rem 0; }
}

/* ---------- Layout ---------- */
.site-content { padding: 3rem 0 4rem; }
.with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3rem;
}
@media (max-width: 960px) {
  .with-sidebar { grid-template-columns: 1fr; }
}

/* ---------- Section masthead (archive heros) ---------- */
.section-mast {
  margin-bottom: 2.5rem;
  border-bottom: 4px solid var(--ink);
  padding-bottom: 1.5rem;
}
.section-mast .kicker { color: var(--pink); }
.section-mast h1 {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.9;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin: 0.5rem 0 0;
}

/* ---------- Post cards (index/archive) ---------- */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 720px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
}

.post-card {
  background: #ffffff;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 1.5rem;
  position: relative;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.post-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.post-card:nth-child(3n+2) {
  background: var(--lime);
  box-shadow: 6px 6px 0 var(--pink);
}
.post-card:nth-child(3n+2):hover { box-shadow: 8px 8px 0 var(--pink); }
.post-card:nth-child(3n+3) { background: var(--pink-soft); }

.post-card .num {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}
.post-card .post-thumb {
  margin: 1rem 0;
  border: 2px solid var(--ink);
  overflow: hidden;
}
.post-card .post-thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.post-card h2 {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  margin: 0 0 0.75rem;
}
.post-card h2 a { text-decoration: none; color: var(--ink); }
.post-card h2 a:hover { color: var(--pink); }

.post-card .excerpt { font-size: 0.95rem; margin: 0.5rem 0 1rem; }

.post-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.post-meta .sep { color: var(--pink); opacity: 1; }
.post-meta a { color: inherit; text-decoration: none; }
.post-meta a:hover { color: var(--pink); }

.read-more {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--pink);
  transition: transform 0.08s ease, box-shadow 0.08s ease, color 0.08s ease;
}
.read-more:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--pink);
  color: var(--lime);
}

/* ---------- Single / page ---------- */
.entry-single {
  background: #ffffff;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 2rem;
}
@media (min-width: 720px) {
  .entry-single { padding: 3rem; }
}

.entry-header { margin-bottom: 2rem; border-bottom: 2px solid var(--ink); padding-bottom: 1.5rem; }
.entry-header .kicker { color: var(--pink); }
.entry-header h1 {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-size: clamp(2rem, 6vw, 4rem);
  margin: 0.5rem 0 1rem;
}

.featured-thumb {
  border: 2px solid var(--ink);
  margin-bottom: 2rem;
  overflow: hidden;
}
.featured-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.entry-content { font-size: 1.05rem; line-height: 1.7; }
.entry-content > * + * { margin-top: 1.1rem; }
.entry-content h2 {
  font-family: 'Archivo', sans-serif; font-weight: 900; letter-spacing: -0.03em;
  font-size: 1.8rem; margin-top: 2.5rem;
}
.entry-content h3 { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 1.3rem; margin-top: 2rem; }
.entry-content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.entry-content a:hover { background: var(--lime); }
.entry-content blockquote {
  border-left: 6px solid var(--pink);
  background: var(--pink-soft);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-weight: 700;
}
.entry-content code {
  background: var(--ink);
  color: var(--lime);
  padding: 0.1rem 0.4rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.9em;
}
.entry-content pre {
  background: var(--ink);
  color: var(--lime);
  padding: 1rem;
  overflow-x: auto;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--pink);
}
.entry-content pre code { background: transparent; padding: 0; }
.entry-content img { border: 2px solid var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
}
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav a {
  display: block;
  padding: 1rem;
  background: #ffffff;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--pink);
  text-decoration: none;
}
.post-nav a:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--pink); }
.post-nav .label { font-family: 'Space Mono', monospace; font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pink); }
.post-nav .title { font-weight: 700; margin-top: 0.25rem; }
.post-nav .next { text-align: right; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}
.pagination .page-numbers {
  padding: 0.6rem 0.9rem;
  background: #ffffff;
  border: 2px solid var(--ink);
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--lime); }
.pagination .page-numbers:hover { background: var(--pink); color: #ffffff; }

/* ---------- Sidebar / widgets ---------- */
.site-sidebar .widget {
  background: #ffffff;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.site-sidebar .widget-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.5rem;
  margin: 0 0 1rem;
}
.site-sidebar .widget-title::before { content: "// "; color: var(--pink); }
.site-sidebar ul { list-style: none; padding: 0; margin: 0; }
.site-sidebar li { padding: 0.3rem 0; border-bottom: 1px solid rgba(10,10,10,0.1); }
.site-sidebar li:last-child { border-bottom: none; }
.site-sidebar a { text-decoration: none; color: var(--ink); }
.site-sidebar a:hover { color: var(--pink); }

/* ---------- Forms ---------- */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
textarea,
select {
  border: 2px solid var(--ink);
  background: #ffffff;
  padding: 0.6rem 0.8rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  width: 100%;
  max-width: 100%;
}
textarea { min-height: 140px; }
button,
input[type="submit"] {
  background: var(--ink);
  color: #ffffff;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--pink);
  transition: transform 0.08s ease, box-shadow 0.08s ease, color 0.08s ease;
}
button:hover, input[type="submit"]:hover {
  transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--pink); color: var(--lime);
}

/* ---------- Comments ---------- */
.comments-section { margin-top: 3rem; }
.comments-section h2 {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 1.6rem;
}
.commentlist { list-style: none; padding: 0; }
.commentlist li {
  background: #ffffff;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.commentlist li ul.children { list-style: none; padding: 0; margin: 1rem 0 0 1rem; }
.commentlist .says { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #ffffff;
  border-top: 4px solid var(--ink);
  padding: 1.5rem 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer a { color: var(--lime); text-decoration: none; }
.site-footer a:hover { color: #ffffff; background: var(--pink); padding: 0 4px; }

/* ---------- Utility ---------- */
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px,1px,1px,1px);
  width: 1px; height: 1px; overflow: hidden;
}
.sticky .post-card::before {
  content: "★ PINNED";
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  background: var(--pink);
  color: #ffffff;
  padding: 2px 6px;
  position: absolute;
  top: -10px;
  left: 1rem;
}
