/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  color: #1a1a1a;
  background: #fff;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-heading, Georgia, serif);
  color: var(--primary);
  line-height: 1.25;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 2rem 0 1rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 0.75rem; }
p { margin-bottom: 1.25rem; }
ul, ol { margin: 0 0 1.25rem 1.5rem; }
li { margin-bottom: 0.4rem; }
strong { font-weight: 600; color: #111; }

/* ===== LAYOUT ===== */
.section-inner, .header-inner, .footer-inner, .page-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.logo-text {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.site-nav { display: flex; gap: 2rem; }
.site-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.site-nav a:hover { color: #fff; text-decoration: none; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: var(--primary);
  color: #fff;
  padding: 3rem 0 2.5rem;
}
.page-header h1 { color: #fff; }
.page-header p { color: rgba(255,255,255,0.8); margin: 0.5rem 0 0; font-size: 1.05rem; }

/* ===== HOME HERO ===== */
.home-hero {
  background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, #000) 100%);
  color: #fff;
  padding: 5rem 0 4rem;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}
.hero-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-inner h1 { color: #fff; margin-bottom: 1rem; }
.hero-sub { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin-bottom: 2rem; }
.hero-author { text-align: center; }
.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin: 0 auto 1rem;
}
.hero-author-name { color: #fff; font-weight: 600; font-size: 1rem; }
.hero-author-title { color: rgba(255,255,255,0.7); font-size: 0.85rem; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.88; text-decoration: none; color: #fff; }
.btn-outline {
  display: inline-block;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.85rem; }

/* ===== POSTS SECTION ===== */
.home-posts, .blog-archive { padding: 4rem 0; }
.section-heading {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.posts-grid--full { grid-template-columns: repeat(3, 1fr); }
.all-posts-link { text-align: center; margin-top: 1rem; }

/* ===== POST CARD ===== */
.post-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.card-image-wrap { display: block; overflow: hidden; aspect-ratio: 16/9; }
.card-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card-image-wrap:hover .card-image { transform: scale(1.04); }
.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-date { font-size: 0.78rem; color: #888; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.card-title { font-size: 1.05rem; margin: 0 0 0.75rem; line-height: 1.35; }
.card-title a { color: var(--primary); text-decoration: none; }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-title--sm { font-size: 1rem; }
.card-excerpt { font-size: 0.9rem; color: #555; line-height: 1.6; flex: 1; margin-bottom: 1rem; }
.card-link { font-size: 0.85rem; font-weight: 600; color: var(--accent); }

/* ===== HOME ABOUT ===== */
.home-about { background: #f7f7f7; padding: 4rem 0; }
.about-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}
.about-photo { width: 100%; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.12); }
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.about-text h2 { margin-top: 0; margin-bottom: 1rem; }
.about-text p { color: #444; }

/* ===== POST PAGE ===== */
.post-hero {
  min-height: 380px;
  background: var(--primary) center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.post-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}
.post-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}
.back-link { color: rgba(255,255,255,0.75); font-size: 0.85rem; text-decoration: none; }
.back-link:hover { color: #fff; text-decoration: none; }
.post-category {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.75rem;
}
.post-meta-top { margin-bottom: 1rem; }
.post-title { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 1rem; }
.post-byline { display: flex; align-items: center; gap: 0.75rem; }
.byline-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.byline-name { display: block; color: #fff; font-weight: 600; font-size: 0.9rem; }
.byline-date { display: block; color: rgba(255,255,255,0.7); font-size: 0.8rem; }

.post-body-wrap {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}
.post-body { min-width: 0; }
.post-body h2 { color: var(--primary); margin: 2.5rem 0 1rem; font-size: 1.4rem; }
.post-body h3 { color: #333; margin: 1.75rem 0 0.75rem; font-size: 1.1rem; }
.post-body p { color: #333; font-size: 1.05rem; line-height: 1.8; }
.post-body ul, .post-body ol { margin-left: 1.5rem; color: #333; font-size: 1.05rem; }
.post-body li { margin-bottom: 0.5rem; }
.post-body strong { color: #111; }

/* ===== SIDEBAR ===== */
.post-sidebar { position: sticky; top: 80px; }
.sidebar-author {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border-top: 4px solid var(--accent);
}
.sidebar-avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 3px solid var(--accent); }
.sidebar-author h3 { font-size: 1rem; margin: 0 0 0.25rem; }
.sidebar-title { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-bottom: 0.75rem; }
.sidebar-bio { font-size: 0.85rem; color: #555; margin-bottom: 1rem; }
.sidebar-link { font-size: 0.85rem; font-weight: 600; color: var(--primary); }

/* ===== ABOUT PAGE ===== */
.about-page { padding: 4rem 0; }
.about-page-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3.5rem;
  align-items: start;
}
.about-full-photo { width: 100%; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.12); margin-bottom: 1.5rem; }
.about-contact-box {
  background: #f7f7f7;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  border-top: 3px solid var(--accent);
}
.about-contact-name { font-weight: 700; font-size: 1rem; color: var(--primary); }
.about-contact-title { font-size: 0.82rem; color: #666; margin-bottom: 1rem; }
.about-page-text h2 { margin-top: 0; }
.about-page-text p { color: #444; font-size: 1.02rem; line-height: 1.8; }

/* ===== CONTACT PAGE ===== */
.contact-page { padding: 4rem 0; }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}
.contact-info h2 { margin-top: 0; }
.contact-title { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 1rem; }
.contact-email { margin-top: 1rem; font-weight: 600; }
.contact-form .form-group { margin-bottom: 1.25rem; }
.contact-form label { display: block; font-size: 0.875rem; font-weight: 600; color: #333; margin-bottom: 0.4rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }

/* ===== FOOTER ===== */
.site-footer { background: var(--primary); color: rgba(255,255,255,0.8); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: start; gap: 2rem; margin-bottom: 2rem; }
.footer-logo { display: block; color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: 0.5rem; }
.footer-about p { font-size: 0.88rem; max-width: 300px; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.88rem; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-base { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.25rem; }
.footer-base p { font-size: 0.8rem; color: rgba(255,255,255,0.5); text-align: center; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .posts-grid, .posts-grid--full { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-author { display: none; }
  .post-body-wrap { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
  .about-split, .about-page-inner, .contact-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .posts-grid, .posts-grid--full { grid-template-columns: 1fr; }
  .site-nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--primary); padding: 1rem 1.5rem; gap: 1rem; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-inner { flex-direction: column; }
}
