/*
Theme Name: Technolore
Theme URI: https://technolore.com
Author: Technolore
Description: Custom theme for Technolore — AI tools explained, Indian startup ecosystem, and founder profiles.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: technolore
*/

:root {
  --paper: #FFFFFF;
  --paper-soft: #FAFAF8;
  --ink: #15161C;
  --ink-soft: #6B6C76;
  --ink-faint: #9C9DA6;
  --border: rgba(21, 22, 28, 0.09);
  --gold: #A9791E;

  --teal: #0E7A5F;
  --wine: #A02F5C;
  --indigo: #4640C7;

  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

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

a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--gold); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

#particles-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
}

body::before, body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  z-index: 50;
  pointer-events: none;
}
body::before { left: calc(50% - 630px); }
body::after { right: calc(50% - 630px); }

@media (max-width: 1340px) {
  body::before, body::after { display: none; }
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---- Masthead ---- */
header.masthead {
  border-bottom: 1px solid var(--border);
  padding: 26px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .accent { color: var(--gold); }

.sections {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  list-style: none;
}
.sections a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.sections a:hover { color: var(--ink); }

.header-cta {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  background: var(--ink);
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}
.header-cta:hover { background: var(--gold); transform: translateY(-1px); }

/* ---- Hero ---- */
.hero { padding: 108px 0 96px; position: relative; overflow: hidden; }

.hero-mesh {
  position: absolute;
  top: -160px;
  right: -220px;
  width: 800px;
  height: 700px;
  background:
    radial-gradient(circle at 30% 30%, rgba(169, 121, 30, 0.26), transparent 55%),
    radial-gradient(circle at 65% 20%, rgba(70, 64, 199, 0.22), transparent 50%),
    radial-gradient(circle at 55% 65%, rgba(14, 122, 95, 0.2), transparent 55%),
    radial-gradient(circle at 80% 60%, rgba(160, 47, 92, 0.18), transparent 50%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: meshDrift 16s ease-in-out infinite;
}
@keyframes meshDrift {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(8deg) scale(1.08); }
  100% { transform: rotate(0deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .hero-mesh { animation: none; } }

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(100deg, var(--gold), #C4922F);
  padding: 7px 16px;
  border-radius: 20px;
  margin-bottom: 26px;
  display: inline-block;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 22px;
  color: var(--ink);
}
.hero-rotator {
  display: inline-block;
  color: var(--teal);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-dek {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-cta-group { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.btn-primary, .btn-secondary {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--gold); transform: translateY(-1px); }
.btn-secondary { border: 1px solid var(--border); color: var(--ink); background: rgba(255,255,255,0.6); }
.btn-secondary:hover { border-color: var(--ink); background: var(--paper-soft); }

.hero-visual {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(21,22,28,0.1);
}
.hero-visual-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero-visual-title span.live { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); font-weight: 600; }
.hero-visual-title .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); position: relative; }
.hero-visual-title .live-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--teal); opacity: 0.5; animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse { 0% { transform: scale(0.6); opacity: 0.55; } 100% { transform: scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-visual-title .live-dot::after { animation: none; } }

.trend-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.trend-item:last-child { border-bottom: none; padding-bottom: 0; }
.trend-item:first-child { padding-top: 0; }
.trend-num {
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em;
  color: var(--paper-soft); -webkit-text-stroke: 1.4px var(--ink-faint); min-width: 26px;
}
.trend-body h5 { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em; line-height: 1.32; color: var(--ink); margin-bottom: 6px; }
.trend-meta { font-size: 0.78rem; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; }
.trend-meta .dot { width: 5px; height: 5px; border-radius: 50%; }
.trend-meta.ai .dot { background: var(--teal); }
.trend-meta.startup .dot { background: var(--wine); }
.trend-meta.founder .dot { background: var(--indigo); }

/* ---- Stat bar ---- */
.stat-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 44px 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
}
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; letter-spacing: -0.03em; color: var(--ink); display: block; margin-bottom: 6px; }
.stat-num .unit { color: var(--gold); }
.stat-label { font-size: 0.88rem; color: var(--ink-soft); }
@media (max-width: 860px) { .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; } }

/* ---- Dossier grid ---- */
.dossiers { padding: 40px 0; border-top: 1px solid var(--border); }
.section-label { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 40px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.card {
  background: var(--paper);
  color: var(--ink);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  border-top: 3px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.2s ease;
  position: relative;
  text-decoration: none;
}
.card:hover { background: var(--paper-soft); transform: translateY(-3px); z-index: 2; }
.card.ai:hover { border-top-color: var(--teal); }
.card.startup:hover { border-top-color: var(--wine); }
.card.founder:hover { border-top-color: var(--indigo); }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

.card-tag {
  display: inline-flex; align-items: center; font-family: var(--font-body); font-weight: 600;
  font-size: 0.74rem; letter-spacing: 0.02em; color: #fff; padding: 5px 12px; border-radius: 20px; margin-bottom: 20px;
}
.card-tag.ai { background: var(--teal); }
.card-tag.startup { background: var(--wine); }
.card-tag.founder { background: var(--indigo); }

.card h3 { font-family: var(--font-display); font-size: 1.28rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.28; margin-bottom: 14px; }
.card p { font-size: 0.95rem; color: var(--ink-soft); flex: 1; line-height: 1.55; }
.card-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--ink-faint); display: flex; justify-content: space-between; }

.empty-state { padding: 40px; text-align: center; color: var(--ink-soft); background: var(--paper-soft); border: 1px dashed var(--border); border-radius: 10px; }

/* ---- Rail ---- */
.rail { padding: 20px 0 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.rail-block h4 {
  display: flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  color: var(--ink); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.rail-block .dot { width: 6px; height: 6px; border-radius: 50%; }
.rail-block.ai .dot { background: var(--teal); }
.rail-block.startup .dot { background: var(--wine); }
.rail-block.founder .dot { background: var(--indigo); }
.rail-block ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.rail-block li { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; color: var(--ink); }
.rail-block a { text-decoration: none; }
.rail-block a:hover { color: var(--gold); }

/* ---- Single post ---- */
.single-wrap { max-width: 760px; margin: 0 auto; padding: 80px 40px 100px; position: relative; z-index: 1; }
.single-tag { margin-bottom: 22px; }
.single-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 20px; }
.single-meta { font-size: 0.9rem; color: var(--ink-faint); margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--border); }
.single-content { font-size: 1.08rem; line-height: 1.75; color: var(--ink); }
.single-content p { margin-bottom: 22px; }
.single-content h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; margin: 40px 0 18px; letter-spacing: -0.02em; }
.single-content h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin: 32px 0 14px; letter-spacing: -0.01em; }
.single-content img { border-radius: 10px; margin: 30px 0; }
.single-content a { color: var(--gold); text-decoration: underline; }

/* ---- Archive/category ---- */
.archive-header { padding: 70px 0 40px; position: relative; z-index: 1; }
.archive-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.03em; }
.archive-grid { padding: 20px 0 80px; }

/* ---- Footer ---- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  font-size: 0.85rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.6);
}

/* ---- Reveal animation ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 72px 0 60px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .wrap { padding: 0 24px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
