/* ════════════════════════════════════════════════════════════════
   marcelocavic.com — global stylesheet
   ════════════════════════════════════════════════════════════════ */

:root {
  --bg: #07080c;
  --bg2: #0e1018;
  --bg3: #13151f;
  --border: rgba(255,255,255,0.08);
  --text: #e8e9ed;
  --text-dim: rgba(232,233,237,0.52);
  --text-muted: rgba(232,233,237,0.25);
  --accent: #00AEEF;
  --accent2: #c8a96e;
  --serif: 'DM Serif Display', Georgia, serif;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── GRID ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 32px; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 32px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid transparent;
  transition: all 0.4s ease;
  background: transparent;
}
nav.scrolled,
nav.always-solid {
  background: rgba(7,8,12,0.92);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
}
.nav-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: rgba(232,233,237,0.62);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 120px 32px 80px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 60px;
}
.hero-text { animation: fadeUp 1s ease both; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before {
  content: '';
  display: block; width: 32px; height: 1px;
  background: var(--accent);
}

h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
h1 em { font-style: italic; color: var(--accent2); }

.hero-alias {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  letter-spacing: 0.04em;
}
.hero-desc {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 440px;
  margin-bottom: 40px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
}
.btn-primary:hover { background: #33c3f7; transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); }

/* ── HERO RIGHT: FEATURED BOOK CARD ── */
.hero-book { animation: fadeUp 1s 0.2s ease both; position: relative; }
.book-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.book-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent2);
}
.book-card::after {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(200,169,110,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.book-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.book-title {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.1;
  margin-bottom: 8px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.book-subtitle {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.book-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 28px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.book-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin: 0;
}
.book-meta > span { display: flex; flex-direction: column; gap: 3px; }
.book-meta dt { color: var(--text-dim); font-weight: 500; }
.book-meta dd { margin: 0; color: var(--text-muted); }
.book-meta strong { color: var(--text-dim); font-weight: 500; }

/* ── SECTIONS ── */
section { padding: 100px 0; }
section + section { border-top: 1px solid var(--border); }

.section-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 48px;
  display: flex; align-items: center; gap: 16px;
}
.section-label::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}

/* ── BOOKS GRID ── */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.book-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.book-item:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-3px); }
.book-item.featured { grid-column: span 2; }
.book-year {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.book-item-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 8px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.book-item-sub {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.book-item-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 20px;
}
.book-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.06em;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap 0.2s;
}
.book-link:hover { gap: 10px; }

/* ── ABOUT / ENTITY ── */
.entity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.entity-headline {
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.entity-headline em { font-style: italic; color: var(--accent2); }
.entity-left p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 16px;
}
.entity-right { display: flex; flex-direction: column; gap: 1px; margin: 0; }
.entity-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  gap: 16px;
}
.entity-row:first-child { border-top: 1px solid var(--border); }
.entity-key {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding-top: 2px;
  margin: 0;
  font-weight: 400;
}
.entity-val { color: var(--text-dim); line-height: 1.5; margin: 0; }
.entity-val a { color: var(--accent); text-decoration: none; }
.entity-val a:hover { text-decoration: underline; }

/* ── PROJECTS ── */
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.3s, transform 0.3s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.project-type {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.project-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin-bottom: 10px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.project-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 20px;
}
.project-url {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ── FAQ ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.faq-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-item:hover { border-color: rgba(255,255,255,0.15); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body {
  padding: 0 28px 24px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.8;
}
.faq-body p { margin-bottom: 12px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body a { color: var(--accent); text-decoration: none; }
.faq-body a:hover { text-decoration: underline; }

/* ── BREADCRUMB ── */
.breadcrumb {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 32px;
}
.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 8px; opacity: 0.4; }

/* ── ARTICLE / LONG-FORM PAGE (about, books, legal) ── */
.article-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 140px 32px 100px;
}
.article-page .eyebrow {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 16px;
}
.article-page .eyebrow::after {
  content: '';
  flex: 1; height: 1px; background: var(--border);
}
.article-page h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.article-page h1 em { font-style: italic; color: var(--accent2); }
.article-page .lede {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 640px;
}
.article-page h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-top: 56px;
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.article-page h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--text);
}
.article-page p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 18px;
}
.article-page p strong { color: var(--text); font-weight: 500; }
.article-page em { font-style: italic; color: rgba(232,233,237,0.7); }
.article-page a { color: var(--accent); text-decoration: none; }
.article-page a:hover { text-decoration: underline; }
.article-page ul, .article-page ol {
  margin-bottom: 24px;
  padding-left: 0;
  list-style: none;
}
.article-page ul li, .article-page ol li {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.8;
  padding-left: 22px;
  position: relative;
  margin-bottom: 6px;
}
.article-page ul li::before {
  content: '—';
  position: absolute; left: 0;
  color: var(--text-muted);
}
.article-page ol { counter-reset: ol; }
.article-page ol li { counter-increment: ol; }
.article-page ol li::before {
  content: counter(ol) ".";
  position: absolute; left: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.article-page blockquote {
  border-left: 3px solid var(--accent2);
  padding: 6px 0 6px 24px;
  margin: 28px 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.5;
}

/* ── BOOK PAGE specifics ── */
.book-page-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  padding: 24px 0;
  margin: 32px 0 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.book-page-meta > div {
  display: flex; flex-direction: column; gap: 4px;
}
.book-page-meta dt {
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.62rem;
}
.book-page-meta dd {
  color: var(--text-dim);
  font-weight: 500;
  margin: 0;
}
.book-cta {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin: 40px 0;
  padding: 28px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  align-items: center;
}
.book-cta-text { flex: 1; min-width: 220px; }
.book-cta-text strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}
.book-cta-text span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── LEGAL pages (older class kept for backward compat) ── */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 32px 100px;
}
.legal-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 16px;
}
.legal-label::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}
.legal h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 8px;
}
.legal .updated {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}
.legal h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text);
}
.legal p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 16px;
}
.legal ul {
  list-style: none;
  margin-bottom: 16px;
  padding-left: 0;
}
.legal ul li {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
}
.legal ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}
.legal em { font-style: italic; color: rgba(232,233,237,0.62); }
.legal .contact-block {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-top: 8px;
}
.legal a { color: var(--accent); text-decoration: none; }
.legal a:hover { text-decoration: underline; }

/* ── FOOTER ── */
footer {
  padding: 60px 32px;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-left {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: rgba(232,233,237,0.38);
  line-height: 1.7;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: rgba(232,233,237,0.38);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding: 100px 20px 60px; gap: 40px; }
  .books-grid { grid-template-columns: 1fr; }
  .book-item.featured { grid-column: span 1; }
  .entity-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  footer { flex-direction: column; align-items: flex-start; }
  .article-page { padding: 120px 20px 60px; }
  .legal { padding: 120px 20px 60px; }
  .book-cta { flex-direction: column; align-items: flex-start; }
}
