/* ============================================================
   emolina.ai — site styles
   Dark canvas, editorial typography, organic decorative accents.
   ============================================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0F172A;             /* slate-900 — primary canvas */
  --bg-deep: #020617;         /* near-black for accents */
  --text: #F8FAFC;            /* near-white — primary text */
  --text-muted: #94A3B8;      /* slate-400 — secondary text */
  --text-dim: #475569;        /* slate-600 — captions, fine print */
  --accent-blue: #3B82F6;     /* electric blue — analytical accent */
  --accent-cyan: #2DD4BF;     /* teal — atmospheric / decorative accent */
  --accent-cyan-bright: #5EEAD4; /* teal-300 — hover, emphasis */
  --rule: rgba(148, 163, 184, 0.15); /* subtle divider */
  --max-width: 920px;
  --content-width: 680px;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---------- Side labels (rotated, Artefact-style) ---------- */
.side-label {
  position: fixed;
  top: 50%;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 400;
  pointer-events: none;
  z-index: 10;
}

.side-label .lower {
  text-transform: none;
  letter-spacing: 1px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 11px;
}

.side-label.left {
  left: 24px;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
}

.side-label.right {
  right: 24px;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: right center;
}

.side-label .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-cyan);
  margin: 0 6px;
  vertical-align: middle;
}

/* ---------- Top nav ---------- */
.top-nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 64px;
  z-index: 5;
}

.top-nav .logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  text-transform: none;
}

.top-nav .logo .dot {
  color: var(--accent-cyan);
}

.top-nav .nav-links {
  display: flex;
  gap: 32px;
}

.top-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.top-nav a:hover {
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 64px 128px;
  text-align: left;
}

.hero-artwork {
  position: absolute;
  top: -40px;
  right: -120px;
  width: 600px;
  height: 600px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 24px;
  font-weight: 400;
}

.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 72px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 32px;
  color: var(--text);
}

.hero h1 .dot {
  color: var(--accent-cyan);
}

.hero h1.hero-title::after {
  content: ".";
  color: var(--accent-cyan);
}

.hero .subtitle {
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 300;
  max-width: 580px;
}

.hero .tagline {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 580px;
}

.hero .tagline em {
  color: var(--accent-cyan);
  font-style: normal;
}

/* ---------- Section dividers ---------- */
.section-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 64px;
}

.section-divider hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---------- Essays section ---------- */
.essays {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 64px 64px;
}

.essays-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 64px;
}

.essays h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: var(--text);
}

.essays-meta {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 400;
}

.essay-list {
  list-style: none;
}

.essay {
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 32px;
  align-items: baseline;
}

.essay:first-child {
  border-top: none;
  padding-top: 16px;
}

.essay-number {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-dim);
  font-weight: 400;
}

.essay-date {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-weight: 400;
}

.essay-body {
  max-width: 540px;
}

.essay-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}

.essay-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.essay-title a:hover {
  color: var(--accent-cyan);
}

.essay-summary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  font-weight: 300;
}

.essay-link {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.essay-link:hover {
  color: var(--accent-cyan-bright);
}

.essay-link::after {
  content: " →";
  font-size: 12px;
}

/* ---------- About preview (homepage) ---------- */
.about-preview {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 64px;
  text-align: left;
}

.about-preview h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.5px;
  margin-bottom: 32px;
}

.about-preview p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 300;
  max-width: 640px;
}

.about-preview .read-about {
  display: inline-block;
  margin-top: 24px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  text-decoration: none;
}

.about-preview .read-about::after {
  content: " →";
}

/* ---------- Subscribe section ---------- */
.subscribe {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 64px;
  border-top: 1px solid var(--rule);
}

.subscribe-content {
  max-width: 560px;
}

.subscribe-eyebrow {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  font-weight: 400;
}

.subscribe h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: var(--text);
}

.subscribe-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-weight: 300;
}

.subscribe-form {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin-bottom: 16px;
  border: 1px solid var(--rule);
  background: rgba(15, 23, 42, 0.4);
  transition: border-color 0.2s ease;
}

.subscribe-form:focus-within {
  border-color: var(--accent-cyan);
}

.subscribe-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 14px 18px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.3px;
  outline: none;
}

.subscribe-form input::placeholder {
  color: var(--text-dim);
}

.subscribe-form button {
  background: transparent;
  border: none;
  border-left: 1px solid var(--rule);
  color: var(--accent-cyan);
  padding: 14px 24px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.subscribe-form button:hover {
  background: var(--accent-cyan);
  color: var(--bg);
}

.subscribe-note {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 480px;
}

@media (max-width: 768px) {
  .subscribe {
    padding: 48px 24px;
  }

  .subscribe h2 {
    font-size: 28px;
  }

  .subscribe-form {
    flex-direction: column;
  }

  .subscribe-form button {
    border-left: none;
    border-top: 1px solid var(--rule);
  }
}

/* ---------- Footer ---------- */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 64px 48px;
  border-top: 1px solid var(--rule);
}

footer p {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-align: center;
}

/* ============================================================
   Essay page styles
   ============================================================ */

.essay-page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.essay-page-meta {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.essay-page-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 48px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  color: var(--text);
}

.essay-page-subtitle {
  font-size: 20px;
  line-height: 1.4;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-weight: 300;
  font-style: italic;
}

.essay-page-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  font-weight: 300;
}

.essay-page-body p {
  margin-bottom: 24px;
}

.essay-page-body h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 400;
  margin: 56px 0 24px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.essay-page-body h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 400;
  margin: 40px 0 16px;
  color: var(--text);
}

.essay-page-body strong {
  font-weight: 600;
  color: var(--text);
}

.essay-page-body em {
  font-style: italic;
  color: var(--text);
}

.essay-page-body blockquote {
  border-left: 2px solid var(--accent-cyan);
  padding-left: 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--text-muted);
}

.essay-page-body a {
  color: var(--accent-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(45, 212, 191, 0.3);
  transition: border-color 0.2s ease;
}

.essay-page-body a:hover {
  border-bottom-color: var(--accent-cyan);
}

.essay-page-body img,
.essay-page-body svg {
  display: block;
  margin: 48px auto;
  max-width: 100%;
  height: auto;
}

.essay-page-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}

.essay-page-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

.essay-page-footer .hashtags {
  display: block;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.pdf-download {
  display: inline-block;
  margin-bottom: 48px;
  padding: 12px 24px;
  border: 1px solid var(--rule);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.pdf-download:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.pdf-download::before {
  content: "↓ ";
  margin-right: 4px;
}

.essay-page-diagram {
  margin: 56px 0;
  padding: 32px;
  background: rgba(2, 6, 23, 0.4);
  border: 1px solid var(--rule);
  text-align: center;
}

.essay-page-diagram svg {
  max-width: 100%;
  height: auto;
}

.essay-page-diagram-caption {
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}

.essay-page-back {
  display: inline-block;
  margin-bottom: 48px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.essay-page-back:hover {
  color: var(--accent-cyan);
}

.essay-page-back::before {
  content: "← ";
}

/* ============================================================
   About page styles
   ============================================================ */

.about-page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.about-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 48px;
}

.about-portrait {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--rule);
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-intro {
  flex: 1;
}

.about-page h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 48px;
  font-weight: 400;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--text);
}

.about-byline {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 400;
  margin-bottom: 0 !important;
}

@media (max-width: 768px) {
  .about-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .about-portrait {
    width: 96px;
    height: 96px;
  }
}

.about-page h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 400;
  margin: 56px 0 20px;
  color: var(--text);
}

.about-page p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  font-weight: 300;
  margin-bottom: 20px;
}

.about-page .muted {
  color: var(--text-muted);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .side-label {
    display: none;
  }

  .top-nav {
    padding: 24px 24px;
  }

  .hero {
    padding: 48px 24px 64px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero .subtitle {
    font-size: 17px;
  }

  .hero-artwork {
    display: none;
  }

  .essays {
    padding: 48px 24px;
  }

  .essays h2 {
    font-size: 28px;
  }

  .essay {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .essay-number, .essay-date {
    margin-bottom: 0;
  }

  .essay-title {
    font-size: 20px;
  }

  .about-preview {
    padding: 48px 24px;
  }

  .about-preview h2 {
    font-size: 28px;
  }

  .essay-page-title {
    font-size: 32px;
  }

  .essay-page-subtitle {
    font-size: 17px;
  }

  .essay-page-body {
    font-size: 16px;
  }

  .about-page h1 {
    font-size: 32px;
  }
}
