/* thought/day — editorial stylesheet */

:root {
  --ink:        #1a1510;
  --parchment:  #f5efe3;
  --cream:      #faf7f0;
  --gold:       #c9a84c;
  --gold-light: #e8d5a0;
  --rust:       #8b4a2f;
  --stone:      #8c8279;
  --divider:    #d4c9b4;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Cormorant Garamond', Georgia, serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --col-width:    680px;
  --wide-width:   1060px;
  --sidebar-width: 210px;
}

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; }

/* ─── Base ──────────────────────────────────────────── */
html { font-size: 18px; }

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--rust); }

/* ─── Sidebar ────────────────────────────────────────── */
.site-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--cream);
  border-right: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 2.75rem;
  display: block;
  flex-shrink: 0;
}

.sidebar-logo:hover { color: var(--ink); }
.logo-sep { color: var(--gold); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

.sidebar-nav a {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--divider);
  transition: color 0.15s;
}

.sidebar-nav a:first-child { border-top: 1px solid var(--divider); }
.sidebar-nav a:hover { color: var(--ink); }

.sidebar-signin {
  color: var(--rust) !important;  /* accent — future: becomes profile link */
}

.sidebar-signin:hover { color: var(--ink) !important; }

/* ─── Sidebar search ─────────────────────────────────── */
.sidebar-search {
  position: relative;
  margin-top: auto;      /* push to bottom of sidebar */
  padding-top: 2rem;
}

.sidebar-search-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--divider);
  padding: 0.55rem 0;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

.sidebar-search-input::placeholder { color: var(--stone); }
.sidebar-search-input:focus { border-bottom-color: var(--gold); }

/* Dropdown — opens upward so it doesn't go off-screen */
.nav-search-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: -1.5rem;
  right: -1.5rem;
  background: var(--cream);
  border: 1px solid var(--divider);
  z-index: 200;
  max-height: 340px;
  overflow-y: auto;
}

.search-result {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--divider);
  text-decoration: none;
  gap: 0.15rem;
  transition: background 0.1s;
}

.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--parchment); }

.search-result-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.2;
}

.search-result:hover .search-result-name { color: var(--rust); }

.search-result-school {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ─── Content area ───────────────────────────────────── */
.site-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* ─── Mobile top bar ─────────────────────────────────── */
.mobile-topbar { display: none; }

/* ─── Footer ────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: 2.5rem 1.5rem;
  margin-top: 5rem;
}

.footer-inner {
  max-width: var(--col-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-inner .logo-small {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--stone);
}

.footer-inner p {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ─── Feed header (index) ───────────────────────────── */
.feed-header {
  border-bottom: 1px solid var(--divider);
  padding: 3rem 1.5rem 1.75rem;
  max-width: var(--col-width);
  margin: 0 auto;
}

.feed-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.6rem;
}

.feed-headline {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1.15;
}

.feed { max-width: var(--col-width); margin: 0 auto; padding: 0 1.5rem; }

/* ─── Thought entry ─────────────────────────────────── */
.thought-entry {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--divider);
}

.thought-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.thinker-byline {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 500;
}

.thinker-byline:hover { color: var(--ink); }

.meta-sep { color: var(--divider); }

.school-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}

.thought-body { border: none; padding: 0; }

.thought-body p {
  font-family: var(--font-body);
  font-size: 1.45rem;
  font-style: italic;
  line-height: 1.6;
}

.thought-footer {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.thought-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1rem;
}

cite.source {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--stone);
  font-style: normal;
}

/* ─── Buttons ───────────────────────────────────────── */
.btn-echo {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--divider);
  color: var(--stone);
  padding: 0.4rem 0.9rem;
  transition: border-color 0.15s, color 0.15s;
}

.btn-echo:hover {
  border-color: var(--gold);
  color: var(--ink);
}

/* ─── Empty state ───────────────────────────────────── */
.empty-state {
  padding: 4rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  text-align: center;
}

/* ─── Thinker profile ───────────────────────────────── */
.profile-layout {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

.profile-sidebar {
  position: sticky;
  top: 2rem;
}

.portrait-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--cream);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.portrait-placeholder span {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--gold);
  font-style: italic;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--divider);
  border-left: 1px solid var(--divider);
}

.stat {
  padding: 0.75rem 0.9rem;
  border-right: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

.profile-main { min-width: 0; }

.profile-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--divider);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.profile-dates {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--stone);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.profile-school {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1.1rem;
}

.profile-bio {
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 560px;
}

.feed-section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  padding-top: 1.75rem;
  display: block;
}

/* ─── Thinkers page ─────────────────────────────────── */

/* Hero */
.thinkers-hero {
  border-bottom: 1px solid var(--divider);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}

.thinkers-hero-inner {
  max-width: 600px;
  margin: 0 auto;
}

.thinkers-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.75rem;
}

.thinkers-headline {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.thinkers-sub {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}

/* Search field */
.thinkers-search-block {
  margin-top: 2.75rem;
}

.thinkers-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border-bottom: 1.5px solid var(--divider);
  padding-bottom: 0.85rem;
  transition: border-color 0.2s ease;
}

.thinkers-search-wrap:focus-within {
  border-bottom-color: var(--gold);
}

.search-icon {
  font-size: 1.2rem;
  color: var(--stone);
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
  transition: color 0.2s;
}

.thinkers-search-wrap:focus-within .search-icon {
  color: var(--gold);
}

.thinkers-search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.55rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  min-width: 0;
}

.thinkers-search::placeholder {
  color: var(--stone);
  opacity: 0.65;
}

.search-clear {
  background: transparent;
  border: none;
  color: var(--stone);
  font-size: 0.75rem;
  padding: 0.2rem;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.15s;
}

.search-clear:hover { color: var(--ink); }

/* Shared section chrome */
.thinkers-featured,
.thinkers-results {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.thinkers-section-inner { max-width: var(--wide-width); }

.thinkers-section-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1.5rem;
  display: block;
}

/* Featured grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
}

.featured-card {
  background: var(--cream);
  padding: 2.25rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  transition: background 0.12s;
  gap: 0.45rem;
}

.featured-card:hover { background: var(--parchment); }

.featured-initial {
  width: 52px;
  height: 52px;
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.65rem;
  flex-shrink: 0;
}

.featured-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}

.featured-card:hover .featured-name { color: var(--rust); }

.featured-school {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
}

.featured-dates {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}

/* Search results list */
.results-list {
  border-top: 1px solid var(--divider);
}

.result-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--divider);
  text-decoration: none;
  transition: background 0.1s;
}

.result-row:hover { background: var(--cream); }

.result-initial {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gold);
}

.result-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.result-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}

.result-row:hover .result-name { color: var(--rust); }

.result-meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}

.meta-dot {
  color: var(--divider);
  margin: 0 0.35em;
}

.result-arrow {
  color: var(--divider);
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}

.result-row:hover .result-arrow {
  color: var(--gold);
  transform: translateX(3px);
}

.no-results {
  padding: 3rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  text-align: center;
}

/* ─── Analytics page ────────────────────────────────── */

.analytics-page {
  max-width: var(--col-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--cream);
  padding: 1.5rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
}

.stat-card--highlight { background: var(--parchment); }

.stat-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
}

.stat-card--highlight .stat-value { color: var(--rust); }

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

.stat-meta {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--divider);
}

.analytics-section {
  margin-bottom: 2.75rem;
}

.analytics-heading {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1rem;
  font-weight: 400;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.analytics-table th {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--divider);
  font-weight: 400;
}

.analytics-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--divider);
  color: var(--ink);
  font-family: var(--font-body);
}

.analytics-table tr:last-child td { border-bottom: none; }
.analytics-table tr:hover td { background: var(--cream); }

.analytics-path {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--stone);
}

.analytics-empty {
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 1.5rem 0.75rem;
}

@media (max-width: 600px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  /* Hide sidebar, show top bar */
  .site-sidebar  { display: none; }
  .site-content  { margin-left: 0; }

  .mobile-topbar .sidebar-logo { margin-bottom: 0; }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 52px;
    background: var(--cream);
    border-bottom: 1px solid var(--divider);
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .mobile-nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
  }

  .mobile-nav a {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--stone);
    text-decoration: none;
  }

  .mobile-nav a:hover { color: var(--ink); }

  .mobile-signin {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rust);
    text-decoration: none;
  }

  /* Content */
  .profile-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .profile-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1.25rem;
    align-items: start;
  }

  .portrait-placeholder { aspect-ratio: 1; }
  .thought-body p { font-size: 1.2rem; }
  .profile-name { font-size: 2rem; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .featured-grid { grid-template-columns: 1fr; }
  .thinkers-hero { padding: 2.5rem 1rem 2.5rem; }
  .thinkers-search { font-size: 1.25rem; }
}

/* ─── Coming soon ────────────────────────────────────── */
.coming-soon {
  max-width: 560px;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

.coming-soon-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 1.25rem;
}

.coming-soon-headline {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 1.5rem;
  line-height: 1.2;
}

.coming-soon-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 2.5rem;
}

.coming-soon-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--rust);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.coming-soon-link:hover { color: var(--ink); }

/* ─── Fix hidden attribute being overridden by display:flex ─ */
.result-row[hidden] { display: none; }
