/*
Theme Name: Sudhanshu Blog Theme
Theme URI: https://example.com/
Author: OpenAI Codex
Author URI: https://openai.com/
Description: A WordPress blog-only companion theme styled to match Sudhanshu Maurya's personal website.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: sudhanshu-blog-theme
*/

:root {
  --bg: #ffffff;
  --surface: #f8f7f4;
  --surface-strong: #eef4f1;
  --surface-soft: #f4efe7;
  --text: #0f172a;
  --muted: #5b6473;
  --muted-strong: #243041;
  --border: rgba(15, 23, 42, 0.09);
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --accent-warm: #b7791f;
  --shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.05);
  --shadow: 0 24px 55px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.12);
  --radius: 24px;
  --radius-sm: 18px;
  --container: 1140px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  line-height: 1.7;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.06), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(183, 121, 31, 0.06), transparent 22%),
    linear-gradient(180deg, #fcfcfb 0%, #f7f5f1 34%, #ffffff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 40%);
  opacity: 0.45;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.section {
  padding: 5.25rem 0;
}

.page-section {
  padding: 4.75rem 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 118, 110, 0.12);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 7px rgba(15, 118, 110, 0.1);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 1rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 4.35rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

ul,
ol {
  margin: 0 0 1.2rem 1.25rem;
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  font-weight: 700;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.nav {
  margin-left: auto;
}

.nav-links,
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-links a,
.nav-menu a {
  position: relative;
  color: var(--muted-strong);
  font-size: 0.96rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active,
.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_parent > a,
.nav-menu .current_page_item > a {
  color: var(--text);
}

.nav-links a.active::after,
.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-menu a:hover::after,
.nav-menu a:focus-visible::after,
.nav-menu .current-menu-item > a::after,
.nav-menu .current_page_parent > a::after,
.nav-menu .current_page_item > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.55rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

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

.menu-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.menu-toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: currentColor;
  margin: 0.22rem auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0.95rem 1.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.button:hover,
.button:focus-visible,
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
}

.button-primary {
  background: linear-gradient(135deg, #0f172a, var(--accent));
  color: #fff;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.18);
}

.button-secondary {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.page-hero {
  max-width: 760px;
  padding-top: 1rem;
}

.card {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.blog-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.blog-card {
  overflow: hidden;
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.blog-card-content {
  padding: 1.5rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-main {
  padding: 2rem 0 4rem;
}

.article-shell {
  display: grid;
  gap: 2rem;
}

.article-cover {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.6rem;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-content {
  padding: 0;
}

.article-content p,
.article-content li {
  font-size: 1.02rem;
}

.article-quote {
  margin: 1.5rem 0;
  padding: 1.4rem 1.5rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 247, 244, 0.98));
  color: var(--muted-strong);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.article-aside {
  padding: 1.6rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow);
  align-self: start;
}

.simple-list {
  margin-left: 1rem;
}

.article-back {
  margin-top: 1.25rem;
}

.site-main .entry-content,
.site-main .page-content {
  max-width: 760px;
}

.archive-empty,
.not-found {
  max-width: 720px;
  padding: 3rem 0;
}

.pagination,
.posts-navigation,
.post-navigation {
  margin-top: 2.5rem;
}

.pagination .nav-links,
.posts-navigation .nav-links,
.post-navigation .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pagination .page-numbers,
.posts-navigation a,
.post-navigation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.pagination .current {
  background: linear-gradient(135deg, #0f172a, var(--accent));
  border-color: transparent;
  color: #fff;
}

.site-footer {
  padding: 2.75rem 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-link {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-3px);
  color: var(--accent);
  border-color: rgba(15, 118, 110, 0.24);
}

.social-link svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  .article-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  .footer-wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 767px) {
  body::before {
    opacity: 0.18;
  }

  .menu-toggle {
    display: inline-block;
  }

  .nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.6rem);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links,
  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
