/* Fonts are hosted on the site itself (not loaded from Google), Latin only.
   Licences: fonts/OFL-*.txt (SIL Open Font License). */
@font-face {
  font-family: "Newsreader"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("fonts/newsreader.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader"; font-style: italic; font-weight: 300 500; font-display: swap;
  src: url("fonts/newsreader-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/instrument-sans.woff2") format("woff2");
}

/* Layout: a 12-column editorial grid. Titles sit in a left margin column,
   text in a narrow reading column; wide photos break between chapters. */
:root {
  --stone: #E6E7E1;       /* page ground, lichen on rock */
  --ink: #1C2621;         /* deep spruce text */
  --moss: #5C6660;        /* secondary text */
  --indigo: #33406E;      /* links and the one button */
  --indigo-deep: #262F54; /* button hover */
  --line: #C9CCC3;        /* rules */
  --veil: #D5D8D0;        /* photo placeholders */
  --alert: #8C2F2B;       /* form errors */

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 78rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 10; padding: .5rem .75rem;
  background: var(--stone); color: var(--ink); font-family: var(--sans);
}

/* Header: pinned to the top while scrolling */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--stone); border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 2rem; padding-block: 1rem;
}
.site-name { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.125rem; text-decoration: none; letter-spacing: .01em; }
.logo { display: block; width: 2rem; height: 2rem; object-fit: contain; flex: none; }
.logo--placeholder { border: 1px dashed var(--moss); border-radius: 50%; }
.nav { display: flex; align-items: center; gap: 1.75rem; font-family: var(--sans); font-size: .9375rem; }
.nav a {
  color: var(--moss); text-decoration: none;
  padding-block: .25rem; border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--indigo); }

/* Work dropdown */
.has-sub { position: relative; display: flex; align-items: baseline; gap: .15rem; }
.sub-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; padding: 0; margin: 0; align-self: center;
  background: none; border: 0; color: var(--moss); cursor: pointer;
  position: relative;
}
/* Larger invisible touch area (about 44px tall), not reaching over the Work link */
.sub-toggle::after { content: ""; position: absolute; inset: -10px -10px -10px -2px; }
.sub-toggle svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .2s ease; }
.has-sub:hover .sub-toggle, .sub-toggle:focus-visible { color: var(--ink); }
.sub {
  position: absolute; top: 100%; left: -1rem; z-index: 5;
  list-style: none; margin: 0; padding: .9rem 0 0;
  min-width: 11rem;
  visibility: hidden; opacity: 0; transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.sub::before {
  content: ""; position: absolute; inset: .5rem 0 0 0; z-index: -1;
  background: var(--stone); border: 1px solid var(--line);
}
.sub li a { display: block; padding: .55rem 1rem; border: 0; color: var(--moss); }
.sub li a:hover, .sub li a[aria-current] { color: var(--ink); }
.sub li a[aria-current] { text-decoration: underline; text-decoration-color: var(--indigo); text-underline-offset: .3em; }
.sub li:last-child a { padding-bottom: .8rem; }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub {
  visibility: visible; opacity: 1; transform: none; transition-delay: 0s;
}
.has-sub:hover .sub-toggle svg, .has-sub.open .sub-toggle svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .sub, .sub-toggle svg { transition: none; } }

/* Shared grid */
.grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem var(--gutter);
}
.margin-col { grid-column: 1 / span 4; }
.main-col { grid-column: 5 / span 7; min-width: 0; }

/* Links with intent */
.text-link {
  color: var(--indigo); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
  font-family: var(--sans); font-size: 1rem;
}
.text-link:hover { color: var(--indigo-deep); border-bottom-width: 2px; }

/* Photo placeholders */
.photo { margin: 0; }
.frame {
  position: relative; max-width: 100%;
  aspect-ratio: 4 / 5; background: var(--veil);
  display: flex; align-items: flex-end; padding: 1rem 1.1rem;
  overflow: hidden;
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame-note {
  position: relative; margin: 0; max-width: 24rem;
  font-family: var(--sans); font-size: .8125rem; line-height: 1.45; color: var(--moss);
}
.frame--wide { aspect-ratio: 21 / 9; }
.frame--land { aspect-ratio: 3 / 2; }
.frame--video { aspect-ratio: 1280 / 618; }
.frame--filled img { object-position: center top; }
.frame--filled { padding: 0; background: var(--veil); }
.frame--outlined img { outline: 1px solid var(--line); outline-offset: -1px; }

/* Home */
.hero { padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 8vw, 7rem); }
.hero-name {
  margin: 0 0 clamp(2rem, 5vw, 4.5rem);
  font-weight: 300; font-variation-settings: "opsz" 72;
  font-size: clamp(2.75rem, 10vw, 6rem);
  line-height: .88; letter-spacing: -.03em;
}
.hero-name span { display: block; }
.hero-name span + span { padding-left: clamp(1.25rem, 6vw, 5rem); }
.hero-text { grid-column: 1 / span 6; align-self: end; min-width: 0; }
.hero-photo { grid-column: 8 / span 5; }
/* Laptops and desktops: the portrait sits beside the name, so Igor's face is
   on the first screen; the name is sized by screen height as well as width. */
@media (min-width: 1024px) {
  .hero {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
    padding-top: clamp(2rem, 5vh, 4rem);
  }
  .hero > .grid { display: contents; }
  .hero-name {
    grid-column: 1 / span 7; grid-row: 1;
    font-size: clamp(3rem, min(5.6vw, 11vh), 5.75rem);
    margin-bottom: clamp(2rem, 6vh, 4rem);
  }
  .hero-name span + span { padding-left: clamp(1.25rem, 3.5vw, 3.5rem); }
  .hero-text { grid-column: 1 / span 6; grid-row: 2; align-self: start; }
  .hero-photo { grid-column: 9 / span 4; grid-row: 1 / span 2; align-self: start; }
}
.roles {
  margin: 0 0 1.75rem; font-style: italic;
  font-size: clamp(1.3rem, 2.1vw, 1.6rem); line-height: 1.35;
  text-wrap: balance;
}
.intro { margin: 0 0 2.5rem; max-width: 34rem; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }

@media (prefers-reduced-motion: no-preference) {
  .hero-photo .frame { animation: surface 1.5s cubic-bezier(.2, .7, .1, 1) .15s both; }
  @keyframes surface {
    from { clip-path: inset(100% 0 0 0); }
    to   { clip-path: inset(0 0 0 0); }
  }
}

/* Inner page heads */
.page-head { padding-block: clamp(2rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem); }
.page-title {
  margin: 0; font-weight: 300; font-variation-settings: "opsz" 72;
  font-size: clamp(2.5rem, 6vw, 4.75rem); line-height: .95; letter-spacing: -.025em;
}
.page-lede {
  margin: 1.5rem 0 0; max-width: 34rem; font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.4;
}

/* Story */
.chapter { padding-block: clamp(2.25rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.chapter h2 {
  margin: 0; align-self: start; position: sticky; top: 5.5rem;
  font-weight: 400; font-variation-settings: "opsz" 36;
  font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.2; text-wrap: balance;
}
.prose { max-width: 37rem; }
.prose p { margin: 0 0 1.2em; }
.prose p:last-child { margin-bottom: 0; }
.break { padding-block: clamp(.5rem, 2vw, 1.5rem) clamp(1.5rem, 4vw, 3rem); }
/* Wide Story photos line up with the text column instead of filling the page */
@media (min-width: 781px) {
  .break {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  }
  .break .photo { grid-column: 5 / -1; }
}
.next { padding-block: clamp(2rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--line); }

/* Work */
.group { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--line); }
.group-title {
  margin: 0 0 clamp(1.75rem, 4vw, 3rem);
  font-weight: 400; font-style: italic; color: var(--moss);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}
.projects { display: flex; flex-direction: column; gap: clamp(3rem, 7vw, 5rem); }
.project .photo { grid-column: 1 / span 5; }
.project-body { grid-column: 7 / span 6; min-width: 0; align-self: center; }
.project-title {
  margin: 0 0 .9rem; font-weight: 400; font-variation-settings: "opsz" 60;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.05; letter-spacing: -.01em;
}
.project p { margin: 0 0 1.5rem; max-width: 32rem; }
.status {
  display: inline-block; margin: 0 0 1rem;
  font-family: var(--sans); font-size: .8125rem; letter-spacing: .02em; color: var(--moss);
  border: 1px solid var(--line); padding: .2rem .55rem;
}

/* Work overview */
.photo-link { display: block; color: inherit; text-decoration: none; }
.photo-link .frame { transition: opacity .2s ease; }
.photo-link:hover .frame { opacity: .85; }
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { color: var(--indigo); }
.area .photo { grid-column: 1 / span 5; }
.area-title {
  margin: 0 0 .6rem; font-weight: 300; font-variation-settings: "opsz" 72;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem); line-height: 1; letter-spacing: -.02em;
}
.area-items { margin: 0 0 1.5rem; max-width: 30rem; font-style: italic; color: var(--moss); }
.page-head--sub { padding-top: clamp(1rem, 2.5vw, 1.75rem); }
.crumb {
  display: inline-block; margin-bottom: clamp(2.25rem, 5vw, 3.75rem);
  font-family: var(--sans); font-size: .9375rem; color: var(--moss); text-decoration: none;
}
.crumb::before { content: "\2190\00a0"; }
.crumb:hover { color: var(--ink); }

/* Contact */
.page-head--contact { text-align: center; }
.page-head--contact .page-title { font-size: clamp(2.25rem, 5vw, 3.75rem); }
.contact--center { display: block; }
.contact--center .main-col { max-width: 34rem; margin-inline: auto; }
.contact { padding-block: 0 clamp(2rem, 6vw, 4rem); }
.form { max-width: 34rem; }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.9rem; }
.field label { font-family: var(--sans); font-size: .875rem; color: var(--moss); }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--moss); border-radius: 0;
  padding: .5rem 0; width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--indigo); box-shadow: 0 1px 0 var(--indigo);
}
.field [aria-invalid="true"] { border-bottom-color: var(--alert); }
.error { font-family: var(--sans); font-size: .8125rem; color: var(--alert); min-height: 1.1em; margin: 0; }
.hp { display: none; }
.form-note { margin: -.6rem 0 1.6rem; font-family: var(--sans); font-size: .8125rem; line-height: 1.5; color: var(--moss); }
.form-note a { color: inherit; text-underline-offset: .2em; }
.form-note a:hover { color: var(--ink); }
.button {
  font-family: var(--sans); font-size: 1rem; font-weight: 500; letter-spacing: .01em;
  color: var(--stone); background: var(--indigo);
  border: 0; border-radius: 2px; padding: .95rem 1.7rem; cursor: pointer;
}
.button:hover { background: var(--indigo-deep); }
.button[disabled] { opacity: .6; cursor: progress; }
.form-status { font-family: var(--sans); font-size: .875rem; color: var(--alert); margin: 1rem 0 0; }
.thanks { max-width: 34rem; }
.thanks p { margin: 0 0 1.5rem; font-size: clamp(1.3rem, 2.1vw, 1.6rem); line-height: 1.4; }
.thanks .note { font-family: var(--sans); font-size: .875rem; color: var(--moss); }

/* Privacy page */
.legal { padding-block: 0 clamp(2rem, 6vw, 4rem); }
.legal h2 {
  margin: 2.4em 0 .6em; font-weight: 400; font-variation-settings: "opsz" 36;
  font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.25;
}
.legal a { color: var(--indigo); text-underline-offset: .2em; }
.legal-updated { margin-top: 2.5em; font-family: var(--sans); font-size: .875rem; color: var(--moss); }

/* Footer: everything sits in the bottom-right corner */
.site-footer { margin-top: clamp(3rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; padding-block: 2rem 2.5rem; }
.footer-block {
  display: flex; flex-direction: column; align-items: flex-end; gap: .9rem; text-align: right;
  font-family: var(--sans); font-size: .875rem; color: var(--moss);
}
.footer-brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--serif); font-size: 1.125rem; color: var(--ink); text-decoration: none;
}
.social { display: flex; align-items: center; gap: .25rem; margin-right: -.4rem; }
.social a { display: inline-flex; padding: .4rem; color: var(--ink); position: relative; }
.social a::after { content: ""; position: absolute; inset: -5px -2px; } /* taller touch area, no overlap */
.social a:hover { color: var(--indigo); }
.social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.handle { margin-left: .35rem; margin-right: .4rem; }
.footer-mail { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.footer-mail:hover { color: var(--indigo); border-bottom-color: currentColor; }
.copyright { margin: 0; font-size: .8125rem; }
/* Privacy sits alone in the top-left corner, centred on the logo + name row
   (that row is 2rem tall, the logo's height) */
.footer-privacy {
  font-family: var(--sans); font-size: .8125rem; line-height: 2rem; color: var(--moss);
  text-underline-offset: .2em;
}
.footer-privacy:hover, .footer-privacy[aria-current] { color: var(--ink); }

/* Phones and narrow tablets */
@media (max-width: 480px) {
  .site-header .wrap { flex-wrap: nowrap; align-items: center; gap: .75rem; padding-block: .9rem; }
  .site-name { font-size: 1rem; white-space: nowrap; gap: .5rem; }
  .site-name .logo { width: 1.6rem; height: 1.6rem; }
  .nav { gap: 1rem; font-size: .875rem; }
  .sub { left: auto; right: -1rem; }
}
/* Very narrow phones (e.g. iPhone SE 1st gen): tighten the header so Contact fits */
@media (max-width: 374px) {
  .site-header .wrap { gap: .5rem; padding-inline: 1rem; }
  .site-name { font-size: .875rem; gap: .35rem; }
  .site-name .logo { width: 1.35rem; height: 1.35rem; }
  .nav { gap: .6rem; font-size: .8125rem; }
  .has-sub { gap: 0; }
  .sub-toggle { width: 1.25rem; }
}
@media (max-width: 780px) {
  .margin-col, .main-col, .hero-text, .hero-photo,
  .project .photo, .area .photo, .project-body { grid-column: 1 / -1; }
  .hero-photo { order: -1; }
  .hero-photo .frame { aspect-ratio: 4 / 4.4; }
  .chapter h2 { position: static; }
  .frame--wide { aspect-ratio: 4 / 3; }
}
