/* =============================================
   Dikshya Giri — Portfolio
   Scanned paper · charcoal brush title
   ============================================= */

:root {
  --paper: #E9E0CE;
  --paper-light: #F2EADA;
  --paper-dark: #DBCFB8;
  --graphite: #211C14;
  --charcoal: #211C14;
  --charcoal-light: #211C14;
  --charcoal-faint: #211C14;
  --line: rgba(40, 32, 20, 0.13);
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;
  --font-script: "Caveat", cursive;
  --font-brush: "Permanent Marker", "Brush Script MT", cursive;
  --maxw: 1200px;
  --gutter: clamp(1rem, 4vw, 4rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(6rem + env(safe-area-inset-top, 0px));
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--paper);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---- Background paper ---- */
.paper-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.paper-bg__base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 130% 90% at 50% 8%, var(--paper-light) 0%, var(--paper) 50%, var(--paper-dark) 100%);
}

/* Woven canvas weave — raised warp & weft threads with depth */
.paper-bg__weave {
  position: absolute;
  inset: 0;
  opacity: 0.8;
  mix-blend-mode: multiply;
  background-image:
    /* vertical threads: shadow + highlight per thread for a 3D bump */
    repeating-linear-gradient(
      90deg,
      rgba(60, 44, 22, 0.10) 0px,
      rgba(60, 44, 22, 0.10) 1px,
      rgba(40, 30, 14, 0.14) 1px,
      rgba(40, 30, 14, 0.14) 2px,
      rgba(255, 250, 235, 0.30) 2px,
      rgba(255, 250, 235, 0.30) 3px,
      transparent 3px,
      transparent 5px
    ),
    /* horizontal threads */
    repeating-linear-gradient(
      0deg,
      rgba(60, 44, 22, 0.10) 0px,
      rgba(60, 44, 22, 0.10) 1px,
      rgba(40, 30, 14, 0.14) 1px,
      rgba(40, 30, 14, 0.14) 2px,
      rgba(255, 250, 235, 0.30) 2px,
      rgba(255, 250, 235, 0.30) 3px,
      transparent 3px,
      transparent 5px
    );
  background-size: 5px 5px;
}

/* Coarse canvas fiber — stretched directional noise like real threads */
.paper-bg__fiber {
  position: absolute;
  inset: 0;
  opacity: 0.7;
  mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='fh'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.18 0 0 0 0 0.13 0 0 0 0 0.06 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23fh)' opacity='0.3'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='fv'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.012' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.18 0 0 0 0 0.13 0 0 0 0 0.06 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23fv)' opacity='0.3'/%3E%3C/svg%3E");
  background-size: 380px 380px, 380px 380px;
}

/* Uneven canvas dye / blotchy tone variation */
.paper-bg__mottle {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 600' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.22 0 0 0 0 0.16 0 0 0 0 0.08 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)' opacity='0.25'/%3E%3C/svg%3E");
  background-size: 700px 700px;
}

/* Faint vertical scan streaks */
.paper-bg__streaks {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 60px,
    rgba(26, 26, 26, 0.015) 60px,
    rgba(26, 26, 26, 0.015) 61px,
    transparent 61px,
    transparent 140px,
    rgba(255, 255, 255, 0.4) 140px,
    rgba(255, 255, 255, 0.4) 141px,
    transparent 141px,
    transparent 230px,
    rgba(26, 26, 26, 0.012) 230px,
    rgba(26, 26, 26, 0.012) 231px
  );
}

/* Soft long vertical creases like the reference */
.paper-bg__crease {
  position: absolute;
  top: -5%;
  bottom: -5%;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(26, 26, 26, 0.05) 30%,
    rgba(26, 26, 26, 0.07) 50%,
    rgba(26, 26, 26, 0.04) 70%,
    transparent 100%
  );
  filter: blur(0.5px);
}

.paper-bg__crease--1 {
  left: 62%;
  transform: rotate(1.2deg);
}

.paper-bg__crease--2 {
  left: 78%;
  width: 1px;
  opacity: 0.6;
  transform: rotate(-0.8deg);
}

/* Barely-there grid */
.paper-bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(70, 54, 30, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 54, 30, 0.012) 1px, transparent 1px);
  background-size: 80px 80px;
}

.paper-bg__grain {
  position: absolute;
  inset: 0;
  opacity: 1;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='6' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.16  0 0 0 0 0.12  0 0 0 0 0.06  0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.38'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* Extra fine speckle for raw, tactile grain */
.paper-bg__speckle {
  position: absolute;
  inset: 0;
  opacity: 0.75;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.2  0 0 0 0 0.15  0 0 0 0 0.08  0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)' opacity='0.2'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}

/* ---- Navigation ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(1.15rem + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) 1.15rem max(var(--gutter), env(safe-area-inset-left, 0px));
  max-width: var(--maxw);
  margin: 0 auto;
  isolation: isolate;
}

/* Torn paper strip — lighter, faded variant of .exp-scrap__paper */
.site-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  z-index: -1;
  width: 100vw;
  transform: translateX(-50%);
  bottom: -10px;
  clip-path: inset(0 -24px -18px -24px);
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 60%, rgba(80, 60, 30, 0.05) 100%),
    radial-gradient(ellipse 30% 26% at 12% 88%, rgba(110, 80, 40, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 24% 22% at 88% 14%, rgba(110, 80, 40, 0.04) 0%, transparent 70%),
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 25px,
      rgba(26, 20, 12, 0.022) 25px,
      rgba(26, 20, 12, 0.022) 26px
    ),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.15 0 0 0 0 0.11 0 0 0 0 0.05 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.10'/%3E%3C/svg%3E"),
    rgba(245, 238, 226, 0.78);
  background-size: auto, auto, auto, auto, 160px 160px, auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(#000 0%, #000 72%, rgba(0, 0, 0, 0.45) 100%);
  -webkit-mask-image: linear-gradient(#000 0%, #000 72%, rgba(0, 0, 0, 0.45) 100%);
  filter: url(#torn-paper) drop-shadow(2px 4px 6px rgba(26, 20, 12, 0.07));
}

.site-nav::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  z-index: -2;
  width: 55%;
  height: 22px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(26, 20, 12, 0.09) 0%, transparent 70%);
  filter: blur(5px);
  opacity: 0.85;
}

.site-nav__logo {
  flex-shrink: 0;
  font-family: "Permanent Marker", "Caveat", cursive;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  color: var(--graphite);
  text-decoration: none;
  white-space: nowrap;
  filter: url(#charcoal-rough);
  text-shadow:
    0.5px 0.5px 0 rgba(20, 16, 10, 0.6),
    1px 1px 2px rgba(20, 16, 10, 0.25);
  transition: transform 0.2s ease;
}

.site-nav__logo:hover {
  transform: rotate(-2deg);
}

.site-nav__menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(0.65rem, 1.8vw, 1.75rem);
  row-gap: 0.5rem;
  max-width: min(100%, 680px);
}

.site-nav__menu a {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.4vw, 0.9375rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--charcoal);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s;
}

.site-nav__menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1.5px;
  background: var(--graphite);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav__menu a:hover,
.site-nav__menu a:focus-visible,
.site-nav__menu a.is-active {
  color: var(--graphite);
  outline: none;
}

.site-nav__menu a:hover::after,
.site-nav__menu a:focus-visible::after,
.site-nav__menu a.is-active::after {
  transform: scaleX(1);
}

.site-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.site-nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--graphite);
  transition: transform 0.25s, opacity 0.25s;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: calc(100vh - 6rem);
  min-height: calc(100svh - 6rem);
  display: block;
  scroll-margin-top: 6rem;
  overflow: hidden;
  --nav-align: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
}

.hero__layout {
  position: relative;
  z-index: 2;
  display: block;
  max-width: min(720px, calc(100% - var(--nav-align) - min(44vw, 500px)));
  margin-left: var(--nav-align);
  margin-right: auto;
  padding: clamp(4.5rem, 14vh, 8rem) clamp(0.75rem, 2vw, 1.5rem) clamp(3rem, 7vw, 5rem) 0;
}

.hero__text {
  position: relative;
  z-index: 2;
  transform: translateY(-2rem);
  max-width: 100%;
  min-width: 0;
  padding-left: 0;
  padding-bottom: calc(clamp(3.5rem, 6.5vw, 5rem) + 1.45em);
  overflow-wrap: break-word;
}

/* Portrait — soft dissolve into paper, no box edge or white cast */
.hero__portrait {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: 100%;
  max-width: min(62vw, 700px);
  object-fit: contain;
  object-position: right bottom;
  transform: scale(1.06) translateY(clamp(1rem, 3vh, 2.5rem));
  transform-origin: right bottom;
  z-index: 1;
  pointer-events: none;
  filter: grayscale(1) brightness(1.07) contrast(0.94);
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(
    ellipse 90% 105% at 84% 52%,
    #000 28%,
    rgba(0, 0, 0, 0.92) 42%,
    rgba(0, 0, 0, 0.72) 54%,
    rgba(0, 0, 0, 0.48) 66%,
    rgba(0, 0, 0, 0.22) 78%,
    rgba(0, 0, 0, 0.08) 88%,
    transparent 96%
  );
  mask-image: radial-gradient(
    ellipse 90% 105% at 84% 52%,
    #000 28%,
    rgba(0, 0, 0, 0.92) 42%,
    rgba(0, 0, 0, 0.72) 54%,
    rgba(0, 0, 0, 0.48) 66%,
    rgba(0, 0, 0, 0.22) 78%,
    rgba(0, 0, 0, 0.08) 88%,
    transparent 96%
  );
}

@media (max-width: 1100px) {
  .hero__layout {
    max-width: min(540px, calc(100% - var(--nav-align) - min(40vw, 420px)));
    padding-right: clamp(0.5rem, 3vw, 1.25rem);
  }

  .hero__portrait {
    max-width: min(50vw, 500px);
  }
}

@media (max-width: 900px) {
  .hero__layout {
    max-width: min(520px, calc(100% - 2 * var(--gutter) - 38vw));
    margin-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .hero__portrait {
    max-width: min(46vw, 420px);
    object-position: right bottom;
    transform: scale(1.04) translateY(clamp(0.75rem, 2.5vh, 2rem));
    transform-origin: right bottom;
    filter: grayscale(1) brightness(1.06) contrast(0.94);
    -webkit-mask-image: radial-gradient(
      ellipse 88% 102% at 82% 52%,
      #000 26%,
      rgba(0, 0, 0, 0.75) 52%,
      rgba(0, 0, 0, 0.28) 74%,
      transparent 92%
    );
    mask-image: radial-gradient(
      ellipse 88% 102% at 82% 52%,
      #000 26%,
      rgba(0, 0, 0, 0.75) 52%,
      rgba(0, 0, 0, 0.28) 74%,
      transparent 92%
    );
  }
}

@media (max-width: 760px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    overflow: visible;
    padding-bottom: clamp(2rem, 6vw, 3rem);
  }

  .hero__layout {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: clamp(3rem, 10vh, 5rem) var(--gutter) 0;
  }

  .hero__portrait {
    order: 2;
    position: relative;
    align-self: flex-end;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(72vw, 300px);
    height: auto;
    max-width: min(72vw, 300px);
    max-height: min(52vh, 420px);
    margin: clamp(0.5rem, 2vw, 1rem) var(--gutter) 0 auto;
    transform: none;
    object-fit: contain;
    object-position: right bottom;
    mix-blend-mode: multiply;
    filter: grayscale(1) brightness(1.06) contrast(0.94);
    -webkit-mask-image: radial-gradient(
      ellipse 86% 100% at 80% 52%,
      #000 24%,
      rgba(0, 0, 0, 0.7) 50%,
      transparent 90%
    );
    mask-image: radial-gradient(
      ellipse 86% 100% at 80% 52%,
      #000 24%,
      rgba(0, 0, 0, 0.7) 50%,
      transparent 90%
    );
  }

  .hero__text {
    transform: none;
    padding-bottom: 0;
  }

  .hero__roles {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: clamp(1.25rem, 4vw, 1.75rem);
  }

  .hero__roles-live,
  .hero__roles-sizer {
    font-size: clamp(1.35rem, 5vw, 1.85rem);
  }
}

.hero__eyebrow {
  font-family: var(--font-script);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--graphite);
  line-height: 1;
  margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
  min-height: 1.2em;
  transform: rotate(-2deg);
  transform-origin: left;
}

.hero__eyebrow-caret {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  margin-left: 3px;
  background: var(--graphite);
  vertical-align: -0.05em;
  opacity: 0;
}

.hero__eyebrow-caret.is-blink {
  opacity: 0.75;
  animation: caret-blink 0.75s steps(1) infinite;
}

.hero__title {
  position: relative;
  display: inline-block;
  transform: translateZ(0);
}

.hero__underline,
.hero__lead {
  transform: translateZ(0);
}

.hero__ghost {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-brush);
  font-size: clamp(2.75rem, 9vw, 6.5rem);
  line-height: 0.95;
  color: rgba(26, 26, 26, 0.2);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  transform: translate(-10px, 20px) rotate(-1.4deg);
  filter: url(#charcoal-smudge);
}

.hero__name {
  position: relative;
  font-family: var(--font-brush);
  font-size: clamp(2.75rem, 9vw, 6.5rem);
  font-weight: 400;
  line-height: 0.95;
  color: var(--graphite);
  letter-spacing: 0.005em;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

/* Each line slightly off — uneven like a real hand */
.hero__line {
  display: block;
  filter: url(#charcoal-rough);
  text-shadow:
    1px 1px 0 rgba(20, 16, 10, 0.95),
    2px 2px 0 rgba(20, 16, 10, 0.8),
    3px 3px 0 rgba(20, 16, 10, 0.6),
    5px 6px 8px rgba(20, 16, 10, 0.4),
    8px 10px 18px rgba(20, 16, 10, 0.28);
}

.hero__line:first-child {
  transform: rotate(-1.2deg);
  margin-left: 0;
}

.hero__line--indent {
  margin-left: clamp(1.5rem, 6vw, 5rem);
  transform: rotate(0.8deg) translateX(2px);
  filter: url(#charcoal-rough-2);
}

.hero__underline {
  display: block;
  width: min(440px, 100%);
  height: clamp(20px, 3vw, 32px);
  margin-top: clamp(0.5rem, 1.5vw, 1rem);
  color: var(--graphite);
}

.hero__lead {
  max-width: min(520px, 100%);
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
}

.hero__tagline {
  font-family: var(--font-script);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--graphite);
  margin-bottom: 0.65rem;
}

.hero__desc {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.1875rem);
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.005em;
  color: var(--charcoal);
  max-width: 42ch;
}

.hero__roles {
  position: absolute;
  left: 0;
  bottom: 0;
  margin-top: 0;
  contain: layout style;
}

.hero__roles-inner {
  position: relative;
  display: inline-block;
}

.hero__roles-sizer {
  visibility: hidden;
  display: block;
  white-space: nowrap;
  word-spacing: 0.45em;
  height: 1.45em;
  font-family: var(--font-script);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.hero__roles-live {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  font-family: var(--font-script);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 700;
  color: var(--graphite);
  line-height: 1;
}

.hero__roles-text {
  white-space: nowrap;
  word-spacing: 0.45em;
}

.hero__roles-cap {
  display: inline;
  font-size: 1.22em;
  font-weight: 700;
  vertical-align: baseline;
  line-height: 1;
}

.hero__roles-caret {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 4px;
  background: var(--graphite);
  vertical-align: baseline;
  opacity: 0.75;
}

.hero__roles-caret.is-blink-once {
  animation: caret-blink 0.75s steps(1) 1;
}

/* ---- Sections ---- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter);
  border-top: 1px solid var(--line);
  scroll-margin-top: 6rem;
}

.section__num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--charcoal-faint);
  margin-bottom: 0.5rem;
}

.section__title {
  font-family: var(--font-brush);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 400;
  color: var(--graphite);
  line-height: 1;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  filter: url(#charcoal-rough);
  text-shadow: 1px 1px 0 rgba(26, 26, 26, 0.4);
}

/* ---- Experiences — sketchbook scraps ---- */
.section--experiences .section__title {
  margin-top: 1.25rem;
}

.exp-collage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3rem);
}

.exp-scrap {
  position: relative;
  width: min(920px, 96%);
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(2rem, 4vw, 3.5rem);
  will-change: transform, opacity;
}

.exp-scrap--left {
  align-self: flex-start;
  margin-left: clamp(0rem, 3vw, 2.5rem);
}

.exp-scrap--right {
  align-self: flex-end;
  margin-right: clamp(0rem, 3vw, 2.5rem);
}

/* slight layering so scraps feel pinned on top of each other */
.exp-scrap + .exp-scrap {
  margin-top: clamp(-1.5rem, -2vw, -0.5rem);
}

/* Torn off-white paper scrap */
.exp-scrap__paper {
  position: absolute;
  inset: 0;
  background:
    /* aged darkened edges (vignette) like a well-thumbed page */
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 55%, rgba(80, 60, 30, 0.10) 100%),
    /* soft brown stains */
    radial-gradient(ellipse 30% 26% at 12% 88%, rgba(110, 80, 40, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 24% 22% at 88% 14%, rgba(110, 80, 40, 0.08) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.15 0 0 0 0 0.11 0 0 0 0 0.05 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.16'/%3E%3C/svg%3E"),
    #E6D5B6;
  background-size: auto, auto, auto, 160px 160px, auto;
  filter: url(#torn-paper) drop-shadow(2px 5px 8px rgba(26, 20, 12, 0.13));
  z-index: 0;
}

.exp-scrap--right .exp-scrap__paper {
  filter: url(#torn-paper-2) drop-shadow(-2px 5px 8px rgba(26, 20, 12, 0.13));
}

/* Charcoal smudge + faint pencil ruling on the paper */
.exp-scrap__paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 25px,
      rgba(26, 20, 12, 0.04) 25px,
      rgba(26, 20, 12, 0.04) 26px
    );
  opacity: 0.6;
}

.exp-scrap__paper::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 12%;
  width: 45%;
  height: 28px;
  background: radial-gradient(ellipse, rgba(26, 20, 12, 0.18) 0%, transparent 70%);
  filter: blur(4px);
}

/* Masking tape */
.exp-scrap__tape {
  position: absolute;
  top: -14px;
  left: 16%;
  width: 86px;
  height: 30px;
  background: rgba(210, 200, 175, 0.55);
  border-left: 1px dashed rgba(26, 20, 12, 0.12);
  border-right: 1px dashed rgba(26, 20, 12, 0.12);
  transform: rotate(-5deg);
  box-shadow: 0 2px 4px rgba(26, 20, 12, 0.1);
  z-index: 3;
  backdrop-filter: saturate(0.9);
}

.exp-scrap__tape--alt {
  left: auto;
  right: 14%;
  transform: rotate(6deg);
}

.exp-scrap__body {
  position: relative;
  z-index: 2;
}

.exp-scrap__year {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--charcoal-faint);
}

.exp-scrap__role {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: var(--graphite);
  margin-top: 0.4rem;
  line-height: 1.2;
}

.exp-scrap__org {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--charcoal-light);
  margin-bottom: 0.8rem;
}

.exp-scrap__desc {
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--charcoal);
  width: 100%;
}

.exp-scrap__note {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--charcoal);
  transform: rotate(-3deg);
}

@media (max-width: 600px) {
  .exp-scrap {
    width: 100%;
    align-self: stretch;
    margin-left: 0;
    margin-right: 0;
    padding: clamp(1.35rem, 4vw, 1.75rem) clamp(1.25rem, 4vw, 1.75rem);
  }

  .exp-scrap + .exp-scrap {
    margin-top: 0;
  }

  .exp-scrap__role {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem);
  }

  .exp-scrap__desc {
    font-size: clamp(1rem, 3.8vw, 1.125rem);
  }
}

/* ---- Projects — pinned sketchbook board ---- */
.proj-board {
  column-count: 2;
  column-gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 0.5rem;
}

.proj-pin {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  will-change: transform, opacity;
}

/* slightly different widths/offsets for an organic, hand-pinned feel */
.proj-pin--tall { padding: 0 0.4rem; }
.proj-pin--short { padding: 0 1.1rem; }

.proj-pin__card {
  position: relative;
  padding: clamp(0.9rem, 2vw, 1.25rem);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-pin__card:hover {
  transform: translateY(-8px);
}

/* Torn canvas paper backing */
.proj-pin__paper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 55%, rgba(80, 60, 30, 0.10) 100%),
    radial-gradient(ellipse 30% 26% at 14% 86%, rgba(110, 80, 40, 0.10) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.15 0 0 0 0 0.11 0 0 0 0 0.05 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.16'/%3E%3C/svg%3E"),
    #E6D5B6;
  background-size: auto, auto, 160px 160px, auto;
  filter: url(#torn-paper) drop-shadow(2px 6px 9px rgba(26, 20, 12, 0.16));
  transition: filter 0.5s ease;
  z-index: 0;
}

.proj-pin--short .proj-pin__paper {
  filter: url(#torn-paper-2) drop-shadow(-2px 6px 9px rgba(26, 20, 12, 0.16));
}

.proj-pin__card:hover .proj-pin__paper {
  filter: url(#torn-paper) drop-shadow(3px 14px 22px rgba(26, 20, 12, 0.26));
}

.proj-pin--short .proj-pin__card:hover .proj-pin__paper {
  filter: url(#torn-paper-2) drop-shadow(-3px 14px 22px rgba(26, 20, 12, 0.26));
}

/* Masking tape corner */
.proj-pin__tape {
  position: absolute;
  top: -10px;
  left: 14%;
  width: 78px;
  height: 26px;
  background: rgba(210, 200, 175, 0.5);
  border-left: 1px dashed rgba(26, 20, 12, 0.12);
  border-right: 1px dashed rgba(26, 20, 12, 0.12);
  transform: rotate(-5deg);
  box-shadow: 0 2px 4px rgba(26, 20, 12, 0.1);
  z-index: 4;
}

.proj-pin__tape--alt {
  left: auto;
  right: 14%;
  transform: rotate(6deg);
}

/* Media (image / sketch) */
.proj-pin__media {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid rgba(26, 20, 12, 0.16);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.proj-pin--tall .proj-pin__media { aspect-ratio: 4 / 4.3; }
.proj-pin--short .proj-pin__media { aspect-ratio: 4 / 2.8; }

/* drafting corner crop-marks on the media */
.proj-pin__media::before,
.proj-pin__media::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(26, 20, 12, 0.22);
  z-index: 3;
  pointer-events: none;
}

.proj-pin__media::before {
  top: 7px; left: 7px;
  border-right: none;
  border-bottom: none;
}

.proj-pin__media::after {
  bottom: 7px; right: 7px;
  border-left: none;
  border-top: none;
}

.proj-pin__img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-pin__sketch {
  width: 100%;
  height: 100%;
  color: var(--charcoal-light);
  opacity: 0.7;
  padding: 1.25rem;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-pin__card:hover .proj-pin__img {
  filter: grayscale(0) contrast(1);
  transform: scale(1.06);
}

.proj-pin__card:hover .proj-pin__sketch {
  transform: scale(1.04);
}

/* Handwritten number */
.proj-pin__no {
  position: absolute;
  top: 0.1rem;
  left: 0.55rem;
  font-family: var(--font-brush);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  color: rgba(26, 20, 12, 0.55);
  filter: url(#charcoal-rough);
  z-index: 3;
  pointer-events: none;
}

/* Hover overlay — inked paper note sliding up */
.proj-pin__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  min-height: 52%;
  max-height: 100%;
  overflow: auto;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.4rem;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  background:
    linear-gradient(to top, rgba(20, 16, 10, 0.96) 0%, rgba(20, 16, 10, 0.93) 75%, rgba(20, 16, 10, 0) 100%);
  color: var(--paper-light);
  transform: translateY(100%);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-pin__card:hover .proj-pin__overlay,
.proj-pin__card:focus-within .proj-pin__overlay {
  transform: translateY(0);
}

.proj-pin__o-title {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
}

.proj-pin__o-desc {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(243, 241, 236, 0.85);
}

.proj-pin__tech {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

/* Skills as torn washi-tape labels */
.proj-pin__tech.is-taped {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.65rem;
  margin-top: 0.6rem;
}

.proj-pin__tech li {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  color: rgba(243, 241, 236, 0.95);
}

.proj-pin__tech.is-taped li {
  position: relative;
  padding: 0.32rem 0.7rem;
  color: #2a2218;
  background: rgba(238, 230, 214, 0.82);
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  /* torn, slightly uneven tape edges */
  clip-path: polygon(3% 8%, 98% 0, 100% 86%, 96% 100%, 2% 94%, 0 14%);
}

/* faint tape sheen + a center seam line, like real washi tape */
.proj-pin__tech.is-taped li::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 38%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0 2px, transparent 2px 6px);
  pointer-events: none;
}

.proj-pin__link,
.proj-pin__link:link,
.proj-pin__link:visited,
.proj-pin__link:hover,
.proj-pin__link:focus,
.proj-pin__link:active {
  align-self: flex-start;
  margin-top: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 241, 236, 0.5);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.proj-pin__link:hover {
  border-color: #fff;
}

/* Foot — always-visible title + annotation */
.proj-pin__foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding: 0 0.2rem;
}

.proj-pin__title {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--graphite);
  line-height: 1.2;
}

.proj-pin__note {
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--charcoal);
  transform: rotate(-4deg);
  white-space: nowrap;
}

.proj-pin__sub {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--graphite);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .proj-board {
    column-count: 1;
  }

  .proj-pin--tall,
  .proj-pin--short {
    padding: 0;
  }

  .proj-pin__overlay {
    transform: translateY(0);
    background: linear-gradient(to top, rgba(20, 16, 10, 0.96) 0%, rgba(20, 16, 10, 0.92) 80%, rgba(20, 16, 10, 0) 100%);
  }

  .proj-pin__foot {
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
  }

  .proj-pin__sub,
  .proj-pin__note {
    white-space: normal;
  }
}

.proj-card__no {
  position: absolute;
  top: 8px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--charcoal-faint);
}

.proj-card__title {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: var(--graphite);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.proj-card__tag {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--charcoal-faint);
}

/* ---- Skills ---- */
.skills-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.skills-list li {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--charcoal);
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(26, 26, 26, 0.28);
}

/* ---- Gallery ---- */
.gallery__sub {
  font-family: var(--font-script);
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  font-weight: 500;
  color: var(--graphite);
  line-height: 1.1;
  margin: -0.5rem 0 1.75rem;
}

/* ---- Archive: Artifacts & Observations ---- */
.archive {
  position: relative;
  width: 100%;
  min-height: clamp(640px, 86vw, 980px);
}

.archive__arrow {
  position: absolute;
  top: -1.5rem;
  right: clamp(6%, 14vw, 20%);
  width: clamp(70px, 9vw, 110px);
  height: auto;
  color: var(--graphite);
  opacity: 0.5;
  transform: rotate(8deg);
  pointer-events: none;
}

.archive__hint {
  position: absolute;
  top: -0.25rem;
  right: clamp(2%, 6vw, 9%);
  max-width: 150px;
  font-family: var(--font-script);
  font-size: 1.15rem;
  line-height: 1.05;
  color: var(--graphite);
  opacity: 0.7;
  transform: rotate(-3deg);
  text-align: center;
  pointer-events: none;
}

.artifact {
  position: absolute;
  left: var(--x, 0);
  top: var(--y, 0);
  width: var(--w, 220px);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.4s ease, z-index 0s;
  cursor: pointer;
  outline: none;
}

.artifact:hover,
.artifact:focus-visible {
  z-index: 6;
  transform: rotate(0deg) scale(1.03);
}

.artifact__frame {
  position: relative;
  padding: 12px 12px 14px;
  background: var(--paper-light);
  box-shadow:
    0 1px 1px rgba(33, 28, 20, 0.18),
    0 8px 18px rgba(33, 28, 20, 0.18);
  transition: box-shadow 0.4s ease, filter 0.4s ease;
}

.artifact:hover .artifact__frame,
.artifact:focus-visible .artifact__frame {
  box-shadow:
    0 2px 3px rgba(33, 28, 20, 0.22),
    0 22px 40px rgba(33, 28, 20, 0.32);
}

.artifact--paper .artifact__frame {
  background:
    repeating-linear-gradient(0deg, transparent 0 21px, rgba(40, 60, 110, 0.16) 21px 22px),
    var(--paper-light);
}

.artifact__img,
.artifact__draw,
.artifact__ruled,
.artifact__smudge {
  display: block;
  width: 100%;
}

.artifact__img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02) brightness(0.92) sepia(0.12);
  transition: filter 0.45s ease, transform 0.45s ease;
}

.artifact:hover .artifact__img,
.artifact:focus-visible .artifact__img {
  filter: grayscale(0.15) contrast(1.05) brightness(1.05) sepia(0);
}

/* artwork that should always stay in full colour, hover or not */
.artifact__img--color,
.artifact:hover .artifact__img--color,
.artifact:focus-visible .artifact__img--color {
  filter: none;
}

.artifact__draw {
  aspect-ratio: 1;
  color: var(--graphite);
  opacity: 0.82;
}

.artifact__ruled {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(90deg, transparent 22px, rgba(150, 40, 30, 0.35) 22px 23px, transparent 23px),
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(40, 60, 110, 0.22) 19px 20px),
    #f4ecdb;
}

.artifact__scribble {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--graphite);
  opacity: 0.75;
}

.artifact__smudge {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(60% 50% at 30% 35%, rgba(20, 16, 10, 0.85), transparent 70%),
    radial-gradient(70% 60% at 70% 65%, rgba(20, 16, 10, 0.6), transparent 75%),
    radial-gradient(40% 40% at 55% 25%, rgba(20, 16, 10, 0.5), transparent 70%),
    repeating-linear-gradient(58deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 5px),
    var(--paper-dark);
  filter: url(#charcoal-smudge);
}

.artifact__cat {
  display: none;
}

/* tape + pins */
.artifact__tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 84px;
  height: 26px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(238, 230, 214, 0.7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  border-left: 1px dashed rgba(0, 0, 0, 0.07);
  border-right: 1px dashed rgba(0, 0, 0, 0.07);
}

.artifact__tape--alt {
  left: auto;
  right: -8px;
  top: 18px;
  transform: rotate(38deg);
  width: 70px;
}

.artifact__pin {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 13px;
  height: 13px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7a6a52, #2c241a);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.artifact__pin--alt {
  background: radial-gradient(circle at 35% 30%, #8a8276, #353029);
}

/* hand-drawn connector line, drawn on hover */
.artifact__link {
  position: absolute;
  top: calc(100% - 26px);
  left: calc(100% - 26px);
  width: 78px;
  height: 60px;
  color: var(--graphite);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease 0.05s;
}

.artifact__link path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.55s ease 0.1s;
}

.artifact--note-left .artifact__link {
  left: auto;
  right: calc(100% - 26px);
  transform: scaleX(-1);
}

.artifact:hover .artifact__link,
.artifact:focus-visible .artifact__link {
  opacity: 0.7;
}

.artifact:hover .artifact__link path,
.artifact:focus-visible .artifact__link path {
  stroke-dashoffset: 0;
}

/* handwritten note revealed on hover */
.artifact__note {
  position: absolute;
  top: calc(100% + 26px);
  left: calc(100% + 54px);
  width: 176px;
  min-height: 1.4em;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.005em;
  color: var(--graphite);
  opacity: 0;
  transform: rotate(calc(var(--rot, 0deg) * -1)) translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.artifact__note::after {
  content: "▌";
  opacity: 0;
  margin-left: 1px;
  font-family: var(--font-body);
  font-weight: 300;
}

.artifact__note.is-typing::after {
  opacity: 0.6;
  animation: caret-blink 0.8s steps(1) infinite;
}

.artifact--note-left .artifact__note {
  left: auto;
  right: calc(100% + 54px);
  text-align: right;
}

.artifact:hover .artifact__note,
.artifact:focus-visible .artifact__note {
  opacity: 1;
  transform: rotate(calc(var(--rot, 0deg) * -1)) translateY(0);
}

@keyframes caret-blink {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0; }
}

/* stack the archive into a readable flow on small screens */
@media (max-width: 760px) {
  .archive {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 3.25rem;
    padding-top: 1.5rem;
  }
  .archive__arrow,
  .archive__hint { display: none; }
  .artifact {
    position: relative;
    left: auto;
    top: auto;
    width: min(280px, 92%);
    margin: 0 auto;
    transform: rotate(var(--rot, 0deg));
  }
  .artifact__link { display: none; }
  .artifact__note,
  .artifact--note-left .artifact__note {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    margin-top: 0.6rem;
    text-align: center;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .proj-board {
    column-count: 1;
  }
}

/* ---- Contact ---- */
.section--contact {
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(4.5rem, 10vw, 7rem);
}

.contact__sub {
  font-family: var(--font-script);
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  font-weight: 500;
  color: var(--charcoal-light);
  line-height: 1.15;
  margin: -1.25rem 0 clamp(2rem, 4vw, 2.75rem);
}

.contact-stage {
  position: relative;
}

.contact-scrap {
  width: min(820px, 96%);
  margin-top: 0;
  padding: clamp(2rem, 4vw, 2.85rem) clamp(2rem, 4.5vw, 3.25rem);
}

.contact-scrap__tape-alt {
  display: block;
}

.contact-scrap__pin {
  position: absolute;
  top: 18px;
  right: clamp(12%, 18vw, 22%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #9a9a9a 0%, #3a3a3a 55%, #1a1a1a 100%);
  box-shadow:
    0 2px 4px rgba(20, 16, 10, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
  z-index: 4;
  pointer-events: none;
}

.contact-scrap__pin::after {
  content: "";
  position: absolute;
  inset: 3px 3px auto auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.contact-scrap__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal-faint);
  margin-bottom: clamp(1.1rem, 2.5vw, 1.5rem);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-action {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1rem);
  width: 100%;
  padding: clamp(0.9rem, 2vw, 1.05rem) clamp(0.5rem, 1.5vw, 0.75rem);
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--graphite);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  box-shadow: none;
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.28s ease;
}

.contact-action:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 6%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(40, 32, 20, 0.08) 12%,
    rgba(40, 32, 20, 0.16) 48%,
    rgba(40, 32, 20, 0.1) 88%,
    transparent 100%
  );
  opacity: 0.85;
  pointer-events: none;
}

.contact-action:hover,
.contact-action:focus-visible {
  transform: translateY(-2px);
  background: rgba(219, 207, 184, 0.22);
  outline: none;
}

.contact-action__num {
  flex-shrink: 0;
  width: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--charcoal-faint);
  opacity: 0.9;
}

.contact-action__label {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.7vw, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--graphite);
}

.contact-action__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  margin-left: auto;
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.5vw, 0.9875rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
  padding: 0.48rem 0.55rem 0.48rem 0.72rem;
  color: var(--graphite);
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.14 0 0 0 0 0.1 0 0 0 0 0.05 0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.14'/%3E%3C/svg%3E"),
    linear-gradient(155deg, rgba(232, 220, 200, 0.72) 0%, rgba(214, 198, 172, 0.58) 100%);
  background-size: 140px 140px, auto;
  border: none;
  border-radius: 1px;
  box-shadow:
    0 1px 3px rgba(26, 20, 12, 0.05),
    inset 0 0 0 1px rgba(80, 60, 30, 0.09);
  transition: background 0.28s ease, color 0.28s ease, box-shadow 0.28s ease, transform 0.28s ease;
}

.contact-action__value {
  line-height: 1.35;
}

.contact-action__arrow {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  color: inherit;
  opacity: 1;
  filter: drop-shadow(0.5px 0.5px 0 rgba(20, 16, 10, 0.25));
  transition: transform 0.22s ease, filter 0.22s ease;
}

.contact-action:hover .contact-action__arrow,
.contact-action:focus-visible .contact-action__arrow {
  transform: translate(2px, -2px);
  filter: drop-shadow(0.5px 0.5px 0 rgba(20, 16, 10, 0.15));
}

.contact-action:hover .contact-action__cta,
.contact-action:focus-visible .contact-action__cta {
  color: var(--paper-light);
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.14 0 0 0 0 0.1 0 0 0 0 0.05 0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.12'/%3E%3C/svg%3E"),
    linear-gradient(155deg, rgba(48, 40, 28, 0.92) 0%, rgba(33, 28, 20, 0.96) 100%);
  background-size: 140px 140px, auto;
  box-shadow:
    0 3px 10px rgba(26, 20, 12, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

@media (max-width: 560px) {
  .contact-action {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .contact-action__cta {
    width: 100%;
    margin-left: 0;
    margin-top: 0.35rem;
    white-space: normal;
  }

  .contact-action__value {
    word-break: break-word;
  }
}

/* ---- Footer ---- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--charcoal-faint);
}

/* ---- Mobile nav ---- */
@media (max-width: 900px) {
  .site-nav {
    flex-wrap: nowrap;
  }

  .site-nav__toggle {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .site-nav__menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: max(var(--gutter), env(safe-area-inset-right, 0px));
    left: max(var(--gutter), env(safe-area-inset-left, 0px));
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    max-width: none;
    gap: 0;
    padding: 0.85rem 0;
    background: rgba(242, 234, 218, 0.98);
    border: 1px solid rgba(40, 32, 20, 0.12);
    border-radius: 2px;
    box-shadow: 0 10px 28px rgba(26, 20, 12, 0.1);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
    z-index: 101;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav__menu a {
    font-size: 0.875rem;
    padding: 0.85rem 1.25rem;
    white-space: normal;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .site-nav__menu a::after {
    display: none;
  }

  .site-nav__menu.is-open {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* ---- Small phones & narrow viewports ---- */
@media (max-width: 480px) {
  .site-nav__logo {
    font-size: 1.5rem;
  }

  .section {
    padding-top: clamp(2.75rem, 8vw, 3.5rem);
    padding-bottom: clamp(2.75rem, 8vw, 3.5rem);
    scroll-margin-top: calc(5rem + env(safe-area-inset-top, 0px));
  }

  .section__title {
    font-size: clamp(1.75rem, 9vw, 2.25rem);
  }

  .hero__ghost {
    display: none;
  }

  .hero__name,
  .hero__ghost {
    font-size: clamp(2.15rem, 11vw, 3.25rem);
  }

  .hero__line--indent {
    margin-left: clamp(0.65rem, 4vw, 1.25rem);
  }

  .hero__tagline {
    font-size: clamp(1.2rem, 5vw, 1.45rem);
  }

  .hero__portrait {
    width: min(78vw, 260px);
    max-width: min(78vw, 260px);
  }

  .hero__roles-live,
  .hero__roles-sizer {
    font-size: clamp(1.2rem, 4.5vw, 1.55rem);
  }

  .contact-scrap {
    width: 100%;
    padding: clamp(1.5rem, 5vw, 2rem) clamp(1.25rem, 4vw, 1.75rem);
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }
}

body.nav-open {
  overflow: hidden;
}

/* ---- Scroll reveal ---- */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .proj-card:hover .proj-card__frame { transform: none; }
}

@media print {
  .paper-bg { display: none; }
  body { background: #fff; }
}
