/* Hammed Afenifere — Personal Site */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&display=swap');

/* ─── Reset ─────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── Base ───────────────────────────────── */
:root {
  --ink:       #111111;
  --ink-muted: #555555;
  --ink-faint: #999999;
  --border:    #e4e4e4;
  --bg:        #ffffff;
  --accent:    #111111;
  --accent-hover: #444444;
  --max-w:     680px;
  --gap:       40px;
}

html.dark {
  --ink:       #f3f3f3;
  --ink-muted: #a0a0a0;
  --ink-faint: #777777;
  --border:    #2a2a2a;
  --bg:        #0c0c0c;
  --accent:    #ffffff;
  --accent-hover: #dddddd;
}

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

body {
  font-family: 'Sora', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 96px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ─── Links ──────────────────────────────── */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.65;
}

/* ─── Nav ────────────────────────────────── */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

nav a {
  color: var(--ink-muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
nav a:hover,
nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  text-decoration: none;
  opacity: 1;
  font-weight: 600;
}

/* ─── Headshot ──────────────────────────── */
.headshot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 14px;
  border: 1.5px solid var(--border);
}

/* ─── Headings ───────────────────────────── */
h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.15;
}

h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
  margin-top: 48px;
}

/* ─── Body text ──────────────────────────── */
p {
  font-size: 15px;
  font-weight: 300;
  margin-bottom: 16px;
  color: var(--ink-muted);
  max-width: 62ch;
}

strong {
  font-weight: 700;
}

/* ─── HR ─────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 44px 0;
}

/* ─── Blog entries ───────────────────────── */
.entry {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.15s;
}
.entry:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.entry:hover { opacity: 0.75; }

/* ─── Compact entry (homepage list) ─────── */
.entry.compact {
  margin-bottom: 10px;
  padding-bottom: 10px;
}
.entry.compact .entry-title { font-size: 15px; margin-bottom: 3px; }
.entry.compact .entry-date  { margin-bottom: 2px; }
.entry.compact .entry-excerpt { font-size: 13px; }

.entry-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.entry-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 7px;
  letter-spacing: -0.01em;
}
.entry-title a {
  color: var(--ink);
}
.entry-title a:hover {
  opacity: 0.6;
  text-decoration: none;
}

.entry-excerpt {
  font-size: 14px;
  color: var(--ink-muted);
  font-weight: 300;
  line-height: 1.65;
}

/* ─── See-all link ───────────────────────── */
.see-all {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 1px;
  transition: opacity 0.15s;
}
.see-all:hover {
  opacity: 0.45;
  text-decoration: none;
}

/* ─── Draft / coming-soon pill ──────────── */
.draft-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #bbb;
  background: #f5f5f5;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 8px;
  position: relative;
  top: -1px;
}

/* ─── Featured-in compact line ───────────── */
.featured-in {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-muted);
  line-height: 1.8;
  max-width: none;
}
.featured-in a {
  font-weight: 500;
  color: var(--ink);
}
.featured-in .see-all {
  display: inline;
  margin-top: 0;
  margin-left: 6px;
  font-size: 13px;
}

/* ─── List items ─────────────────────────── */
.list-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 300;
  color: #444;
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f2;
  line-height: 1.5;
  transition: opacity 0.15s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { opacity: 0.7; }

.list-item a { font-weight: 400; color: var(--ink); }

/* ─── Tag pill ───────────────────────────── */
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-faint);
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-right: 6px;
}

/* ─── Source label ───────────────────────── */
.source {
  font-size: 12px;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ─── Stat callout ───────────────────────── */
.stat-row {
  display: flex;
  gap: 40px;
  margin: 32px 0;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-number {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.stat-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* ─── Gallery grid ───────────────────────── */
.gallery-intro {
  font-size: 15px;
  color: var(--ink-muted);
  font-weight: 300;
  margin-bottom: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
  cursor: pointer;
  aspect-ratio: 4/3;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item .gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.70) 0%, transparent 100%);
  color: #fff;
  padding: 28px 14px 14px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

.gallery-caption-event {
  font-weight: 600;
  font-size: 13px;
  display: block;
  margin-bottom: 2px;
}
.gallery-caption-date {
  opacity: 0.75;
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* Gallery placeholder (no photo) */
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  gap: 10px;
  padding: 20px;
  text-align: center;
}
.gallery-placeholder-icon {
  font-size: 28px;
  opacity: 0.3;
}
.gallery-placeholder-label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gallery-placeholder-sub {
  font-size: 11px;
  color: #aaa;
  font-weight: 300;
}

/* ─── Lightbox ───────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-info {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  font-size: 13px;
  opacity: 0.8;
  pointer-events: none;
}

/* ─── Footer ─────────────────────────────── */
footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
footer a { color: var(--ink-faint); }
footer a:hover { color: var(--ink); opacity: 1; }

.footer-links {
  display: flex;
  gap: 16px;
}

/* ─── Responsive ─────────────────────────── */
@media (max-width: 520px) {
  body { padding: 36px 20px 72px; }
  h1 { font-size: 22px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .stat-row { gap: 24px; }
  footer { flex-direction: column; gap: 6px; }
}

/* ─── Theme Transitions ───────────────────── */
nav, hr, .entry, .list-item, footer, .like-button, .theme-toggle-btn, .faq-item {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.15s ease, transform 0.2s ease;
}

/* ─── Theme Toggle Button ────────────────── */
.theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border-radius: 50%;
  outline: none;
}
.theme-toggle-btn:hover {
  color: var(--ink);
  background: rgba(128, 128, 128, 0.08);
}
html:not(.dark) .moon-icon { display: none; }
html.dark .sun-icon { display: none; }

/* ─── Like Button & Heart Animation ──────── */
.entry-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
}
.like-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  outline: none;
}
.like-button:hover {
  background: rgba(255, 77, 77, 0.05);
  border-color: #ff9999;
  color: #ff4d4d;
}
.like-button.liked {
  background: rgba(255, 77, 77, 0.08);
  border-color: #ff4d4d;
  color: #ff4d4d;
}
.like-button.liked .heart-icon {
  fill: #ff4d4d;
  stroke: #ff4d4d;
  animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.like-button:active {
  transform: scale(0.94);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ─── FAQ Section (AI & SEO Discoverability) ─ */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}
.faq-item {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(128, 128, 128, 0.02);
}
.faq-question {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.faq-answer {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 100%;
}

/* ─── Blog Post Detail Page ──────────────── */
.back-link {
  margin-bottom: 24px;
}
.back-link a {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}
.back-link a:hover {
  color: var(--ink);
  text-decoration: none;
}
.post-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.post-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.post-body {
  margin: 32px 0;
}
.coming-soon-card {
  padding: 24px;
  background: rgba(128, 128, 128, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.coming-soon-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--ink);
}
.coming-soon-card p {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}
.coming-soon-card p:last-child {
  margin-bottom: 0;
}
.post-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}

/* ─── Pagination Controls ────────────────── */
.pagination-container {
  display: flex;
  gap: 8px;
  margin-top: 32px;
  align-items: center;
  justify-content: flex-start;
}
.page-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-muted);
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}
.page-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: rgba(128, 128, 128, 0.04);
}
.page-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* ─── Split Layout (All Pages) ───────────── */
body.split-page {
  max-width: 960px;
}
.split-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 24px;
}
.sidebar-info {
  position: sticky;
  top: 40px;
}
.sidebar-info .headshot {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin-bottom: 20px;
  object-fit: cover;
  border: 1.5px solid var(--border);
}
.sidebar-info h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sidebar-bio {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-muted);
}
.sidebar-bio a {
  font-weight: 600;
}

/* Sidebar Stats vertical stacking */
.sidebar-info .stat-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0 0 0;
  border-top: 1px dashed var(--border);
  padding-top: 20px;
}
.sidebar-info .stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-info .stat-number {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}
.sidebar-info .stat-label {
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  body.split-page {
    max-width: 680px;
  }
  .split-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .sidebar-info {
    position: static;
  }
  .sidebar-info .stat-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 20px;
  }
}
