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

:root {
  /* Dark first */
  --bg:        #111111;
  --bg-hover:  #1a1a1a;
  --text:      #b5b5b5;
  --text-bold: #e8e8e8;
  --accent:    #c8956c;
  --border:    #222222;

  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans:  'Inter', -apple-system, sans-serif;

  --content-w: 700px;
  --feed-w:    900px;
}

[data-theme="light"] {
  --bg:        #f7f5f2;
  --bg-hover:  #edeae5;
  --text:      #4a4a4a;
  --text-bold: #1a1a1a;
  --accent:    #a06830;
  --border:    #e0ddd5;
}

/* ── Base ────────────────────────────────────── */
html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ── Typography ──────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--text-bold);
}

h1 { font-size: 3rem; line-height: 1.1; }
h2 { font-size: 1.6rem; line-height: 1.2; margin: 2rem 0 0.8rem; }

p { margin-bottom: 1.2em; }

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }

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

blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.5rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}

figure { margin: 2rem 0; }
figcaption {
  font-size: 0.78rem;
  color: var(--text);
  margin-top: 0.5rem;
  text-align: center;
}

/* ── Topbar ──────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border);
}

.topbar-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-bold);
  font-style: italic;
}
.topbar-name:hover { opacity: 0.7; text-decoration: none; }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.topbar-nav a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}
.topbar-nav a:hover { color: var(--text-bold); opacity: 1; text-decoration: none; }

/* ── Theme toggle ────────────────────────────── */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  padding: 0;
  line-height: 1;
}
.theme-toggle:hover { color: var(--text-bold); }

[data-theme="light"] .theme-toggle-light { display: none; }
[data-theme="light"] .theme-toggle-dark  { display: inline; }
:root:not([data-theme="light"]) .theme-toggle-light { display: inline; }
:root:not([data-theme="light"]) .theme-toggle-dark  { display: none; }

/* ── Home hero ───────────────────────────────── */
.home-hero {
  padding: 5rem 2rem 1rem;
  max-width: var(--feed-w);
  margin: 0 auto;
}
.home-hero h1 {
  font-size: 5rem;
  font-style: italic;
  letter-spacing: -0.02em;
}

/* ── Featured (first article, cinematic) ─────── */
.featured {
  display: block;
  position: relative;
  width: 100%;
  height: 75vh;
  overflow: hidden;
  color: #ffffff;
  margin-bottom: 0;
}
.featured:hover { opacity: 1; text-decoration: none; }
.featured img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.featured:hover img {
  transform: scale(1.03);
}
.featured-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4rem 3rem 3rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
}
.featured-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 500;
}
.featured-content h2 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  color: #ffffff;
  margin: 0.3rem 0 0.6rem;
  max-width: 700px;
  line-height: 1.1;
}
.featured-content p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  max-width: 550px;
  line-height: 1.6;
  margin: 0;
}

/* ── Stream (alternating side-by-side) ────────── */
.stream {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

.stream-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
}
.stream-item:first-child {
  border-top: 1px solid var(--border);
}
.stream-item:hover {
  text-decoration: none;
  opacity: 1;
}

.stream-item--flip .stream-image {
  order: 2;
}
.stream-item--flip .stream-text {
  order: 1;
}

.stream-image {
  overflow: hidden;
  border-radius: 3px;
}
.stream-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.stream-item:hover .stream-image img {
  transform: scale(1.03);
}

.stream-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 500;
}

.stream-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text-bold);
  line-height: 1.2;
  margin: 0.3rem 0 0.8rem;
}

.stream-excerpt {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 0.8rem;
}

.stream-date {
  font-size: 0.7rem;
  color: var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Article page ────────────────────────────── */
.article-cover {
  width: 100%;
  margin: 0;
}
.article-cover img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
}

.article-header {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

.article-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 500;
}

.article-header h1 {
  font-size: 2.8rem;
  margin: 0.4rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.article-subtitle {
  font-size: 1.05rem;
  color: var(--text);
  font-style: italic;
  font-weight: 300;
}

.article-date {
  display: block;
  font-size: 0.75rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1rem;
}

.article-body {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

.article-body h2 {
  margin-top: 3rem;
}

.article-footer {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
  border-top: 1px solid var(--border);
}

.back-link {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text);
}
.back-link:hover { color: var(--text-bold); }

/* ── Page ────────────────────────────────────── */
.page {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}
.page h1 {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── About ───────────────────────────────────── */
.about {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.about-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.about-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  flex-shrink: 0;
}

.about-intro h1 {
  font-size: 2.4rem;
  margin-bottom: 0.2rem;
}

.about-role {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.about-location {
  font-size: 0.8rem;
  color: var(--text);
  letter-spacing: 0.03em;
}

.about-quote {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text-bold);
  border-left: 3px solid var(--accent);
  padding: 0.8rem 1.5rem;
  margin: 2.5rem 0;
}

.about-body p {
  font-size: 0.95rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 2rem 0;
}

.about-card {
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.about-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.about-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 700px) {
  .about-header {
    flex-direction: column;
    text-align: center;
  }
  .about-intro h1 { font-size: 2rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about { padding: 3rem 1.5rem 4rem; }
}

/* ── Footer ──────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text);
  letter-spacing: 0.05em;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 700px) {
  html { font-size: 15px; }
  .home-hero { padding: 3rem 1.5rem 1rem; }
  .home-hero h1 { font-size: 3rem; }
  .featured { height: 55vh; }
  .featured-content { padding: 3rem 1.5rem 2rem; }
  .featured-content h2 { font-size: 1.8rem; }
  .stream { padding: 2rem 1.5rem 4rem; }
  .stream-item { grid-template-columns: 1fr; gap: 1.2rem; }
  .stream-item--flip .stream-image { order: 0; }
  .stream-item--flip .stream-text { order: 0; }
  .stream-image img { height: 220px; }
  .article-cover img { height: 40vh; }
  .article-header h1 { font-size: 2rem; }
  .article-header, .article-body, .article-footer { padding-left: 1.5rem; padding-right: 1.5rem; }
  .topbar { padding: 1rem 1.5rem; }
}
