@import url("fonts/montserrat.css");

/* Brandon Grotesque Light — only the Light weight is available, mapped to the
   weights the site actually uses (300/400) so it renders everywhere. */
@font-face {
  font-family: "Brandon Grotesque";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/brandon-grotesque-light.woff2") format("woff2");
}
@font-face {
  font-family: "Brandon Grotesque";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/brandon-grotesque-light.woff2") format("woff2");
}

/* DIN Next LT Ultralight — used only for the big name heading. */
@font-face {
  font-family: "DIN Next Ultralight";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/din-next-ultralight.woff2") format("woff2");
}

:root {
  --ink: #414141;
  --blue: #0d5eba;
  --blue-soft: #5a86c4;
  --muted: #9a9a9a;
  --bg: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Brandon Grotesque", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap {
  padding: 110px 40px 90px 84px;
}
body.home {
  min-height: 100vh;   /* fallback for old browsers */
  min-height: 100dvh;  /* tracks the real viewport (accounts for mobile toolbars) */
  display: flex;
  flex-direction: column;
}
body.home .wrap { padding-bottom: 0; }

/* Heading — fixed 60px to match the original */
h1 {
  font-family: "DIN Next Ultralight", "Brandon Grotesque", "Montserrat", sans-serif;
  font-weight: 300;
  font-size: 60px;
  line-height: 84px;
  letter-spacing: 0;
  margin: 0;
}
h1 a { color: var(--ink); }
h1 a:hover { text-decoration: none; }

.subtitle {
  font-size: 27px;
  font-weight: 300;
  letter-spacing: 0.24px;
  margin: -12px 0 0;
  color: var(--ink);
}

.section-label {
  font-size: 26px;
  font-weight: 300;
  color: var(--ink);
  margin: 30px 0 26px;
}
.archive-page .section-label { margin-bottom: 12px; }
.about-page .footer-nav { margin-top: 18px; }

/* Home nav — text aligns with the heading, GIF hangs into the left margin */
.home-nav {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
}
.home-nav li {
  position: relative;
  margin: 0 0 14px 0;
  line-height: 0;
}
.home-nav .ico {
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 26px;
  object-fit: contain;
}
.home-nav a {
  display: inline-block;
  font-size: 30px;
  line-height: 32px;
  font-weight: 300;
  color: var(--ink);
  transform-origin: left center;
  transition: transform 0.18s ease;
}
.home-nav a:hover { transform: scale(1.06); }
.home-nav a.blue { color: var(--blue); }

.social {
  margin-top: 22px;
}
.social .x {
  display: inline-block;
  font-size: 26px;
  color: var(--blue);
  line-height: 1;
  vertical-align: middle;
}
.social .ig {
  display: inline-block;
  margin-left: 5px;
  color: var(--blue);
  vertical-align: middle;
  opacity: 0.65;
}
.social .ig svg {
  display: block;
  width: 24px;
  height: 24px;
}
.email-label {
  font-size: 16px;
  color: var(--ink);
  margin-right: 4px;
}
.social .email {
  display: inline;
  font-size: 16px;
  color: var(--blue);
}

/* Small screens: scale down, pull content to the left edge */
@media (max-width: 680px) {
  .wrap { padding: 48px 22px 28px 22px; }
  h1 { font-size: clamp(24px, 9vw, 40px); line-height: 1.12; white-space: nowrap; }
  .subtitle { font-size: 20px; margin-top: -4px; }
  .section-label { font-size: 21px; }
  /* Nav links match the subtitle size */
  .home-nav a { font-size: 24px; }
  /* GIF sits inside the content (not hanging into the margin) so nothing clips */
  .home-nav li { padding-left: 26px; margin-bottom: 8px; }
  .home-nav .ico { left: 0; }
  /* Archive listings smaller than the "Archive" label */
  .archive-page .archive li { font-size: 15px; }
  /* image sits under contact and fills down to the footer (crops bottom, no white).
     body.home prefix raises specificity so this wins over the base .art-img rule. */
  body.home .art-img {
    flex: 1 1 auto;
    min-height: 0;
    object-fit: cover;
    object-position: top center;
    margin: 128px 0 0;
  }

  /* Photo between the paragraphs (after "…perspectives.", before the BA/MA line), centered */
  .about-page .about-figure--float { display: none; }
  .about-page .about-figure--mid {
    display: block;
    float: none;
    width: 36%;
    max-width: 140px;
    margin: 6px auto 24px;   /* centered between the two paragraphs */
  }
  .about-page .footer-nav { margin-top: 30px; }

}

/* About: small photo floated right on the degrees line, text wraps left */

/* About page image — centered, scaled down */
/* Desktop: photo floats right in the bio, text wraps left */
.about-figure--float {
  float: right;
  width: 126px;            /* 30% smaller than 180px */
  max-width: 45%;
  margin: 6px 0 14px 28px; /* hugs the right edge of the text column; text wraps left */
}
/* Mid photo (between paragraphs) is mobile-only */
.about-figure--mid { display: none; }

/* Bio photo hidden for now — remove this rule to bring it back */
.about-page .about-figure { display: none !important; }
.about-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.about-figure figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

/* Home art: full painting, then the carpet (bleed.jpg) tiles down to fill the footer */
.art-img {
  display: block;
  width: 100%;              /* mobile: full width */
  height: auto;            /* full uncropped painting */
  flex: 0 0 auto;
  margin: auto 0 0;        /* pegged to the footer; extra space grows above */
}

/* Desktop: name width (A→o), left-aligned, pegged to the footer */
@media (min-width: 681px) {
  .art-img {
    width: 540px;
    max-width: 100%;
    margin: auto 0 0 84px;   /* pegged to bottom; left 84px aligns with the "A" */
  }
}

/* Archive category headers */
.archive-cat {
  font-size: 19px;
  font-weight: 300;
  color: var(--ink);
  margin: 34px 0 14px;
}
.section-label + .archive-cat { margin-top: 14px; }  /* tighten the gap under "Archive" */

/* Source line beneath a category header (e.g. columns → 3 Quarks Daily) */
.archive-sub {
  font-size: 14px;
  font-weight: 300;
  color: #6a6a6a;
  margin: -8px 0 12px;
}

/* Archive list */
.archive {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.archive li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--ink);
}
.archive li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.4;
}
.archive li a { color: var(--blue); }
.archive .venue { color: var(--ink); }
.archive .date { color: var(--muted); font-size: 0.82em; }

/* About */
.about-body {
  max-width: 540px;   /* same width as the name heading — lines end under the "o" in Cebalo */
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.6;
}
.about-body p { margin: 0 0 26px; }
.about-body em { font-style: italic; }
.about-body a { color: var(--blue); }

.footer-nav {
  margin-top: 70px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.footer-nav a {
  display: inline-block;
  color: var(--blue-soft);
  letter-spacing: 0.06em;
  font-size: 16px;
}
.footer-nav a:hover {
  outline: 1px dotted var(--blue-soft);
  outline-offset: 4px;
}
