/* GigSoul — Light/Dark + Magazine CSS */

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

/* ── Light Theme ──────────────────────────────────────── */
:root, [data-theme="light"] {
  --bg:            #f7f7f5;
  --bg-surface:    #ffffff;
  --bg-surface2:   #f0f0ec;
  --bg-hover:      #ebebea;
  --border:        #d4d4d0;
  --border-sub:    #e0e0dc;
  --text:          #1a1a18;
  --text-muted:    #6b6b68;
  --text-faint:    #9b9b97;
  --accent:        #7c3aed;
  --accent-hover:  #6d28d9;
  --cyan:          #0891b2;
  --green:         #16a34a;
  --red:           #dc2626;
  --card-shadow:   0 1px 4px rgba(0,0,0,0.06);
}

/* ── Dark Theme ──────────────────────────────────────── */
[data-theme="dark"] {
  --bg:            #09090b;
  --bg-surface:    #111116;
  --bg-surface2:   #18181f;
  --bg-hover:      #1e1e26;
  --border:        #27272a;
  --border-sub:    #1c1c22;
  --text:          #f4f4f5;
  --text-muted:    #71717a;
  --text-faint:    #52525b;
  --accent:        #7c3aed;
  --accent-hover:  #6d28d9;
  --cyan:          #22d3ee;
  --green:         #22c55e;
  --red:           #ef4444;
  --card-shadow:   0 1px 8px rgba(0,0,0,0.35);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, color 0.2s;
}

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

:root {
  --font:       system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --sp-1:  0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-6:  1.5rem; --sp-8: 2rem; --sp-12: 3rem; --sp-16: 4rem;
  --radius: 8px;
  --max-w: 1200px;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-6); }
.main-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-8);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6);
  align-items: start;
}
.content-main { min-width: 0; }
.content-sidebar { position: sticky; top: 80px; }

/* ════════════════════════════════════════════════════════
   MASTHEAD — Homepage only (Washington Post style)
   ════════════════════════════════════════════════════════ */
.masthead {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.masthead-top {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.masthead-date {
  font-size: var(--text-xs);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.masthead-right { display: flex; align-items: center; gap: var(--sp-3); }
.masthead-theme-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--text-sm);
  transition: all 0.15s;
  line-height: 1;
}
.masthead-theme-btn:hover { background: var(--bg-hover); color: var(--text); }

/* Sun/Moon icons via CSS */
.masthead-theme-btn::before,
.theme-btn::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}
[data-theme="dark"] .masthead-theme-btn::before,
[data-theme="dark"] .theme-btn::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f4f4f5'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f4f4f5'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
}

.btn-subscribe {
  background: var(--accent);
  color: #fff !important;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  display: inline-block;
  transition: background 0.15s;
}
.btn-subscribe:hover { background: var(--accent-hover); color: #fff; }

/* Center logo block */
.masthead-center {
  text-align: center;
  padding: var(--sp-6) var(--sp-6) var(--sp-4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.masthead-logo-block {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.masthead-logo-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.masthead-logo-img {
  width: 88px;
  height: 88px;
}
.masthead-logo-text {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  margin: 0;
}
.masthead-tagline {
  font-size: var(--text-xl);
  color: var(--text-faint);
  font-family: var(--font-serif);
  font-style: italic;
  margin: 0;
  padding-left: 200px;
}
.masthead-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  height: 52px;
  overflow-x: auto;
  scrollbar-width: none;
}
.masthead-nav::-webkit-scrollbar { display: none; }
.masthead-nav a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.masthead-nav a:hover,
.masthead-nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ════════════════════════════════════════════════════════
   REGULAR NAVBAR — All other pages
   ════════════════════════════════════════════════════════ */
.navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.2s;
}
.navbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  height: 60px;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}
.navbar-logo img { width: 44px; height: 44px; }
.logo-text {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: var(--text-xl);
  color: var(--text);
}
.logo-tagline {
  font-size: var(--text-base);
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1;
}
.navbar-nav {
  display: flex;
  gap: var(--sp-4);
  margin: 0 auto;
}
.navbar-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.navbar-nav a:hover,
.navbar-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.navbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}
.theme-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--text-sm);
  transition: all 0.15s;
  line-height: 1;
}
.theme-btn:hover { background: var(--bg-hover); color: var(--text); }

/* ── Hamburger ─────────────────────────────────────────── */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text-muted); margin: 4px 0; }
.mobile-nav { display: none; flex-direction: column; position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: var(--bg-surface); padding: var(--sp-4); gap: var(--sp-2); z-index: 99; overflow-y: auto; }
.mobile-nav.open { display: flex; }
.mobile-nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 98; top: 60px; }
.mobile-nav-overlay.open { display: block; }
.mobile-nav a { font-size: var(--text-lg); color: var(--text-muted); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.mobile-nav a:hover { color: var(--text); }

/* ════════════════════════════════════════════════════════
   HERO FEATURED
   ════════════════════════════════════════════════════════ */
.hero-featured {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 440px;
}
.hero-content {
  padding: var(--sp-12) var(--sp-8) var(--sp-12) var(--sp-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-category {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--sp-3);
  display: block;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 var(--sp-4);
}
.hero-title a { color: var(--text); }
.hero-title a:hover { color: var(--accent); }
.hero-desc {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 var(--sp-6);
  max-width: 520px;
}
.btn-read {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background 0.15s;
  align-self: flex-start;
}
.btn-read:hover { background: var(--accent-hover); color: #fff; }
.hero-image {
  position: relative;
  overflow: hidden;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* ── Section Headers ────────────────────────────────────── */
.section-block { margin-bottom: var(--sp-10); }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 3px solid var(--text);
}
.section-title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.section-more { font-size: var(--text-sm); color: var(--text-muted); }
.section-more:hover { color: var(--accent); }

/* ── Article List ─────────────────────────────────────── */
.article-list { display: flex; flex-direction: column; }
.article-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border-sub);
}
.article-img {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
  flex-shrink: 0;
}
.article-img img { width: 100%; height: 100%; object-fit: cover; }
.article-body { display: flex; flex-direction: column; justify-content: center; }
.article-date {
  font-size: var(--text-xs);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: var(--sp-1);
}
.article-title {
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0 0 var(--sp-1);
  line-height: 1.35;
}
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--accent); }
.article-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar-block { margin-bottom: var(--sp-8); }
.sidebar-list { display: flex; flex-direction: column; }
.sidebar-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-sub);
  align-items: start;
}
.sidebar-num {
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--accent);
  font-family: var(--font-serif);
  line-height: 1;
  padding-top: 3px;
}
.sidebar-text h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0 0 var(--sp-1);
  line-height: 1.4;
}
.sidebar-text h3 a { color: var(--text); }
.sidebar-text h3 a:hover { color: var(--accent); }
.sidebar-text p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* AI Tools sidebar — title + description side by side */
.sidebar-item.tool-item {
  grid-template-columns: 28px 1fr;
  gap: var(--sp-3);
}
.tool-text {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: var(--sp-3);
  align-items: start;
}
.tool-text h3 { margin: 0 0 var(--sp-1); font-size: var(--text-base); font-weight: 700; line-height: 1.35; }
.tool-text h3 a { color: var(--text); }
.tool-text h3 a:hover { color: var(--accent); }
.tool-text .tool-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
  align-self: start;
  padding-top: 2px;
}

/* ── Book Sidebar ─────────────────────────────────────────── */
.sidebar-book {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
}
.sidebar-book img { width: 80px; height: 110px; object-fit: cover; border-radius: var(--radius); }
.sidebar-book h3 { font-size: var(--text-sm); font-weight: 700; margin: 0 0 var(--sp-1); line-height: 1.4; }
.sidebar-book h3 a { color: var(--text); }
.sidebar-book h3 a:hover { color: var(--accent); }
.sidebar-book p { font-size: var(--text-xs); color: var(--text-muted); margin: 0 0 var(--sp-2); line-height: 1.4; }
.card-price { display: inline-block; font-size: var(--text-sm); font-weight: 700; color: var(--accent); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-12) 0 var(--sp-6);
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: var(--sp-2); }
.footer-brand img { width: 28px; height: 28px; }
.footer-brand-name { font-family: var(--font-serif); font-weight: 900; font-size: var(--text-base); }
.footer-brand-tagline { font-size: var(--text-xs); color: var(--text-muted); }
.footer-links { display: flex; gap: var(--sp-8); flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col h4 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin: 0 0 var(--sp-1); }
.footer-col a { font-size: var(--text-sm); color: var(--text-muted); }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: var(--sp-4); }
.footer-bottom p { font-size: var(--text-sm); color: var(--text-faint); margin: 0; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .main-wrapper { grid-template-columns: 1fr; }
  .content-sidebar { position: static; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image { height: 260px; position: relative; }
}
@media (max-width: 768px) {
  .masthead-date { display: none; }
  .masthead-nav { gap: var(--sp-3); justify-content: flex-start; }
  .navbar-nav { display: none; }
  .hamburger { display: block; }
  .footer-inner { flex-direction: column; gap: var(--sp-6); }
  .article-card { grid-template-columns: 1fr; }
  .article-img { height: 160px; }
  .tool-text { grid-template-columns: 1fr; }
}
