/*
Theme Name: Nitesh Blog
Theme URI: https://niteshnarayan.com/
Author: Inclusione Technologies
Author URI: https://inclusione.tech/
Description: A warm, mobile-first personal blog theme for Nitesh Narayan — teacher, biker, blogger. Includes custom post types for Rides and Study Resources, and a styled comments template.
Version: 1.0.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nitesh-blog
Tags: blog, one-column, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   Nitesh Blog — WordPress Theme
   Mobile-first stylesheet
   Breakpoints: base (≤639px) → ≥640px (tablet) → ≥1024px (desktop)
   ============================================================ */

:root {
  --ink: #1a1208;
  --paper: #faf7f2;
  --cream: #f3ede2;
  --rust: #c4501a;
  --rust-dark: #8b3510;
  --rust-light: #f0d4c4;
  --slate: #2d3748;
  --mist: #6b7280;
  --gold: #d4a017;
  --gold-light: #fdf3d7;
  --engine: #1e293b;
  --tread: #374151;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(26,18,8,0.08);
  --shadow-lg: 0 12px 48px rgba(26,18,8,0.14);
  --space-section-y: 3.5rem;
  --space-section-x: 1.25rem;
  --container: 1200px;
  --tap: 44px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; }

/* WP screen-reader text */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); -webkit-clip-path: inset(50%); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; width: 1px; word-wrap: normal !important;
}

/* WP image alignment classes */
.alignleft  { float: left; margin: 0 1.25rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.25rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { margin-left: 0; margin-right: 0; max-width: 100%; }

/* ---------- Navigation ---------- */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: rgba(250,247,242,0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(196,80,26,0.12);
  transition: box-shadow 0.3s ease;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 900;
  color: var(--ink); text-decoration: none; letter-spacing: -0.5px;
}
.nav-logo span { color: var(--rust); font-style: italic; }

.nav-links {
  position: fixed; top: 0; right: 0;
  width: min(82vw,320px); height: 100vh; height: 100dvh;
  background: var(--paper);
  border-left: 1px solid var(--cream);
  box-shadow: -16px 0 48px rgba(26,18,8,0.15);
  padding: 5rem 1.5rem 2rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  list-style: none;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.6,.05,.28,.97);
  z-index: 99;
}
.nav-links.open { transform: translateX(0); }
.nav-links li { width: 100%; }
.nav-links a {
  display: flex; align-items: center;
  min-height: var(--tap);
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  border-radius: 10px;
  transition: background 0.18s, color 0.18s;
}
.nav-links a:hover, .nav-links a:focus-visible { background: var(--cream); color: var(--rust); }
.nav-links li.current-menu-item > a { color: var(--rust); }
.nav-cta a, a.nav-cta {
  background: var(--rust) !important; color: var(--white) !important;
  margin-top: 0.75rem; justify-content: center !important;
}
.nav-cta a:hover, a.nav-cta:hover { background: var(--rust-dark) !important; }

.nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(26,18,8,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 98;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

.hamburger {
  display: flex; flex-direction: column; gap: 5px;
  width: var(--tap); height: var(--tap);
  align-items: center; justify-content: center;
  z-index: 101;
}
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform 0.25s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  align-items: center;
  padding: 6rem 1.25rem 3rem;
  position: relative; overflow: hidden;
  text-align: center;
}
.hero-bg-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-family: 'Playfair Display', serif;
  font-size: clamp(10rem,40vw,20rem); font-weight: 900;
  color: rgba(196,80,26,0.04); line-height: 1;
  pointer-events: none; user-select: none; white-space: nowrap;
}
.hero-left { position: relative; z-index: 1; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--rust-light); color: var(--rust-dark);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.4rem 1rem; border-radius: 2rem; margin-bottom: 1.25rem;
  animation: fadeUp 0.6s ease both;
}
.hero-tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--rust); animation: pulse 2s infinite;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem,9vw,5.5rem);
  font-weight: 900; line-height: 1.05;
  color: var(--ink); margin-bottom: 0.85rem;
  animation: fadeUp 0.6s 0.1s ease both;
}
.hero h1 em { font-style: italic; color: var(--rust); }
.hero-sub {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.15rem,3.5vw,1.5rem);
  color: var(--mist); margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.2s ease both;
}
.hero-desc {
  font-size: clamp(0.95rem,2vw,1.05rem); line-height: 1.7;
  color: var(--tread); max-width: 480px;
  margin: 0 auto 2rem;
  animation: fadeUp 0.6s 0.3s ease both;
}
.hero-btns {
  display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center;
  animation: fadeUp 0.6s 0.4s ease both;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap);
  padding: 0.75rem 1.75rem;
  border-radius: 3rem;
  font-size: 0.9rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  letter-spacing: 0.02em;
}
.btn-primary { background: var(--rust); color: var(--white); }
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--rust-dark); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196,80,26,0.3);
}
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid rgba(26,18,8,0.2); }
.btn-outline:hover, .btn-outline:focus-visible {
  border-color: var(--rust); color: var(--rust); transform: translateY(-2px);
}

.hero-right {
  position: relative; z-index: 1;
  display: flex; justify-content: center; align-items: center;
  padding: 1rem;
  animation: fadeUp 0.8s 0.2s ease both;
}
.hero-image-frame {
  position: relative;
  width: min(320px, 80vw);
  aspect-ratio: 5 / 6;
}
.hero-image-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--cream) 0%, var(--rust-light) 100%);
  border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%;
  animation: morphBlob 8s ease-in-out infinite;
}
@keyframes morphBlob {
  0%,100% { border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%; }
  33%     { border-radius: 60% 40% 40% 60% / 40% 60% 40% 60%; }
  66%     { border-radius: 50% 50% 60% 40% / 60% 50% 50% 40%; }
}
.hero-avatar {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 82%; height: 82%;
  background: linear-gradient(180deg, #c4501a22 0%, var(--rust) 100%);
  border-radius: 30% 70% 70% 30% / 40% 40% 60% 60%;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4rem,14vw,7rem);
  font-weight: 900;
  color: rgba(255,255,255,0.25); user-select: none;
}
.hero-badge {
  position: absolute; background: var(--white);
  border-radius: 1rem; padding: 0.6rem 1rem;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.badge-icon { font-size: 1.2rem; }
.hero-badge-1 { top: 8%; right: -8px; animation: float 4s ease-in-out infinite; }
.hero-badge-2 { bottom: 12%; left: -12px; animation: float 4s 1.5s ease-in-out infinite; }
.hero-badge-3 { top: 55%; right: -4px; animation: float 4s 0.8s ease-in-out infinite; }

@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes fadeUp { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem; margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(26,18,8,0.1);
  animation: fadeUp 0.6s 0.5s ease both;
}
.stat-num { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem,4.5vw,1.8rem); font-weight: 900; color: var(--rust); }
.stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mist); }

/* ---------- Section primitives ---------- */
section { position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-eyebrow { font-family: 'Caveat', cursive; font-size: 1.15rem; color: var(--rust); margin-bottom: 0.4rem; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(1.9rem,5.5vw,3rem); font-weight: 900; line-height: 1.1; color: var(--ink); }
.section-sub { font-size: clamp(0.95rem,2vw,1rem); color: var(--mist); margin: 0.6rem auto 0; max-width: 540px; }
.container { max-width: var(--container); margin: 0 auto; }

/* ---------- Categories bar ---------- */
.categories-bar {
  background: var(--engine); padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 0.6rem;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.categories-bar::-webkit-scrollbar { display: none; }
.cat-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); white-space: nowrap; margin-right: 0.25rem; }
.cat-chip {
  padding: 0.55rem 1.1rem; border-radius: 2rem;
  font-size: 0.8rem; font-weight: 500;
  min-height: 36px; white-space: nowrap;
  border: 1.5px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75); background: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  display: inline-flex; align-items: center;
}
.cat-chip:hover, .cat-chip.active, .cat-chip:focus-visible {
  background: var(--rust); border-color: var(--rust); color: var(--white);
}

/* ---------- Blog section ---------- */
.blog-section { padding: var(--space-section-y) var(--space-section-x); background: var(--paper); }
.blog-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; max-width: var(--container); margin: 0 auto; }

.blog-card {
  background: var(--white); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer; text-align: left;
  display: block; color: inherit; text-decoration: none;
}
.blog-card:hover, .blog-card:focus-within {
  transform: translateY(-6px); box-shadow: var(--shadow-lg);
}
.card-image { aspect-ratio: 16/10; position: relative; overflow: hidden; background: var(--cream); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.blog-card:hover .card-image img { transform: scale(1.06); }
.card-image-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(3rem,12vw,5rem);
  transition: transform 0.5s ease;
}
.blog-card:hover .card-image-inner { transform: scale(1.06); }
.card-category {
  position: absolute; top: 0.75rem; left: 0.75rem;
  padding: 0.3rem 0.8rem; border-radius: 2rem;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--rust); color: var(--white);
  text-decoration: none;
}
.cat-biker, .cat-biker-life { background: var(--engine); color: var(--gold); }
.cat-teacher, .cat-teaching { background: #1a4d3a; color: #7fdb9e; }
.cat-blogger, .cat-thoughts { background: var(--rust); color: var(--white); }
.cat-study { background: #1e3a5f; color: #93c5fd; }
.cat-life, .cat-life-travel { background: #4a1d5f; color: #d8b4fe; }

.card-body { padding: 1.2rem; }
.card-date { font-size: 0.72rem; color: var(--mist); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.card-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--ink); margin-bottom: 0.6rem; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--rust); }
.card-excerpt { font-size: 0.9rem; line-height: 1.6; color: var(--mist); margin-bottom: 1rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-read-time { font-size: 0.72rem; color: var(--mist); }
.card-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.blog-card:hover .card-arrow { background: var(--rust); color: var(--white); }
.card-arrow svg { width: 16px; height: 16px; }

.pagination-wrap { margin-top: 2.5rem; display: flex; justify-content: center; }
.pagination-wrap .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 40px;
  padding: 0 0.75rem; margin: 0 0.2rem;
  border-radius: 2rem;
  background: var(--white); color: var(--ink);
  border: 1.5px solid rgba(26,18,8,0.1);
  font-size: 0.85rem; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.pagination-wrap .page-numbers:hover,
.pagination-wrap .page-numbers.current {
  background: var(--rust); color: var(--white); border-color: var(--rust);
}

/* ---------- Biker section ---------- */
.biker-section {
  padding: var(--space-section-y) var(--space-section-x);
  background: var(--engine); color: var(--white);
  position: relative; overflow: hidden;
}
.biker-section::before {
  content: '🏍'; position: absolute; right: -2rem; top: 50%;
  transform: translateY(-50%); font-size: clamp(10rem,30vw,20rem);
  opacity: 0.04; pointer-events: none;
}
.biker-inner {
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
  align-items: center;
}
.biker-section .section-title { color: var(--white); }
.biker-section .section-sub { color: rgba(255,255,255,0.6); }
.biker-section .section-eyebrow { color: var(--gold); }

.ride-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.ride-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 1.1rem;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  cursor: pointer; text-align: left; color: inherit;
  text-decoration: none; display: block;
}
.ride-card:hover, .ride-card:focus-visible {
  background: rgba(212,160,23,0.15); border-color: var(--gold); transform: translateY(-3px);
}
.ride-emoji { font-size: 1.7rem; margin-bottom: 0.6rem; }
.ride-title { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 0.3rem; }
.ride-meta { font-size: 0.72rem; color: rgba(255,255,255,0.5); }
.ride-km { font-family: 'Caveat', cursive; font-size: 1.3rem; color: var(--gold); font-weight: 700; margin-top: 0.35rem; }
.biker-stats {
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem;
}
.biker-stat-num { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem,5vw,2rem); font-weight: 900; color: var(--gold); }
.biker-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.4); margin-top: 2px; }

/* ---------- Study Hub ---------- */
.study-section { padding: var(--space-section-y) var(--space-section-x); background: var(--cream); }
.study-inner { max-width: var(--container); margin: 0 auto; }
.study-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.9rem; }
.study-card {
  background: var(--white); border-radius: 18px;
  padding: 1.5rem 1rem; text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  border: 2px solid transparent;
  text-decoration: none; color: inherit;
  display: block;
}
.study-card:hover, .study-card:focus-visible {
  transform: translateY(-5px); border-color: var(--rust); box-shadow: var(--shadow-lg);
}
.study-icon { font-size: 2.2rem; margin-bottom: 0.7rem; display: block; }
.study-subject { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 0.3rem; }
.study-count { font-size: 0.75rem; color: var(--mist); margin-bottom: 0.85rem; }
.study-tag { display: inline-block; padding: 0.25rem 0.7rem; background: var(--gold-light); color: var(--rust-dark); border-radius: 2rem; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }

/* ---------- Gallery ---------- */
.gallery-section { padding: var(--space-section-y) var(--space-section-x); background: var(--paper); }
.gallery-inner { max-width: var(--container); margin: 0 auto; }
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; gap: 0.65rem; }
.gallery-item { border-radius: 14px; overflow: hidden; cursor: pointer; position: relative; transition: transform 0.3s; }
.gallery-item:hover { transform: scale(0.98); }
.gallery-item:nth-child(1) { grid-column: span 2; }
.gallery-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: clamp(2rem,8vw,3rem); transition: transform 0.5s; }
.gallery-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item:hover .gallery-img img { transform: scale(1.05); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  opacity: 1; transition: opacity 0.3s;
  display: flex; align-items: flex-end; padding: 0.75rem;
  color: var(--white); font-size: 0.8rem; font-weight: 500;
}

/* ---------- About ---------- */
.about-section { padding: var(--space-section-y) var(--space-section-x); background: var(--rust); color: var(--white); }
.about-inner { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; text-align: center; }
.about-avatar {
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 4px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem; font-weight: 900;
  color: rgba(255,255,255,0.3); margin: 0 auto;
  overflow: hidden;
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-title { font-family: 'Playfair Display', serif; font-size: clamp(1.7rem,5.5vw,2.8rem); font-weight: 900; line-height: 1.15; color: var(--white); margin-bottom: 1rem; }
.about-title em { font-style: italic; color: var(--gold); }
.about-body { font-size: clamp(0.95rem,2vw,1.05rem); line-height: 1.75; color: rgba(255,255,255,0.9); margin-bottom: 1.2rem; }
.about-roles { display: flex; gap: 0.55rem; flex-wrap: wrap; justify-content: center; }
.role-pill { padding: 0.5rem 1rem; border-radius: 2rem; font-size: 0.8rem; font-weight: 600; border: 2px solid rgba(255,255,255,0.3); color: var(--white); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.role-pill:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }

/* ---------- Newsletter ---------- */
.newsletter-section { padding: var(--space-section-y) var(--space-section-x); background: var(--gold-light); }
.newsletter-inner { max-width: 600px; margin: 0 auto; text-align: center; }
.newsletter-form { display: flex; flex-direction: column; border-radius: 1rem; background: var(--white); box-shadow: var(--shadow-lg); overflow: hidden; }
.newsletter-input { flex: 1; padding: 0.95rem 1.25rem; border: none; outline: none; font-family: 'DM Sans', sans-serif; font-size: 0.95rem; background: transparent; color: var(--ink); min-height: var(--tap); }
.newsletter-input::placeholder { color: var(--mist); }
.newsletter-btn { padding: 0.95rem 2rem; background: var(--rust); color: var(--white); border: none; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; min-height: var(--tap); transition: background 0.2s; white-space: nowrap; }
.newsletter-btn:hover, .newsletter-btn:focus-visible { background: var(--rust-dark); }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--ink); color: rgba(255,255,255,0.6); padding: 3rem 1.25rem 2rem; }
.footer-inner { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 2rem; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 900; color: var(--white); margin-bottom: 0.6rem; }
.footer-logo span { color: var(--rust); font-style: italic; }
.footer-tagline { font-family: 'Caveat', cursive; font-size: 1rem; color: rgba(255,255,255,0.4); margin-bottom: 1rem; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.social-link {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 1rem;
  transition: background 0.2s, border-color 0.2s;
  border: 1px solid rgba(255,255,255,0.1);
}
.social-link:hover, .social-link:focus-visible { background: var(--rust); border-color: var(--rust); }
.footer-col h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; display: inline-block; padding: 0.2rem 0; }
.footer-col ul li a:hover { color: var(--rust); }
.footer-bottom {
  max-width: var(--container); margin: 2rem auto 0;
  padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 0.5rem;
  align-items: center; text-align: center;
  font-size: 0.78rem;
}
.footer-bottom a { color: var(--rust); text-decoration: none; }

/* ---------- Single post / page ---------- */
.single-wrap { padding: 7rem 1.25rem 4rem; max-width: 760px; margin: 0 auto; }
.single-meta-top { display: flex; gap: 0.75rem; align-items: center; font-size: 0.78rem; color: var(--mist); margin-bottom: 1rem; flex-wrap: wrap; }
.single-title { font-family: 'Playfair Display', serif; font-size: clamp(1.9rem,6vw,3.2rem); font-weight: 900; line-height: 1.1; color: var(--ink); margin-bottom: 1rem; }
.single-title em { color: var(--rust); font-style: italic; }
.single-featured { margin: 1.5rem 0 2rem; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.single-featured img { width: 100%; height: auto; display: block; }
.single-content { font-size: 1.05rem; line-height: 1.85; color: var(--tread); }
.single-content p { margin-bottom: 1.25rem; }
.single-content h2 { font-family: 'Playfair Display', serif; font-size: 1.7rem; margin: 2rem 0 1rem; color: var(--ink); }
.single-content h3 { font-family: 'Playfair Display', serif; font-size: 1.35rem; margin: 1.5rem 0 0.75rem; color: var(--ink); }
.single-content blockquote { border-left: 4px solid var(--rust); padding: 0.5rem 0 0.5rem 1.25rem; margin: 1.5rem 0; font-style: italic; color: var(--ink); background: var(--cream); border-radius: 0 12px 12px 0; }
.single-content a { color: var(--rust); text-decoration: underline; text-underline-offset: 3px; }
.single-content ul, .single-content ol { margin: 0 0 1.25rem 1.5rem; }
.single-content li { margin-bottom: 0.4rem; }
.single-content img { border-radius: 14px; margin: 1rem 0; }
.single-content code { background: var(--cream); padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.9em; }
.single-content pre { background: var(--ink); color: var(--paper); padding: 1rem; border-radius: 12px; overflow-x: auto; margin: 1.25rem 0; }

.post-nav {
  display: grid; grid-template-columns: 1fr; gap: 0.75rem;
  margin: 3rem 0 2rem;
}
.post-nav a {
  display: block; padding: 1rem 1.25rem; background: var(--cream); border-radius: 14px;
  text-decoration: none; color: var(--ink); transition: background 0.2s, transform 0.2s;
}
.post-nav a:hover { background: var(--rust-light); transform: translateY(-2px); }
.post-nav .label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--mist); display: block; margin-bottom: 0.25rem; }

/* ---------- Comments ---------- */
.comments-area {
  margin: 3rem 0 0;
  padding: 2rem 1.25rem;
  background: var(--paper);
  border-radius: 20px;
  border: 1px solid var(--cream);
}
.comments-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 900; color: var(--ink);
  margin-bottom: 1.5rem;
}
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .comment, .comment-list .pingback { margin-bottom: 1.5rem; }
.comment-list .children { list-style: none; padding-left: 1.25rem; margin-top: 1rem; border-left: 2px solid var(--cream); }
.comment-body {
  background: var(--white); padding: 1.25rem;
  border-radius: 14px; box-shadow: var(--shadow);
  position: relative;
}
.comment-meta { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.75rem; }
.comment-author .avatar { border-radius: 50%; width: 44px; height: 44px; }
.comment-author .fn { font-weight: 700; font-size: 0.95rem; color: var(--ink); font-style: normal; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 0.75rem; color: var(--mist); }
.comment-metadata a { color: inherit; text-decoration: none; }
.comment-content { font-size: 0.95rem; line-height: 1.7; color: var(--tread); }
.comment-content p { margin-bottom: 0.65rem; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { margin-top: 0.5rem; }
.reply .comment-reply-link {
  display: inline-flex; align-items: center;
  font-size: 0.78rem; font-weight: 600;
  color: var(--rust); text-decoration: none;
  padding: 0.35rem 0.9rem; border-radius: 2rem;
  background: var(--cream);
  transition: background 0.2s, color 0.2s;
}
.reply .comment-reply-link:hover { background: var(--rust); color: var(--white); }
.bypostauthor > .comment-body { border-left: 3px solid var(--rust); }

.comment-respond { margin-top: 2rem; }
.comment-reply-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 1rem; color: var(--ink); }
.comment-reply-title small { font-size: 0.8rem; margin-left: 0.5rem; font-family: 'DM Sans', sans-serif; font-weight: 400; }
.comment-reply-title small a { color: var(--rust); text-decoration: none; }
.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mist); margin-bottom: 0.4rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--cream);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem;
  background: var(--white); color: var(--ink);
  min-height: var(--tap);
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 1rem;
}
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--rust); box-shadow: 0 0 0 3px rgba(196,80,26,0.15); }
.comment-form .form-submit { margin-top: 0.5rem; }
.comment-form .submit {
  background: var(--rust); color: var(--white);
  border: none; padding: 0.8rem 2rem;
  border-radius: 2rem;
  font-size: 0.9rem; font-weight: 600;
  min-height: var(--tap); cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.comment-form .submit:hover { background: var(--rust-dark); transform: translateY(-2px); }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; color: var(--mist); margin-bottom: 1rem; }
.comment-form-cookies-consent input { margin-top: 0.25rem; }
.comments-closed { color: var(--mist); font-size: 0.9rem; text-align: center; padding: 1.5rem 0; }
.no-comments { color: var(--mist); font-size: 0.95rem; margin-bottom: 1.5rem; }

/* ---------- Page (generic) ---------- */
.page-wrap { padding: 7rem 1.25rem 4rem; max-width: 760px; margin: 0 auto; }
.page-title { font-family: 'Playfair Display', serif; font-size: clamp(2rem,6vw,3rem); font-weight: 900; color: var(--ink); margin-bottom: 1.5rem; }

/* ---------- Archive ---------- */
.archive-wrap { padding: 7rem 1.25rem 4rem; max-width: var(--container); margin: 0 auto; }
.archive-header { text-align: center; margin-bottom: 2.5rem; }
.archive-eyebrow { font-family: 'Caveat', cursive; font-size: 1.15rem; color: var(--rust); margin-bottom: 0.4rem; }
.archive-title { font-family: 'Playfair Display', serif; font-size: clamp(1.9rem,5.5vw,3rem); font-weight: 900; line-height: 1.1; color: var(--ink); }
.archive-description { color: var(--mist); margin-top: 0.6rem; max-width: 540px; margin-left: auto; margin-right: auto; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   ≥ 640px — tablet portrait
   ============================================================ */
@media (min-width: 640px) {
  :root { --space-section-y: 4.5rem; --space-section-x: 2rem; }
  nav.site-nav { padding: 1rem 2rem; }
  .blog-grid { grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
  .study-grid { grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
  .gallery-grid { grid-template-columns: repeat(3,1fr); grid-auto-rows: 170px; }
  .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .ride-cards { grid-template-columns: repeat(2,1fr); gap: 1rem; }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .newsletter-form { flex-direction: row; border-radius: 3rem; }
  .newsletter-btn { border-radius: 0 3rem 3rem 0; }
  .single-wrap, .page-wrap { padding: 8rem 2rem 5rem; }
  .archive-wrap { padding: 8rem 2rem 5rem; }
  .post-nav { grid-template-columns: 1fr 1fr; }
  .comments-area { padding: 2.5rem 2rem; }
}

/* ============================================================
   ≥ 1024px — desktop
   ============================================================ */
@media (min-width: 1024px) {
  :root { --space-section-y: 6rem; --space-section-x: 4rem; }
  nav.site-nav { padding: 1.2rem 4rem; }
  .hamburger { display: none; }
  .nav-links {
    position: static; width: auto; height: auto;
    background: transparent; border: none; box-shadow: none;
    padding: 0; flex-direction: row; gap: 2rem; align-items: center;
    transform: none; transition: none;
  }
  .nav-links a {
    min-height: auto; padding: 0.4rem 0;
    font-size: 0.875rem; color: var(--mist);
    border-radius: 0;
    white-space: nowrap;                 /* keeps "Study Hub" on one line */
  }
  .nav-links a:hover, .nav-links a:focus-visible { background: transparent; color: var(--rust); }
  .nav-cta a, a.nav-cta {
    padding: 0.55rem 1.25rem !important;
    border-radius: 2rem !important;
    margin-top: 0 !important;
  }
  .nav-backdrop { display: none; }

  .hero { grid-template-columns: 1fr 1fr; padding: 7.5rem 4rem 3rem; text-align: left; gap: 3rem; } /* extra top padding clears the fixed nav (~4.4rem tall) */
  .hero-bg-text { top: 50%; left: -2rem; transform: translateY(-50%); font-size: 20rem; }
  .hero-desc { margin: 0 0 2.5rem; }
  .hero-btns { justify-content: flex-start; }
  .hero-stats { grid-template-columns: repeat(3, max-content); gap: 2.5rem; }
  .hero-image-frame { width: 420px; height: 520px; aspect-ratio: auto; }
  .hero-badge-1 { top: 15%; right: -20px; }
  .hero-badge-2 { bottom: 20%; left: -30px; }
  .hero-badge-3 { top: 55%; right: -15px; }

  .categories-bar { padding: 1.5rem 4rem; gap: 1rem; }
  .cat-label { font-size: 0.7rem; }

  .blog-grid { grid-template-columns: repeat(3,1fr); gap: 2rem; }
  .blog-card.featured { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; }
  .blog-card.featured .card-image { aspect-ratio: unset; min-height: 300px; }
  .blog-card.featured .card-title { font-size: 1.5rem; }
  .card-body { padding: 1.5rem; }
  .card-title { font-size: 1.2rem; }

  .biker-inner { grid-template-columns: 1.2fr 1fr; gap: 5rem; }
  .biker-section { padding: 6rem 4rem; }
  .biker-stats { gap: 2.5rem; }
  .biker-section .section-header { text-align: left; }
  .biker-section .section-sub { margin-left: 0; }

  .study-grid { grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
  .study-card { padding: 2rem 1.5rem; }
  .study-icon { font-size: 2.5rem; }
  .study-subject { font-size: 1.1rem; }

  .gallery-grid { grid-template-columns: repeat(4,1fr); grid-template-rows: repeat(2,200px); gap: 1rem; }
  .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .gallery-item:nth-child(4) { grid-column: span 2; grid-row: span 1; }
  .gallery-overlay { opacity: 0; padding: 1rem; font-size: 0.85rem; }
  .gallery-item:hover .gallery-overlay { opacity: 1; }

  .about-inner { grid-template-columns: 1fr 2fr; gap: 5rem; text-align: left; }
  .about-avatar { width: 280px; height: 280px; font-size: 5rem; }
  .about-roles { justify-content: flex-start; }

  footer.site-footer { padding: 4rem; }
  .single-wrap, .page-wrap { padding: 9rem 2rem 5rem; }
}

/* ≥ 1280px polish */
@media (min-width: 1280px) {
  .hero { padding: 7.5rem 6rem 3rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
