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

:root {
  --bg: #faf9f6;
  --bg2: #f2f0eb;
  --ink: #0f0e0c;
  --ink2: #3d3b36;
  --ink3: #8a8780;
  --rule: #e2dfd8;
  --red: #e8341c;
  --yellow: #f5c800;
  --blue: #1a56e8;
  --green: #0e9e6e;
  --card: #ffffff;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Epilogue', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.7; }

/* ── MASTHEAD ── */
.masthead {
  border-bottom: 3px solid var(--ink);
  padding: 0 5vw;
}
.masthead-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink3); font-weight: 500;
}
.masthead-logo {
  text-align: center; padding: 1.75rem 0 1.25rem;
}
.masthead-logo a {
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.04em;
  line-height: 1;
}
.masthead-logo a span { color: var(--red); font-style: italic; }
.masthead-tagline {
  font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink3); font-weight: 500; margin-top: 0.35rem;
}
.masthead-nav {
  display: flex; gap: 0; border-top: 1px solid var(--rule);
  overflow-x: auto;
}
.masthead-nav a {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink2); text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-right: 1px solid var(--rule);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.masthead-nav a:first-child { border-left: 1px solid var(--rule); }
.masthead-nav a:hover, .masthead-nav a.active { background: var(--ink); color: var(--bg); }
.masthead-nav .nav-search {
  margin-left: auto; padding: 0.75rem 1.25rem;
  font-size: 0.8rem; color: var(--ink3); cursor: pointer;
  border-left: 1px solid var(--rule);
  white-space: nowrap;
}

/* ── TICKER ── */
.ticker {
  background: var(--ink); color: var(--bg);
  padding: 0.5rem 0; overflow: hidden; position: relative;
  font-size: 0.75rem; letter-spacing: 0.05em; font-weight: 500;
}
.ticker-inner { display: flex; gap: 4rem; animation: ticker 30s linear infinite; white-space: nowrap; }
.ticker-item::before { content: '◆ '; color: var(--yellow); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── HERO GRID ── */
.hero-section { padding: 2.5rem 5vw; border-bottom: 2px solid var(--ink); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 0;
  border: 1px solid var(--rule);
}
.hero-main {
  grid-row: 1 / 3;
  border-right: 1px solid var(--rule);
  padding: 2rem;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.hero-main:hover { background: var(--bg2); }
.hero-main .article-img {
  width: 100%; aspect-ratio: 16/9;
  background: var(--ink);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  overflow: hidden; position: relative;
}
.hero-main .article-img .img-pattern {
  width: 100%; height: 100%;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(255,255,255,0.03) 8px, rgba(255,255,255,0.03) 16px),
    linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.hero-main .article-img .img-label {
  position: absolute; bottom: 1rem; left: 1rem;
  background: var(--yellow); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  padding: 0.2rem 0.6rem; border-radius: 2px;
}
.cat-tag {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--red); margin-bottom: 0.75rem;
}
.hero-main h2 {
  font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900; line-height: 1.15; letter-spacing: -0.03em;
  margin-bottom: 1rem; color: var(--ink);
}
.hero-main .excerpt {
  font-size: 0.95rem; color: var(--ink2); font-weight: 300;
  line-height: 1.8; margin-bottom: 1.25rem; max-width: 560px;
}
.article-meta {
  display: flex; gap: 1rem; align-items: center;
  font-size: 0.72rem; color: var(--ink3); font-weight: 500;
  letter-spacing: 0.03em;
}
.article-meta .author { color: var(--ink2); font-weight: 600; }
.article-meta .dot::before { content: '·'; margin: 0 0.2rem; }

.hero-side { display: flex; flex-direction: column; }
.hero-side-item {
  padding: 1.75rem;
  border-bottom: 1px solid var(--rule);
  cursor: pointer; transition: background 0.15s;
  flex: 1;
}
.hero-side-item:last-child { border-bottom: none; }
.hero-side-item:hover { background: var(--bg2); }
.hero-side-item .side-num {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--ink3); margin-bottom: 0.6rem; display: block;
}
.hero-side-item h3 {
  font-family: var(--font-head); font-size: 1.05rem;
  font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.hero-side-item p { font-size: 0.8rem; color: var(--ink3); font-weight: 300; line-height: 1.6; }

/* ── SECTION LABEL ── */
.section-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.75rem;
}
.section-header h2 {
  font-family: var(--font-head); font-size: 1.4rem; font-weight: 900;
  letter-spacing: -0.03em; line-height: 1;
}
.section-header .rule {
  flex: 1; height: 1px; background: var(--ink); margin-left: 0.5rem;
}
.section-header .see-all {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--red); text-decoration: none;
  white-space: nowrap;
}
.section-header .see-all:hover { text-decoration: underline; }

/* ── MAIN CONTENT AREA ── */
.main-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 0; padding: 0 5vw; }
.content-area { border-right: 1px solid var(--rule); padding: 2.5rem 2.5rem 2.5rem 0; }
.sidebar { padding: 2.5rem 0 2.5rem 2.5rem; }

/* ── ARTICLE CARDS ── */
.articles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }

.article-card { cursor: pointer; }
.article-card .card-img {
  width: 100%; aspect-ratio: 3/2;
  background: var(--bg2);
  margin-bottom: 1rem;
  overflow: hidden; position: relative;
  border: 1px solid var(--rule);
}
.card-img-inner { width: 100%; height: 100%; transition: transform 0.4s ease; }
.article-card:hover .card-img-inner { transform: scale(1.04); }

/* Unique SVG-style placeholders per category */
.img-ai { background: linear-gradient(135deg, #0f0e0c 0%, #1a1a2e 100%); }
.img-ai::after { content: '</AI>'; font-family: var(--font-mono); font-size: 1.8rem; font-weight: 500; color: rgba(245,200,0,0.6); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.img-web { background: linear-gradient(135deg, #f0f4ff 0%, #dce8ff 100%); }
.img-web::after { content: '{…}'; font-family: var(--font-mono); font-size: 2rem; font-weight: 500; color: rgba(26,86,232,0.5); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.img-os { background: linear-gradient(135deg, #f5f5f0 0%, #e8e4dc 100%); }
.img-os::after { content: '$ _'; font-family: var(--font-mono); font-size: 1.6rem; font-weight: 500; color: rgba(15,14,12,0.4); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.img-sec { background: linear-gradient(135deg, #fff0ee 0%, #fde0db 100%); }
.img-sec::after { content: '🔐'; font-size: 2.5rem; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0.7; }
.img-cloud { background: linear-gradient(135deg, #e8f5ff 0%, #d0ebff 100%); }
.img-cloud::after { content: '☁'; font-size: 3rem; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(26,86,232,0.4); }
.img-data { background: linear-gradient(135deg, #f0fff4 0%, #d4f5e2 100%); }
.img-data::after { content: '▦▦▦'; font-size: 1.5rem; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(14,158,110,0.5); letter-spacing: 4px; }

.article-card h3 {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 700;
  line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 0.5rem;
  transition: color 0.15s;
}
.article-card:hover h3 { color: var(--red); }
.article-card p { font-size: 0.85rem; color: var(--ink3); font-weight: 300; line-height: 1.6; margin-bottom: 0.75rem; }

/* ── FEATURED LONG READ ── */
.longread {
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  padding: 2rem 0; margin-bottom: 3rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center;
  cursor: pointer;
}
.longread:hover .longread-title { color: var(--red); }
.longread-label {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--ink); color: var(--yellow);
  display: inline-block; padding: 0.2rem 0.6rem; margin-bottom: 1rem;
}
.longread-title {
  font-family: var(--font-head); font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 900; line-height: 1.15; letter-spacing: -0.03em;
  margin-bottom: 1rem; transition: color 0.15s;
}
.longread-desc { font-size: 0.9rem; color: var(--ink2); font-weight: 300; line-height: 1.8; margin-bottom: 1.25rem; }
.longread-img {
  aspect-ratio: 4/3; background: var(--ink);
  position: relative; overflow: hidden;
}
.longread-img-inner {
  width: 100%; height: 100%;
  background-image:
    repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(255,255,255,0.02) 6px, rgba(255,255,255,0.02) 12px),
    linear-gradient(135deg, #0f0e0c 0%, #1c1c2e 60%, #16213e 100%);
}
.longread-img .img-label {
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--font-mono); font-size: 2.5rem; font-weight: 500;
  color: rgba(245,200,0,0.15); line-height: 1; pointer-events: none;
}

/* ── LIST ARTICLES ── */
.articles-list { display: flex; flex-direction: column; gap: 0; }
.list-item {
  display: grid; grid-template-columns: 80px 1fr; gap: 1rem;
  padding: 1.25rem 0; border-bottom: 1px solid var(--rule);
  cursor: pointer; transition: background 0.15s;
}
.list-item:hover h4 { color: var(--red); }
.list-num {
  font-family: var(--font-mono); font-size: 1.6rem; font-weight: 500;
  color: var(--rule); line-height: 1; padding-top: 4px;
  text-align: right;
}
.list-item h4 {
  font-family: var(--font-head); font-size: 1rem; font-weight: 700;
  line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 0.3rem;
  transition: color 0.15s;
}
.list-item span { font-size: 0.75rem; color: var(--ink3); }

/* ── SIDEBAR ── */
.sidebar-block { margin-bottom: 2.5rem; }
.sidebar-rule { font-family: var(--font-head); font-size: 1.1rem; font-weight: 900; letter-spacing: -0.02em; padding-bottom: 0.75rem; border-bottom: 2px solid var(--ink); margin-bottom: 1.25rem; }

/* Newsletter */
.newsletter-box {
  background: var(--ink); color: var(--bg);
  padding: 1.75rem; margin-bottom: 2.5rem;
}
.newsletter-box h3 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.newsletter-box p { font-size: 0.8rem; color: rgba(250,249,246,0.6); font-weight: 300; margin-bottom: 1.25rem; line-height: 1.6; }
.newsletter-box input {
  width: 100%; padding: 0.65rem 0.85rem; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15); color: var(--bg);
  font-family: var(--font-body); font-size: 0.85rem;
  margin-bottom: 0.6rem; outline: none;
}
.newsletter-box input::placeholder { color: rgba(255,255,255,0.3); }
.newsletter-box input:focus { border-color: var(--yellow); }
.newsletter-box button {
  width: 100%; padding: 0.65rem; background: var(--yellow); color: var(--ink);
  border: none; font-family: var(--font-head); font-size: 0.85rem;
  font-weight: 700; cursor: pointer; letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
.newsletter-box button:hover { opacity: 0.85; }

/* Trending topics */
.topic-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.topic-tag {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 0.3rem 0.7rem;
  border: 1px solid var(--rule); color: var(--ink2);
  cursor: pointer; transition: all 0.15s; text-decoration: none;
}
.topic-tag:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Popular sidebar cards */
.pop-item {
  display: flex; gap: 0.85rem; padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule); cursor: pointer;
}
.pop-item:last-child { border-bottom: none; }
.pop-thumb {
  width: 60px; height: 50px; flex-shrink: 0;
  background: var(--bg2); border: 1px solid var(--rule); position: relative; overflow: hidden;
}
.pop-item h5 {
  font-family: var(--font-head); font-size: 0.85rem; font-weight: 700;
  line-height: 1.3; letter-spacing: -0.01em;
  transition: color 0.15s;
}
.pop-item:hover h5 { color: var(--red); }
.pop-item span { font-size: 0.7rem; color: var(--ink3); display: block; margin-top: 0.3rem; }

/* ── CATEGORIES STRIP ── */
.categories-strip {
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: 2.5rem 5vw;
}
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.cat-item {
  background: var(--bg); padding: 1.5rem 1rem;
  text-align: center; cursor: pointer; transition: background 0.15s;
  text-decoration: none;
}
.cat-item:hover { background: var(--ink); }
.cat-item:hover .cat-icon, .cat-item:hover .cat-name { color: var(--bg); }
.cat-icon { font-size: 1.6rem; display: block; margin-bottom: 0.5rem; }
.cat-name { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink2); }

/* ── FOOTER ── */
footer {
  background: var(--ink); color: var(--bg);
  padding: 4rem 5vw 2rem;
  margin-top: 4rem;
}
.footer-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem; padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}
.footer-brand-name {
  font-family: var(--font-head); font-size: 2rem; font-weight: 900;
  letter-spacing: -0.04em; margin-bottom: 0.75rem;
}
.footer-brand-name span { color: var(--yellow); font-style: italic; }
.footer-brand p { font-size: 0.85rem; color: rgba(250,249,246,0.5); font-weight: 300; line-height: 1.8; }
.footer-col h5 { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(250,249,246,0.4); margin-bottom: 1.25rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { color: rgba(250,249,246,0.7); text-decoration: none; font-size: 0.875rem; font-weight: 300; transition: color 0.2s; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 0.78rem; color: rgba(250,249,246,0.35); }
.footer-social { display: flex; gap: 1rem; }
.social-btn { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; color: rgba(250,249,246,0.5); text-decoration: none; font-size: 0.75rem; font-weight: 600; transition: all 0.15s; }
.social-btn:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

/* ── READ MORE LINK ── */
.read-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--red); text-decoration: none;
}
.read-more:hover { text-decoration: underline; }

@media(max-width:900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { grid-row: auto; border-right: none; border-bottom: 1px solid var(--rule); }
  .main-wrap { grid-template-columns: 1fr; }
  .content-area { border-right: none; padding-right: 0; }
  .sidebar { padding-left: 0; border-top: 2px solid var(--ink); }
  .articles-grid { grid-template-columns: 1fr; }
  .longread { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}