/* ============================================================
   MARI ANOIAN — site stylesheet
   Tokens: paper #FFFFFF / ink #14140F / signal #FF3EA5 (fluorescent pink)
   Display: Times New Roman (headings) — Body: Inter — Meta: IBM Plex Mono
   Block system: every page is built from two repeatable units —
   .block--text and .block--image. Duplicate freely.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;1,9..144,400;1,9..144,500&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #FFFFFF;
  --paper-dim: #F3F2ED;
  --ink: #14140F;
  --ink-soft: #5B5B52;
  --ink-faint: #8C8C80;
  --line: #E1E0D6;
  --signal: #FF3EA5;

  --font-display: 'Times New Roman', Times, 'Liberation Serif', serif;
  --font-brand: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: 20px;
  --max-w: 760px;
  --max-w-wide: 1040px;
}

@media (min-width: 640px) { :root { --gutter: 48px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--signal); color: var(--paper); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* ---------- layout shell ---------- */

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--wide { max-width: var(--max-w-wide); }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  max-width: 920px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 20px;
}

@media (min-width: 640px) { .site-header .wrap { padding: 0 48px; } }

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
}

/* Swappable mark: replace .brand-mark with <img class="brand-icon" src="your-icon.svg" alt="Home"> */
.brand-mark { font-family: var(--font-brand); font-style: italic; font-size: 20px; letter-spacing: 0.01em; }
.brand-icon { height: 22px; width: auto; }

.signal-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal); display: inline-block;
  animation: pulse 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .signal-dot { animation: none; opacity: 0.85; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }

nav.main-nav {
  display: flex;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

nav.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
nav.main-nav a:hover { color: var(--ink); border-color: var(--ink-faint); }
nav.main-nav a[aria-current="page"] { color: var(--ink); border-color: var(--signal); }

@media (max-width: 380px) {
  .site-header .wrap { padding: 0 14px; }
  nav.main-nav { gap: 14px; font-size: 10.5px; }
  .brand-mark { font-size: 18px; }
}

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 32px 0 48px; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-faint); letter-spacing: 0.02em;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line); }
.site-footer a:hover { color: var(--signal); border-color: var(--signal); }

/* ---------- typography ---------- */

.eyebrow {
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-faint); margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; margin: 0 0 0.4em; }
h1 { font-size: clamp(32px, 7vw, 54px); font-style: italic; font-weight: 400; }
h2 { font-size: clamp(20px, 4vw, 26px); }
p { margin: 0 0 1.3em; color: var(--ink); }
p:last-child { margin-bottom: 0; }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 58ch; }
hr.rule { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; }

.page-hero { padding: 48px 0 32px; }
@media (min-width: 640px) { .page-hero { padding: 80px 0 48px; } }

/* ============================================================
   BLOCK SYSTEM — the only two units you need on any page.
   .block--text   → paste/edit copy inside the <p>
   .block--image  → replace the .image-placeholder div with <img>
   .block--heading → editable section title (portfolio uses this)
   Wrap a text+image pair in .block-pair to keep them grouped
   and spaced as one unit. Duplicate a whole .block-pair to add
   another entry anywhere on the page.
   ============================================================ */

.block {
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
  margin-bottom: 14px;
}
.block::before {
  content: attr(data-label);
  position: absolute; top: -11px; left: 14px;
  background: var(--paper); padding: 0 8px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint);
  display: none;
}

.block--heading { padding: 0; }
.block--heading h2 { margin: 0; }

/* Empty image blocks stay invisible until edit mode is on,
   or until an image has actually been uploaded into them. */
.block--image.is-empty { display: none; }

/* ---------- edit mode ---------- */

body.edit-mode .block {
  border: 1px dashed var(--line);
  background: var(--paper-dim);
  padding: 18px;
}
body.edit-mode .block::before { display: block; }
body.edit-mode .block--heading {
  border-style: solid;
  border-color: var(--ink-faint);
  padding: 14px 18px;
}
body.edit-mode .block--image.is-empty { display: flex; align-items: center; }

body.edit-mode [contenteditable="true"] {
  cursor: text;
  border-radius: 2px;
}
body.edit-mode [contenteditable="true"]:focus {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}
body.edit-mode .block--image {
  cursor: pointer;
}
body.edit-mode .block--image:hover { outline: 2px dashed var(--signal); outline-offset: 2px; }

/* ---------- edit toolbar ---------- */

#edit-toolbar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 50;
  display: flex;
  gap: 8px;
}

.edit-toolbar__btn {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 10px 14px;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.edit-toolbar__btn:hover { background: var(--signal); }

.edit-toolbar__btn--export {
  display: none;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-faint);
  box-shadow: none;
}
.edit-toolbar__btn--export:hover { background: var(--paper); border-color: var(--signal); color: var(--signal); }

body.edit-mode .edit-toolbar__btn--export { display: inline-block; }

.image-placeholder {
  aspect-ratio: 4 / 3;
  width: 100%;
  background: repeating-linear-gradient(45deg, var(--line), var(--line) 1px, transparent 1px, transparent 14px);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint);
  text-align: center; padding: 12px;
}

.block-pair { margin-bottom: 48px; }
.block-pair:last-child { margin-bottom: 0; }
.block-pair .block:last-child { margin-bottom: 0; }

/* ---------- CV / Experience: looser vertical rhythm ---------- */

.cv-stack > .block { margin-bottom: 36px; }
.cv-stack > .block:last-child { margin-bottom: 0; }
.cv-stack > .block--heading { margin-top: 12px; }

/* ---------- portfolio: two aspects, grid on desktop ---------- */

.portfolio-columns { }
.portfolio-column + .portfolio-column { margin-top: 64px; }

@media (min-width: 760px) {
  .portfolio-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 96px;
    align-items: start;
  }
  .portfolio-column + .portfolio-column { margin-top: 0; }
}

.portfolio-column .block--heading { margin-bottom: 24px; }

/* Art Practice images run slightly smaller and centered */
.portfolio-column:first-child .block--image img {
  max-width: 82%;
  margin: 0 auto;
}

/* XP image specifically smaller, per request */
.block--image.img-xs img {
  max-width: 55%;
  margin: 0 auto;
}

/* GOD IN EVERY THING image sized down to match the rest of Art Practice */
.block--image.img-sm img {
  max-width: 65%;
  margin: 0 auto;
}

.block--image a { display: block; }
.block--image a img { cursor: pointer; }
