/* ==========================================================================
   Cxr/ Factory — Produce journal
   Design spec: designs/*.png + *.txt (Outfit typeface, #1F1F1F / #555555 ink)
   ========================================================================== */

/* ---------- Fonts: Outfit (local files) ---------- */
@font-face { font-family: "Outfit"; font-weight: 100; src: url("../fonts/Outfit-Thin.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 200; src: url("../fonts/Outfit-ExtraLight.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 300; src: url("../fonts/Outfit-Light.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 400; src: url("../fonts/Outfit-Regular.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 500; src: url("../fonts/Outfit-Medium.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 600; src: url("../fonts/Outfit-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 700; src: url("../fonts/Outfit-Bold.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 800; src: url("../fonts/Outfit-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Outfit"; font-weight: 900; src: url("../fonts/Outfit-Black.ttf") format("truetype"); }

/* ---------- Tokens ---------- */
:root {
  --ink: #1F1F1F;          /* default color eq #1f1f1f */
  --muted: #555555;        /* other-article date/summary, article summary */
  --paper: #FFFFFF;
  --line-thick: 4pt;       /* header rule  */
  --line-thin: 3pt;        /* title rule / picture stroke */
  --radius-picture: 36px;  /* latest article picture corner */
  --radius-search: 23.55px;/* search rectangle corner */
  --maxw: 1440px;
  --gap: clamp(24px, 5vw, 72px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Outfit", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
  letter-spacing: 0.01em;
  font-synthesis: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 64px) clamp(20px, 4vw, 56px) clamp(48px, 6vw, 96px);
}

/* ---------- Rules (lines) ---------- */
.rule-thick { border: 0; border-top: var(--line-thick) solid var(--ink); }
.rule-thin  { border: 0; border-top: var(--line-thin)  solid var(--ink); }

/* ==========================================================================
   HOME
   ========================================================================== */

/* Header — 52pt Outfit-SemiBold + 4pt line eq window width */
.site-header { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.site-title {
  font-size: clamp(28px, 3.6vw, 52pt);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}
.site-tagline {
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
}

/* Masthead — 70pt Outfit-Medium + 32pt Regular description (same row) */
.masthead {
  margin-top: clamp(24px, 3vw, 40px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.masthead-title {
  font-size: clamp(40px, 6.5vw, 70pt);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0.01em;
}
.masthead-desc {
  font-size: clamp(17px, 2.2vw, 32pt);
  font-weight: 400;
  text-align: right;
  max-width: 24ch;
  line-height: 1.2;
}
.masthead .rule-thin { margin-top: clamp(14px, 2vw, 26px); flex-basis: 100%; }

/* Subtitle — 35pt Outfit-Medium */
.subtitle {
  font-size: clamp(22px, 2.6vw, 35pt);
  font-weight: 500;
  margin-bottom: clamp(18px, 2.5vw, 32px);
  line-height: 1.1;
}

/* Body: two-column magazine layout */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

/* ---- Latest article (left) ---- */
.latest-picture {
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius-picture);
  aspect-ratio: 1174 / 453;   /* latest article picture: 1174x453px */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, #fafafa 0 14px, #f2f2f2 14px 28px);
  color: #9a9a9a;
  font-size: 28px;
  font-weight: 400;
}
.latest-picture img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius-picture) - 4px); }

.latest-body {
  margin-top: clamp(16px, 2vw, 28px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}

.latest-title {
  font-size: clamp(22px, 2.6vw, 35pt);
  font-weight: 500;
  line-height: 1.15;
}
.latest-meta {
  margin-top: clamp(8px, 1vw, 14px);
  font-size: clamp(16px, 1.9vw, 27pt);
  font-weight: 400;
}
.latest-summary {
  font-size: clamp(16px, 1.9vw, 27pt);
  font-weight: 400;
  max-width: 40ch;
}

/* ---- Other articles (right sidebar) ---- */
.other-list { list-style: none; }
.other-item { padding: clamp(14px, 1.8vw, 24px) 0; border-bottom: 1px solid #d9d9d9; }
.other-item:last-child { border-bottom: 0; padding-bottom: 0; }
.other-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.other-title {
  font-size: clamp(18px, 2vw, 29pt);
  font-weight: 500;
  line-height: 1.15;
}
.other-date {
  font-size: clamp(14px, 1.6vw, 24pt);
  font-weight: 300;
  color: var(--muted);
  white-space: nowrap;
}
.other-summary {
  margin-top: 8px;
  font-size: clamp(14px, 1.6vw, 24pt);
  font-weight: 300;
  color: var(--muted);
}

/* ==========================================================================
   ARTICLE DETAILS
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-size: clamp(14px, 1.7vw, 24pt);
  font-weight: 200;                 /* Path: 24pt Outfit ExtraLight */
  margin-top: clamp(18px, 2.5vw, 32px);
}
.breadcrumb .crumb-home { font-weight: 500; color: var(--ink); }  /* Title: 35pt Medium */
.back-link {
  display: inline-block;
  margin-top: clamp(22px, 3vw, 40px);
  font-size: clamp(14px, 1.7vw, 24pt);
  font-weight: 500;                 /* Back Link: 24pt Outfit-Medium */
}
.back-link::before { content: "\2039\2039  "; }   /* ‹‹  */

.article-body { margin-top: clamp(36px, 5vw, 72px); }

.article-title {
  font-size: clamp(28px, 4.2vw, 55pt);
  font-weight: 500;                 /* Article Title: 55pt Medium */
  line-height: 1.08;
}
.article-summary {
  margin-top: clamp(16px, 2.4vw, 30px);
  font-size: clamp(18px, 2.3vw, 30pt);
  font-weight: 300;                 /* Summary: 30pt Light #555 */
  color: var(--muted);
  max-width: 46ch;
}
.article-meta {
  margin-top: clamp(18px, 2.5vw, 34px);
  font-size: clamp(15px, 1.9vw, 26pt);
  font-weight: 400;                 /* Author / Release Date: 26pt Regular */
  display: grid;
  gap: 4px;
}
.article-content {
  margin-top: clamp(28px, 4vw, 56px);
  font-size: clamp(15px, 1.9vw, 26pt);
  font-weight: 400;                 /* Content: 26pt Regular */
  max-width: 72ch;
}
.article-content p + p { margin-top: 1.1em; }
.article-content h1,
.article-content h2,
.article-content h3 {
  font-weight: 500;
  line-height: 1.2;
  margin: 1.6em 0 0.5em;
}
.article-content h1 { font-size: 1.7em; }
.article-content h2 { font-size: 1.35em; }
.article-content h3 { font-size: 1.15em; }
.article-content ul,
.article-content ol { margin: 1em 0 1em 1.5em; }
.article-content li { margin: 0.35em 0; }
.article-content a { text-decoration: underline; text-underline-offset: 4px; }
.article-content code {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.82em;
  background: #f2f2f2;
  padding: 0.1em 0.4em;
  border-radius: 4px;
}
.article-content blockquote {
  margin: 1.2em 0;
  padding-left: 1.2em;
  border-left: 3px solid var(--ink);
  color: var(--muted);
}
.article-content img { margin: 1.2em 0; border-radius: var(--radius-picture); }
.content-marker { font-family: "Consolas", "Courier New", monospace; font-size: 0.78em; opacity: 0.72; }

/* ==========================================================================
   PUBLICATIONS (scroll-down page)
   ========================================================================== */

.pub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.pub-title {
  font-size: clamp(28px, 4.2vw, 55pt);
  font-weight: 600;                 /* Title: 55pt Semibold */
  line-height: 1;
}

/* Search pill */
.search {
  display: flex;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius-search);
  padding: 0 clamp(16px, 2vw, 28px);
  min-height: clamp(44px, 3.4vw, 64px);
  min-width: clamp(220px, 24vw, 380px);
  color: #999999;
  font-size: clamp(18px, 2.3vw, 33pt);   /* Hint text: 33pt Regular */
  font-weight: 400;
  user-select: none;
}
.search input {
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  width: 100%;
}
.search input::placeholder { color: #b3b3b3; }

/* Table */
.pub-table {
  margin-top: clamp(30px, 4.5vw, 64px);
  width: 100%;
  border-collapse: collapse;
}
.pub-table th {
  text-align: left;
  font-size: clamp(20px, 2.8vw, 37pt);
  font-weight: 500;                 /* Table Title: 37pt Medium */
  padding: 0 8px clamp(14px, 1.6vw, 22px);
  border-bottom: var(--line-thin) solid var(--ink);
  white-space: nowrap;
}
.pub-table td {
  text-align: left;
  font-size: clamp(16px, 2.2vw, 30pt);
  font-weight: 400;                 /* Table Body: 30pt Regular */
  padding: clamp(12px, 1.6vw, 22px) 8px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: baseline;
}
.pub-table tr:last-child td { border-bottom: 0; }
.pub-table .cell-date { white-space: nowrap; color: var(--muted); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .latest-body { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; gap: 6px; }
  .site-tagline { white-space: normal; }
  .pub-table th, .pub-table td { white-space: normal; }
}
