/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --muted: #8a8a8a;
  --line: #e4e2df;
  --paper: #ffffff;
  --sand: #f4f5f6;
  --dark: #141414;
  --max: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lora', Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo, .btn, .main-nav a {
  font-family: 'Playfair Display', Georgia, serif;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.btn {
  display: inline-block;
  padding: 0.85em 2em;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  font-weight: 600;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-dark {
  background: var(--dark);
  color: #fff;
}
.btn-dark:hover { background: #000; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.btn-outline:hover { background: #fff; color: var(--dark); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo {
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.logo strong { font-weight: 700; }

.main-nav {
  display: flex;
  gap: 2.2rem;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 0.4rem;
  position: relative;
}
.main-nav a.active { border-bottom: 2px solid var(--ink); }
.main-nav a:hover { color: var(--ink-soft); }

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  gap: 0.6rem;
}
.search-icon {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  color: var(--ink);
}
.search-box input {
  border: none;
  outline: none;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 0.9rem;
  width: 90px;
  background: transparent;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 2.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  align-items: center;
  gap: 3rem;
}
.hero-text h1 {
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 1.4rem;
}
.hero-text p {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 34ch;
  margin-bottom: 1.8rem;
}
.hero-image {
  width: 100%;
  aspect-ratio: 16 / 8.6;
  overflow: hidden;
  border-radius: 2px;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Carousel ---------- */
.carousel-section {
  background: var(--dark);
  position: relative;
  padding: 3.5rem 4.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.carousel-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
  flex: 1;
  max-width: var(--max);
  margin: 0 auto;
}
.feature-card {
  color: #fff;
}
.feature-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 1.3rem;
  border-radius: 2px;
}
.feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.feature-card:hover .feature-img img { transform: scale(1.05); }
.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}
.feature-card p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 1.4rem;
  max-width: 34ch;
}

.carousel-arrow {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0.75;
  flex-shrink: 0;
  padding: 0.5rem;
  transition: opacity 0.2s ease;
}
.carousel-arrow:hover { opacity: 1; }

/* ---------- Content section ---------- */
.content-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}
.main-article h2 {
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 1.6rem;
}
.article-image {
  width: 100%;
  aspect-ratio: 16 / 9.2;
  overflow: hidden;
  margin-bottom: 1.6rem;
  border-radius: 2px;
}
.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.main-article > p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 62ch;
  margin-bottom: 2rem;
}
.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.share {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-weight: 600;
  font-family: 'Playfair Display', serif;
}
.share a {
  display: flex;
  color: var(--ink);
}
.share a:hover { color: var(--ink-soft); }

.feed-item { margin-bottom: 3rem; }
.feed-item:last-child { margin-bottom: 0; }
.feed-item p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 62ch;
  margin-bottom: 1.4rem;
}
.feed-empty { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 2.2rem; }
.categories-box h3, .follow-box h3 {
  font-size: 1.4rem;
  font-weight: 700;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0.4rem;
  display: inline-block;
}
.categories-list li {
  border-bottom: 1px solid var(--line);
}
.categories-list li a {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}
.categories-list li a span { color: var(--muted); }
.categories-list li.active a { color: var(--ink); }
.categories-list li a:hover { color: var(--ink); }

.follow-box {
  background: var(--sand);
  border: 1px solid var(--line);
  padding: 1.6rem 1.8rem 1.9rem;
}
.social-icons { display: flex; gap: 0.9rem; margin-top: 1rem; }
.social-icons a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.social-icons a:hover { background: #000; transform: translateY(-2px); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 2.6rem; }
  .carousel-track { grid-template-columns: 1fr 1fr; }
  .feature-card:nth-child(3) { display: none; }
  .content-section { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .header-inner { padding: 1.2rem 1.4rem; flex-wrap: wrap; }
  .nav-toggle { display: flex; order: 2; }
  .search-box { order: 3; padding: 0.4rem 0.8rem; }
  .search-box input { width: 60px; }
  .main-nav {
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.open { max-height: 300px; padding-top: 1rem; }
  .main-nav a { padding: 0.6rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .main-nav a.active { border-bottom-color: var(--line); }

  .hero { padding: 2.5rem 1.4rem 3rem; }
  .hero-text h1 { font-size: 2.1rem; }

  .carousel-section { padding: 2.5rem 1.2rem; flex-wrap: wrap; }
  .carousel-track { grid-template-columns: 1fr; gap: 2rem; }
  .feature-card:nth-child(3) { display: block; }

  .content-section { padding: 3rem 1.4rem; gap: 3rem; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { max-width: var(--max); margin: 0 auto; padding: 1.6rem 2.5rem 0; font-size: 0.82rem; color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { margin: 0 0.4rem; }

/* ---------- Article detail page ---------- */
.article-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 0.35em 0.9em; margin-bottom: 1rem; }
.article-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.4rem; }
.article-lead { font-family: 'Lora', serif; font-style: italic; font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 1.4rem !important; }
