/* ==========================================================================
   kylegreen.design — styles
   Palette and type are lifted straight from the 2026 résumé / samples deck.
   ========================================================================== */

:root {
  --forest:      #00300E;   /* hero + contact ground */
  --forest-deep: #002109;   /* gradient edge on dark grounds */
  --paper:       #E8E9E5;   /* reading ground */
  --paper-deep:  #DFE0DB;   /* subtle band on paper */
  --white:       #FFFFFF;   /* work tiles */
  --ink:         #1A1D19;   /* body text on paper */
  --ink-soft:    #4B514A;   /* running text */
  --muted:       #7B817A;   /* labels, captions */
  --hairline:    #B9BDB4;   /* dotted rules on paper */
  --leaf:        #8FBF9F;   /* highlight on forest */
  --leaf-soft:   rgba(143,191,159,.55);
  --paper-on-forest: #E8E9E5;
  --muted-on-forest: #9EAF9F;
  --hairline-on-forest: rgba(232,233,229,.28);

  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 4px; border-radius: 2px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--forest); color: var(--paper);
  border-radius: 4px; font-size: 14px;
}
.skip:focus { top: 16px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--light { color: var(--muted-on-forest); }

.h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--ink);
  text-wrap: balance;
  margin-top: 12px;
}
.lead {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 18px;
}
p + p { margin-top: 14px; }
.about__body p:not(.lead) { color: var(--ink-soft); max-width: 62ch; }

/* ---------- dotted rules (the signature) ---------- */
.rule {
  height: 2px;
  background-image: radial-gradient(circle, var(--hairline) 1px, transparent 1.2px);
  background-size: 8px 2px;
  background-repeat: repeat-x;
  width: 100%;
}
.rule--draw { transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--ease-out); }
.rule--draw.is-in { transform: scaleX(1); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 14px;
  color: var(--paper);
  transition: transform .5s var(--ease-out), background .4s, color .4s, box-shadow .4s;
  mix-blend-mode: normal;
}
.nav.is-hidden { transform: translateY(-110%); }
.nav.is-paper { background: rgba(232,233,229,.86); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.nav__brand { font-family: var(--serif); font-weight: 600; font-size: 18px; letter-spacing: -.005em; }
.nav__tld { opacity: .55; transition: opacity .3s; }
.nav__brand:hover .nav__tld { opacity: 1; }
.nav__links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.nav__links a, .nav__cta { position: relative; padding-block: 4px; }
.nav__links a::after, .nav__cta::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav__links a:hover::after, .nav__links a.is-active::after, .nav__cta:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { font-size: 14px; font-weight: 500; }
@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(120% 90% at 20% 0%, #0A4A1E 0%, var(--forest) 45%, var(--forest-deep) 100%);
  color: var(--paper-on-forest);
  padding-block: calc(140px + env(safe-area-inset-top, 0px)) 96px;
  overflow: hidden;
}
.hero::before { /* fine dotted texture across the ground */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(232,233,229,.07) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 85%);
}
.hero__inner { position: relative; max-width: 880px; margin-inline: auto; }
.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(46px, 8.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin-top: 22px;
  display: flex; flex-wrap: wrap; column-gap: .26em; row-gap: 0;
}
.hero__title .w {
  display: inline-block;
  clip-path: inset(0 0 0 0);
  animation: rise 1.1s var(--ease-out) both;
  animation-delay: calc(.12s + var(--i) * .11s);
}
.hero__title .w:last-child { color: var(--leaf); }
.hero__lede {
  margin-top: 34px;
  max-width: 62ch;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: rgba(232,233,229,.86);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 64px; padding-top: 28px;
  border-top: 1px dotted var(--hairline-on-forest);
}
.hero__facts dt { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-on-forest); }
.hero__facts dd { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--paper-on-forest); }
@media (max-width: 720px) {
  .hero { padding-block: calc(112px + env(safe-area-inset-top, 0px)) 72px; }
  .hero__facts { grid-template-columns: 1fr; gap: 18px; margin-top: 44px; }
}
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: 28px;
  width: 1px; height: 56px; overflow: hidden; opacity: .6;
}
.hero__scroll span {
  position: absolute; inset: 0; background: var(--paper);
  animation: drip 2.4s var(--ease-in-out) infinite;
}

/* reveal lines (hero load-in) */
.reveal-line { animation: fade-up 1s var(--ease-out) both; animation-delay: calc(.1s + var(--delay, 0) * .1s); }
[data-delay="5"] { --delay: 5; } [data-delay="6"] { --delay: 6; } [data-delay="7"] { --delay: 7; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; line-height: 1;
  transition: transform .45s var(--ease-out), background .3s, color .3s, border-color .3s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn--paper { background: var(--paper); color: var(--forest); }
.btn--paper:hover { background: #fff; }
.btn--ghost { border: 1px solid rgba(232,233,229,.4); color: var(--paper); }
.btn--ghost:hover { border-color: var(--paper); }

/* ---------- sections ---------- */
.section { padding-block: clamp(72px, 9vw, 120px); }
.section .rule { margin-bottom: clamp(48px, 6vw, 80px); }
.section__head { max-width: 700px; }
.section__sub { margin-top: 16px; color: var(--ink-soft); font-size: 18px; max-width: 56ch; }

.grid-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr); gap: clamp(32px, 6vw, 96px); }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- experience / timeline ---------- */
.section--exp { overflow-x: clip; }
.exp__intro {
  margin-top: 12px; max-width: 700px;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(21px, 2.2vw, 26px); line-height: 1.4; color: var(--ink);
}
.timeline-wrap { position: relative; margin-top: 12px; padding-top: 54px; } /* 42px car + 12px gap */
.timeline {
  --side: max(var(--gutter), (100vw - var(--wrap)) / 2);
  position: relative;
  display: flex; gap: 24px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  /* full-bleed track: past jobs run off the left edge, today lines up with the content column */
  margin-inline: calc(50% - 50vw); padding-inline: var(--side);
  scroll-padding-inline: var(--side);
  cursor: grab;
}
.timeline::-webkit-scrollbar { display: none; }
.timeline.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.timeline:focus-visible { outline-offset: -2px; }
.timeline__item { position: relative; flex: 0 0 262px; padding-top: 28px; display: grid; gap: 4px; align-content: start; }
.timeline__item::after { /* dotted connector, as in Figma: 8px gap after the dot, 242px rule */
  content: ""; position: absolute; left: 20px; width: 242px; top: 5px; height: 2px;
  background-image: radial-gradient(circle, var(--hairline) .8px, transparent 1px); background-size: 4px 2px;
}
.timeline__dot {
  position: absolute; left: 0; top: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--forest);
  transform: scale(0); transition: transform .6s var(--ease-out), background-color .35s;
}
.timeline.is-in .timeline__dot { transform: scale(1); }
.timeline.is-in .timeline__item:nth-last-child(1) .timeline__dot { transition-delay: .1s, 0s; }
.timeline.is-in .timeline__item:nth-last-child(2) .timeline__dot { transition-delay: .25s, 0s; }
.timeline.is-in .timeline__item:nth-last-child(3) .timeline__dot { transition-delay: .4s, 0s; }
.timeline.is-in .timeline__item:nth-last-child(4) .timeline__dot { transition-delay: .55s, 0s; }
.timeline.is-in .timeline__item:nth-last-child(5) .timeline__dot { transition-delay: .7s, 0s; }
.timeline.is-in .timeline__item:nth-last-child(6) .timeline__dot { transition-delay: .85s, 0s; }
.timeline__item.is-here .timeline__dot { background-color: var(--forest); }
html:not(.js) .timeline__item--now .timeline__dot { background-color: var(--forest); }
.timeline.is-in .timeline__item--now.is-here .timeline__dot { animation: pulse 2.6s 1.2s ease-out infinite; }
.timeline__years { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline__co { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ink); }
.timeline__role { font-size: 14px; line-height: 1.5; color: var(--ink-soft); }

/* The DeLorean: placed by site.js so its nose sits over the stop you're at */
.timeline__car {
  position: absolute; left: 0; top: 0; width: 111px; height: 42px; z-index: 2;
  pointer-events: none; will-change: transform;
  opacity: 0; transition: opacity .6s var(--ease-out) .5s;
}
html:not(.js) .timeline__car { display: none; }
.timeline-wrap:has(.timeline.is-in) .timeline__car,
.timeline__car.is-in { opacity: 1; }
.timeline__car-body { position: relative; width: 100%; height: 100%; transition: transform .5s var(--ease-in-out); }
.timeline__car.is-forward .timeline__car-body { transform: translateX(calc(-100% + 24px)) scaleX(-1); } /* turn around for the trip back to today */
.timeline__car img { position: relative; width: 100%; height: 100%; animation: hover 2.4s ease-in-out infinite alternate; }
.timeline__trail { /* flaming tire tracks, length follows scroll speed */
  --trail: 0;
  position: absolute; left: 72%; bottom: 2px; width: 150px; height: 7px;
  background:
    linear-gradient(to right, #FFB347, rgba(255,106,0,.85) 35%, rgba(255,106,0,0)) top / 100% 2px no-repeat,
    linear-gradient(to right, #FFB347, rgba(255,106,0,.85) 35%, rgba(255,106,0,0)) bottom / 100% 2px no-repeat;
  transform-origin: left center; transform: scaleX(var(--trail)); opacity: var(--trail);
  filter: drop-shadow(0 0 3px rgba(255,140,0,.6));
}
.timeline__hint {
  margin-top: 28px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  transition: opacity .6s var(--ease-out);
}
.timeline__hint.is-gone { opacity: 0; }
@media (hover: none), (max-width: 820px) { .timeline__hint { display: none; } }
@media (max-width: 820px) {
  .timeline { margin-top: 0; cursor: auto; }
  .timeline__item { scroll-snap-align: end; } /* each stop settles against the right edge, like today does */
}

/* ---------- principles ---------- */
.principles {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0 clamp(32px, 6vw, 96px);
  margin-top: clamp(40px, 5vw, 64px);
}
.principle {
  padding-block: 32px;
  border-top: 1px dotted var(--hairline);
  opacity: 0; transform: translateY(18px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.principle.is-in { opacity: 1; transform: none; }
.principle:nth-child(2) { transition-delay: .12s; }
.principle:nth-child(3) { transition-delay: .24s; }
.principle:nth-child(4) { transition-delay: .36s; }
.principle h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--ink); }
.principle p { margin-top: 12px; color: var(--ink-soft); max-width: 48ch; }
@media (max-width: 820px) {
  .principles { display: flex; gap: 16px; margin-top: 32px; align-items: stretch; }
  .principle {
    flex: 0 0 100%; scroll-snap-align: start;
    border-top: 0; padding: 20px; border-radius: 6px;
    background: rgba(255,255,255,.4);
    box-shadow: 0 2px 16px rgba(0,0,0,.08), 0 1px 0 rgba(0,0,0,.03);
    opacity: 1; transform: none; /* cards are always visible; no reveal stagger on phones */
  }
  .principle h3 { font-size: 22px; }
  .principle p { font-size: 16px; }
}

.credo {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 32px;
  border-top: 1px dotted var(--hairline);
  max-width: 760px;
}
.credo p {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(20px, 2.2vw, 26px); line-height: 1.4; color: var(--ink);
}

/* ---------- work tiles ---------- */
.tiles {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(40px, 5vw, 64px);
}
.tile {
  opacity: 0; transform: translateY(24px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.tile.is-in { opacity: 1; transform: none; }
.tile:nth-child(even) { transition-delay: .12s; }
.tile__media {
  position: relative; overflow: hidden; border-radius: 6px;
  background: var(--white);
  aspect-ratio: 1080 / 784; max-width: 100%; /* the card size the Figma previews are drawn at */
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 20px 50px -30px rgba(0,48,14,.35);
  transition: box-shadow .6s var(--ease-out), transform .6s var(--ease-out);
}
.tile__media img { width: 100%; height: 100%; object-fit: contain; background: var(--white); transform: scale(1.005); transition: transform 1.2s var(--ease-out); }
.tile:hover .tile__media { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 30px 60px -28px rgba(0,48,14,.45); }
.tile:hover .tile__media img { transform: scale(1.035); }
.tile__text { padding-top: 22px; }
.tile__text h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; margin-top: 8px; color: var(--ink); }
.tile__text p:last-child { margin-top: 10px; color: var(--ink-soft); font-size: 16px; max-width: 52ch; }
@media (max-width: 720px) { .tiles { grid-template-columns: 1fr; } }

/* ---------- carousels (phones only) ---------- */
.carousel-indicator { display: none; }
@media (max-width: 820px) {
  .carousel {
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    scroll-padding-inline: var(--gutter);
    /* let cards run to the edge of the screen while the text keeps its gutter */
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
  }
  .carousel::-webkit-scrollbar { display: none; }
  .carousel-indicator {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    margin-top: 20px; min-height: 15px;
  }
  .carousel-indicator__count {
    font-size: 12px; font-weight: 500; letter-spacing: .18em; color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  .carousel-indicator__dots { display: flex; gap: 6px; justify-content: center; }
  .carousel-indicator__dot {
    width: 8px; height: 8px; border-radius: 4px; background: var(--hairline);
    border: 0; padding: 0; cursor: pointer;
    transition: width .4s var(--ease-out), background .3s;
  }
  .carousel-indicator__dot.is-active { width: 24px; background: var(--forest); }
}

/* ---------- sketchbook ---------- */
.section--sketch { padding-top: 0; }
.sketch {
  display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
}
.sketch__text p:not(.eyebrow) { margin-top: 18px; color: var(--ink-soft); max-width: 52ch; }
.sketch__art { color: var(--forest); text-align: center; }
.thing { width: min(100%, 270px); margin-inline: auto; transition: transform .6s var(--ease-out); }
.sketch__art:hover .thing { transform: translateY(-4px) rotate(-1.5deg); }
.doodle { width: min(100%, 360px); margin-inline: auto; overflow: visible; }
.doodle .dl { stroke-dasharray: 1; stroke-dashoffset: 1; }
.sketch__art.is-in .doodle .dl { animation: draw 1.6s var(--ease-in-out) forwards; }
.sketch__art.is-in .doodle .dl:nth-child(1)  { animation-delay: 0s; }
.sketch__art.is-in .doodle .dl:nth-child(2)  { animation-delay: .9s; }
.sketch__art.is-in .doodle .dl:nth-child(3)  { animation-delay: 1.1s; }
.sketch__art.is-in .doodle .dl:nth-child(4)  { animation-delay: 1.6s; }
.sketch__art.is-in .doodle .dl:nth-child(5)  { animation-delay: 1.5s; }
.sketch__art.is-in .doodle .dl:nth-child(6)  { animation-delay: 1.8s; }
.sketch__art.is-in .doodle .dl:nth-child(7)  { animation-delay: 2.3s; }
.sketch__art.is-in .doodle .dl:nth-child(8)  { animation-delay: 2.0s; }
.sketch__art.is-in .doodle .dl:nth-child(9)  { animation-delay: 2.4s; }
.sketch__art.is-in .doodle .dl:nth-child(10) { animation-delay: 2.7s; }
.sketch__art.is-in .doodle .dl:nth-child(11) { animation-delay: 3.0s; }
.sketch__art.is-in .doodle:hover .dl { animation: wiggle .6s ease-in-out; }
.sketch__art figcaption { margin-top: 24px; }
@media (max-width: 820px) { .sketch { grid-template-columns: 1fr; } .sketch__art { order: -1; } }

/* ---------- illustrations ---------- */
.illos { margin-top: clamp(56px, 7vw, 88px); }
.illos__title { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--ink); }
.illos__grid { display: grid; grid-template-columns: repeat(3, 360px); justify-content: space-between; gap: 20px; margin-top: 28px; }
.illo { display: grid; gap: 18px; justify-items: center; }
.illo__media {
  width: 100%; aspect-ratio: 1; max-width: 100%; overflow: hidden; border-radius: 4px; background: var(--white);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 20px 50px -30px rgba(0,48,14,.35);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.illo__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.illo:hover .illo__media { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 30px 60px -28px rgba(0,48,14,.45); }
.illo:hover .illo__media img { transform: scale(1.03); }
.illo__caption { text-align: center; }
@media (max-width: 1200px) { .illos__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) {
  .illos__grid { display: flex; gap: 16px; margin-top: 24px; }
  .illo { flex: 0 0 100%; scroll-snap-align: start; }
}

/* ---------- contact ---------- */
.contact {
  background: radial-gradient(120% 100% at 80% 100%, #0A4A1E 0%, var(--forest) 45%, var(--forest-deep) 100%);
  color: var(--paper-on-forest);
  padding-block: clamp(88px, 11vw, 150px);
  text-align: left;
}
.contact__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(36px, 5.6vw, 64px); line-height: 1.05; letter-spacing: -.015em;
  margin-top: 14px; max-width: 14ch; text-wrap: balance;
}
.contact__sub { margin-top: 22px; max-width: 52ch; color: rgba(232,233,229,.8); font-size: 18px; }
.contact__email {
  display: inline-block; margin-top: 44px;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(22px, 3.4vw, 40px); letter-spacing: -.01em;
  color: var(--paper-on-forest);
  background-image: linear-gradient(var(--leaf), var(--leaf));
  background-repeat: no-repeat; background-size: 0% 2px; background-position: 0 100%;
  padding-bottom: 6px;
  transition: background-size .6s var(--ease-out), color .3s;
  word-break: break-all;
}
.contact__email:hover { background-size: 100% 2px; color: #fff; }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 40px; padding-top: 28px; border-top: 1px dotted var(--hairline-on-forest); font-size: 15px; }
.contact__links a { position: relative; padding-bottom: 3px; color: rgba(232,233,229,.86); }
.contact__links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out); }
.contact__links a:hover { color: #fff; }
.contact__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- footer ---------- */
.footer { background: var(--forest-deep); color: var(--muted-on-forest); font-size: 13px; padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px)); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.wave { display: inline-block; transform-origin: 70% 70%; }
.footer:hover .wave { animation: wave 1.2s ease-in-out; }

/* ---------- keyframes ---------- */
@keyframes rise    { from { opacity: 0; transform: translateY(110%); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drip    { 0% { transform: translateY(-100%); } 50% { transform: translateY(0); } 100% { transform: translateY(100%); } }
@keyframes pulse   { 0% { box-shadow: 0 0 0 0 var(--leaf-soft); } 70% { box-shadow: 0 0 0 12px rgba(143,191,159,0); } 100% { box-shadow: 0 0 0 0 rgba(143,191,159,0); } }
@keyframes draw    { to { stroke-dashoffset: 0; } }
@keyframes wiggle  { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-1.5deg); } 75% { transform: rotate(1.5deg); } }
@keyframes hover   { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes wave    { 0%,100% { transform: rotate(0); } 25% { transform: rotate(14deg); } 50% { transform: rotate(-8deg); } 75% { transform: rotate(10deg); } }

/* ---------- reduced motion / no-JS ---------- */
html:not(.js) .rule--draw, html:not(.js) .principle, html:not(.js) .tile { opacity: 1; transform: none; }
html:not(.js) .timeline::before { transform: none; }
html:not(.js) .timeline__dot { transform: scale(1); }
html:not(.js) .doodle .dl { stroke-dasharray: none; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .rule--draw, .principle, .tile { opacity: 1; transform: none; }
  .timeline::before { transform: none; } .timeline__dot { transform: scale(1); }
  .doodle .dl { stroke-dasharray: none; stroke-dashoffset: 0; }
}
