/* ==========================================================================
   Portfolio — base stylesheet
   Palette pulled from the inspo: warm cream paper, denim/cobalt blue,
   museum greens and slate, a single ochre accent, near-black ink.
   ========================================================================== */

:root {
  /* Color */
  --paper: #f8f4ec;      /* page background */
  --cream: #efe8d9;      /* secondary surface */
  --ink: #1c1c1a;        /* body text */
  --ink-soft: #55534d;   /* secondary text */
  --cobalt: #3f72cf;     /* signature blue */
  --forest: #2f3d2e;     /* deep green panel */
  --slate: #3a4144;      /* charcoal panel */
  --ochre: #c8924b;      /* warm accent */
  --line: rgba(28, 28, 26, 0.16);

  /* Type */
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  /* Body font. To change it, update this + the Google Fonts link in each page <head>. */
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
}

*, *::before, *::after { 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.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

/* Custom "Luna" cursor everywhere (replaces the arrow, hand and text cursor).
   Hotspot (0 4) = her nose. The 2x file keeps the pixel art crisp on retina
   screens; browsers that can't use it fall back to the 1x line, then to the
   normal arrow. */
html, * {
  cursor: url("/assets/img/luna.png") 0 4, auto;
  cursor: -webkit-image-set(url("/assets/img/luna.png") 1x, url("/assets/img/luna@2x.png") 2x) 0 4, auto;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}

em, .italic { font-style: italic; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 8px 12px;
}
.skip-link:focus { left: 8px; top: 8px; z-index: 10; }

/* ---------- Small type utilities ---------- */

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
}
.link-arrow::before { content: "\2192"; font-size: 13px; letter-spacing: 0; }
.link-arrow:hover { text-decoration: underline; }

/* Oval "No. 01" badge from the Denim template */
.badge {
  display: inline-block;
  padding: 4px 16px 5px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

/* Black circle arrow from the Bruegel layout */
.arrow-dot {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-size: 16px; flex: none;
}

/* ---------- Header / nav ---------- */

.site-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px;
  max-width: var(--max); margin: 0 auto;
  padding: 24px var(--gutter);
  font-size: 15px; line-height: 1.3;
}
.brand { text-decoration: none; }
.brand strong { font-weight: 500; }
.site-nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- Hero (big centered serif with side meta) ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(0, 3fr) 1fr;
  align-items: center;
  gap: 24px;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(32px, 6vw, 88px) var(--gutter) clamp(40px, 7vw, 104px);
}
.hero__title {
  text-align: center;
  font-size: clamp(56px, 10vw, 156px);
  line-height: 0.95;
}
.hero__title-group { text-align: center; }
.hero__subtitle {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(22px, 2.4vw, 34px); line-height: 1.2;
  max-width: 26ch; margin: 20px auto 0;
}
.hero__meta { font-size: 15px; line-height: 1.35; margin: 0; }
.hero__meta--right { text-align: right; }

/* ---------- Full-bleed image with overlapping panel ---------- */

.feature { position: relative; }
.feature__img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.feature__panel {
  position: absolute; right: 0; bottom: 0;
  width: 50%;
  padding: clamp(28px, 4vw, 64px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  min-height: 60%;
}
.feature__panel p { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.45; text-align: center; max-width: 30ch; margin: 0 auto; }

/* ---------- Color panels ---------- */

.panel--forest { background: var(--forest); color: var(--paper); }
.panel--slate  { background: var(--slate);  color: var(--paper); }
.panel--cobalt { background: var(--cobalt); color: var(--paper); }
.panel--ochre  { background: var(--ochre);  color: var(--paper); }
.panel--cream  { background: var(--cream); }
.panel--paper  { background: var(--paper); }


/* ---------- Film grain on solid color blocks ---------- */
/* A tiled SVG noise texture + soft vignette laid over each colored block.
   Tune strength with --grain-opacity; set it to 0 to turn the effect off. */
:root { --grain-opacity: 0.45; }

.panel--forest, .panel--slate, .panel--cobalt, .panel--ochre, .panel--cream,
.site-footer {
  position: relative;
  isolation: isolate;
}
.panel--forest::after, .panel--slate::after, .panel--cobalt::after,
.panel--ochre::after, .panel--cream::after, .site-footer::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at center, transparent 55%, rgba(20, 16, 10, 0.22) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.4' intercept='-0.7'/%3E%3CfeFuncG type='linear' slope='2.4' intercept='-0.7'/%3E%3CfeFuncB type='linear' slope='2.4' intercept='-0.7'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 100% 100%, 220px 220px;
  mix-blend-mode: overlay;
  opacity: var(--grain-opacity);
}
/* keep the bio panel layered over the image */
.feature .feature__panel { position: absolute; }

/* ---------- Tile grid (Bruegel-style 4-up blocks) ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: clamp(20px, 2.4vw, 36px);
  display: flex; flex-direction: column; justify-content: space-between;
  text-decoration: none;
  overflow: hidden;
}
.tile .badge { align-self: flex-start; }
.tile--img { padding: 0; }
.tile--img img { width: 100%; height: 100%; object-fit: cover; }
.tile--center { justify-content: center; }
.tile__title { font-family: var(--font-body); font-size: clamp(20px, 2vw, 30px); line-height: 1.25; font-weight: 400; }
.tile__label { display: block; font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -0.01em; font-family: var(--font-body); line-height: 1.15; }
.tile__desc { display: block; margin-top: 10px; font-size: 14px; line-height: 1.45; max-width: 28ch; }
a.tile:hover .tile__title,
a.tile:hover .tile__label { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* "Who is → Bruegel" split tile pair */
.tile-pair { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; position: relative; text-decoration: none; }
.tile-pair .tile { aspect-ratio: auto; justify-content: center; }
.tile-pair .arrow-dot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; }

/* ---------- Statement block (Denim-style blue quote card) ---------- */

.statement {
  padding: clamp(64px, 10vw, 160px) var(--gutter);
  text-align: center;
}
.statement__text {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.02;
  max-width: 16ch; margin: 24px auto;
}

/* ---------- Generic section ---------- */

.section {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(56px, 8vw, 120px) var(--gutter);
}
.section + .section { padding-top: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(24px, 5vw, 80px);
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.split__label { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.split__label h2 { font-size: clamp(32px, 3.6vw, 52px); }
.split__body { font-size: clamp(16px, 1.3vw, 18px); max-width: 62ch; }
.split__body .lede {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 42px); line-height: 1.15;
  color: var(--cobalt);
  margin-bottom: 1em;
}


/* ---------- Projects index ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter) clamp(56px, 8vw, 120px);
}
.project-card {
  display: flex; flex-direction: column; gap: 20px;
  padding: clamp(20px, 2vw, 28px);
  text-decoration: none;
  transition: transform 0.25s ease;
}
.project-card:hover { transform: translateY(-4px); }
.project-card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.project-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.project-card h2 { font-size: clamp(34px, 3.2vw, 48px); }
.project-card h2 em { display: block; }
.project-card p { font-size: 14px; line-height: 1.45; margin: 0; max-width: 40ch; }
.project-card--quote { justify-content: center; align-items: center; text-align: center; min-height: 100%; }
.project-card--quote .statement__text { font-size: clamp(34px, 3.6vw, 56px); }

/* ---------- Project detail ---------- */

.cover { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

.overview { display: grid; grid-template-columns: 1fr 1fr; }
.overview > div { padding: clamp(32px, 5vw, 80px); }
.overview__summary {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 44px); line-height: 1.15;
  margin: 24px 0 0;
}
.overview dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0 32px; }
.overview dt, .overview dd { border-top: 1px solid var(--line); padding: 14px 0; margin: 0; }
.overview dt { color: var(--ink-soft); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 17px; }

.image-pair {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter) clamp(56px, 8vw, 120px);
}
.image-pair figure { margin: 0; }
.image-pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); }
.metric { padding: clamp(28px, 3vw, 48px); min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.metric__value { font-family: var(--font-serif); font-size: clamp(64px, 7vw, 112px); line-height: 0.9; }
.metric__label { font-size: 16px; max-width: 24ch; }

.next-project {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.next-project h2 { font-size: clamp(44px, 7vw, 104px); }
.next-project:hover h2 { font-style: italic; }
.next-project__name { text-align: center; }
.next-project__name p { font-family: var(--font-serif); font-style: italic; font-size: clamp(18px, 1.8vw, 24px); margin-top: 8px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--cobalt); color: var(--paper); }
.site-footer__inner {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) var(--gutter) 28px;
  display: grid; gap: 64px;
}
.site-footer h2 { font-size: clamp(56px, 10vw, 152px); line-height: 0.95; }
.site-footer__row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.site-footer__links { display: flex; gap: 24px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero__title { grid-column: 1 / -1; grid-row: 1; }
  .feature__img { aspect-ratio: 4 / 3; }
  .feature .feature__panel { position: relative; width: 100%; min-height: 0; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .overview { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 200px; }
  .cover { aspect-ratio: 4 / 3; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .site-header { flex-direction: column; gap: 12px; }
  .site-nav { justify-content: flex-start; gap: 18px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 4 / 3; }
  .tile-pair { grid-column: auto; }
  .tile-pair .tile { aspect-ratio: 1 / 1; }
  .project-grid { grid-template-columns: 1fr; }
  .image-pair { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
