/* Northline Studio — editorial cover system */

:root {
  --ink: #08080a;
  --ink-soft: #101014;
  --paper: #f2efe9;
  --paper-dim: rgba(242, 239, 233, 0.62);
  --paper-faint: rgba(242, 239, 233, 0.38);
  --rule: rgba(242, 239, 233, 0.14);
  --rule-strong: rgba(242, 239, 233, 0.28);
  --copper: #c2703f;
  --copper-lit: #e5944f;

  --gutter: clamp(20px, 3.2vw, 48px);
  --nav-h: 70px;

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

::selection {
  background: var(--copper);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--copper-lit);
  outline-offset: 3px;
}

/* ── print grain ─────────────────────────────────────────── */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── shared type ─────────────────────────────────────────── */

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.eyebrow .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 10px;
  background: var(--copper);
  vertical-align: middle;
}

.serif {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.04;
}

.lede {
  max-width: 46ch;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.65;
  color: var(--paper-dim);
}

.copper {
  color: var(--copper-lit);
}

/* ── line-rise reveal ────────────────────────────────────── */

.line {
  display: block;
  overflow: hidden;
  /* room for serif ascenders/descenders inside the clipping mask */
  padding-top: 0.18em;
  margin-top: -0.18em;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.line > span {
  display: block;
  transform: translateY(112%);
  transition: transform 1.05s var(--ease);
  transition-delay: var(--d, 0s);
}

.is-in .line > span,
.line.is-in > span {
  transform: none;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ── navigation ──────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(8, 8, 10, 0.82), rgba(8, 8, 10, 0));
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-stuck {
  background: rgba(8, 8, 10, 0.9);
  border-bottom-color: var(--rule);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.brand svg {
  width: 17px;
  height: 17px;
  color: var(--copper);
  transition: transform 0.8s var(--ease);
}

.brand:hover svg {
  transform: rotate(90deg);
}

.brand sup {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--paper-faint);
  top: -0.9em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  justify-self: center;
}

.nav-links a {
  position: relative;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-dim);
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.nav-links a:hover {
  color: var(--paper);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  justify-self: end;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border: 1px solid var(--paper);
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease), gap 0.35s var(--ease);
}

.btn:hover {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff;
  gap: 15px;
}

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--rule-strong);
}

.btn--ghost:hover {
  background: transparent;
  border-color: var(--copper);
  color: var(--copper-lit);
}

/* ── cover ───────────────────────────────────────────────── */

.cover {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr);
  min-height: 100vh;
  min-height: 100svh;
}

.cover-left {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--rule);
  background:
    radial-gradient(120% 90% at 22% 18%, rgba(194, 112, 63, 0.2), transparent 62%),
    radial-gradient(90% 80% at 78% 88%, rgba(120, 60, 30, 0.14), transparent 60%),
    var(--ink);
}

#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover-left::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(8, 8, 10, 0.92) 0%,
    rgba(8, 8, 10, 0.55) 22%,
    rgba(8, 8, 10, 0.05) 52%,
    transparent 78%
  );
}

.field-tag {
  position: absolute;
  top: calc(var(--nav-h) + 14px);
  left: var(--gutter);
  z-index: 3;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-faint);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* white rectangular board, bottom-left */
.title-block {
  position: absolute;
  z-index: 4;
  left: var(--gutter);
  bottom: calc(58px + clamp(18px, 2.6vw, 38px));
  width: min(440px, calc(100% - var(--gutter) * 2));
  background: var(--paper);
  color: var(--ink);
  padding: clamp(22px, 2.5vw, 34px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.title-block .block-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(8, 8, 10, 0.5);
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(8, 8, 10, 0.16);
}

.title-block .block-index .bar {
  flex: 1;
  height: 3px;
  background: var(--copper);
}

.title-block h2 {
  font-family: var(--serif);
  font-size: clamp(27px, 2.5vw, 38px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 20px 0 0;
  color: var(--ink);
}

.title-block h2 em {
  font-style: italic;
  color: var(--copper);
}

.title-block p {
  margin-top: 16px;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(8, 8, 10, 0.68);
  max-width: 34ch;
}

/* right column */
.cover-right {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 34px) var(--gutter) 104px;
}

.cover-right .eyebrow {
  margin-bottom: clamp(24px, 3vw, 38px);
}

.headline {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 70px);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.03em;
  max-width: 15ch;
}

.headline em {
  font-style: italic;
  font-weight: 300;
  color: var(--copper-lit);
}

.headline .thin {
  font-weight: 200;
  color: var(--paper-dim);
}

.cover-right .lede {
  margin-top: clamp(22px, 2.2vw, 28px);
}

/* work index */
.work {
  margin-top: clamp(34px, 3.8vw, 48px);
}

.work-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-strong);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.work-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 14px;
  padding: 13px 14px 13px 12px;
  margin-left: -12px;
  border-bottom: 1px solid var(--rule);
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    padding-left 0.4s var(--ease);
}

.work-row .idx {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--copper);
  transition: color 0.4s var(--ease);
}

.work-row .name {
  font-family: var(--serif);
  font-size: clamp(19px, 1.6vw, 24px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-row .tag {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--paper-faint);
  transition: color 0.4s var(--ease);
}

.work-row .arrow {
  justify-self: end;
  font-size: 15px;
  opacity: 0.5;
  transform: translateX(-6px);
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}

.work-row:hover,
.work-row:focus-visible {
  background: var(--paper);
  color: var(--ink);
  padding-left: 20px;
}

.work-row:hover .idx,
.work-row:hover .tag,
.work-row:focus-visible .idx,
.work-row:focus-visible .tag {
  color: rgba(8, 8, 10, 0.55);
}

.work-row:hover .idx {
  color: var(--copper);
}

.work-row:hover .arrow {
  opacity: 1;
  transform: none;
}

/* rotating flower mark */
.flower {
  position: absolute;
  z-index: 4;
  right: clamp(20px, 2.6vw, 42px);
  bottom: 92px;
  width: clamp(84px, 9vw, 142px);
  aspect-ratio: 1;
  color: var(--copper);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease) 0.5s;
}

.flower.is-in {
  opacity: 0.92;
}

.flower svg {
  width: 100%;
  height: 100%;
  animation: spin 34s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* cover bottom strip */
.cover-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--gutter);
  border-top: 1px solid var(--rule);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.cover-strip .scroll {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper-dim);
}

.cover-strip .scroll i {
  display: block;
  width: 1px;
  height: 18px;
  background: var(--copper);
  animation: drop 2.4s var(--ease) infinite;
  transform-origin: top;
}

@keyframes drop {
  0%,
  100% {
    transform: scaleY(0.25);
    opacity: 0.3;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* ── sections ────────────────────────────────────────────── */

.section {
  position: relative;
  padding: clamp(88px, 11vw, 168px) var(--gutter);
  border-top: 1px solid var(--rule);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr);
  gap: clamp(30px, 5vw, 88px);
}

.section-label {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 33px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.section-label .num {
  font-family: var(--serif);
  font-size: 45px;
  letter-spacing: 0.02em;
  color: var(--copper);
  text-transform: none;
}

.statement {
  font-family: var(--serif);
  font-size: clamp(26px, 3.1vw, 46px);
  font-weight: 300;
  line-height: 1.16;
  letter-spacing: -0.02em;
  max-width: 20ch;
}

.statement em {
  font-style: italic;
  color: var(--copper-lit);
}

.body-copy {
  margin-top: 30px;
  max-width: 58ch;
  color: var(--paper-dim);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.72;
}

.body-copy + .body-copy {
  margin-top: 18px;
}

/* stat boards */
.boards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(44px, 5vw, 72px);
  background: var(--rule);
  border: 1px solid var(--rule);
}

.board {
  background: var(--ink);
  padding: clamp(24px, 2.6vw, 38px) clamp(20px, 2vw, 30px);
  transition: background 0.45s var(--ease);
}

.board:hover {
  background: var(--ink-soft);
}

.board .k {
  font-family: var(--serif);
  font-size: clamp(34px, 3.6vw, 54px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--paper);
}

.board .k span {
  color: var(--copper);
}

.board .v {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--paper-faint);
  letter-spacing: 0.02em;
}

/* capabilities list */
.caps {
  border-top: 1px solid var(--rule);
}

.cap {
  display: grid;
  grid-template-columns: 68px minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(18px, 3vw, 48px);
  align-items: start;
  padding: clamp(24px, 2.6vw, 34px) 0;
  border-bottom: 1px solid var(--rule);
}

.cap .n {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--copper);
  padding-top: 6px;
}

.cap h3 {
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 29px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  transition: color 0.35s var(--ease), transform 0.45s var(--ease);
}

.cap:hover h3 {
  color: var(--copper-lit);
  transform: translateX(6px);
}

.cap p {
  color: var(--paper-dim);
  font-size: 15px;
  line-height: 1.68;
  max-width: 46ch;
}

.cap .svc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cap .svc span {
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--paper-faint);
  border: 1px solid var(--rule);
  padding: 5px 11px;
}

/* project cards — liquid glass with flashlight effect */
.projects {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.projects::before {
  content: "";
  position: absolute;
  inset: -48px -18px;
  z-index: 0;
  background:
    radial-gradient(58% 46% at 72% 16%, rgba(194, 112, 63, 0.16), rgba(194, 112, 63, 0) 70%),
    radial-gradient(50% 40% at 12% 88%, rgba(242, 239, 233, 0.07), rgba(242, 239, 233, 0) 72%);
  filter: blur(26px);
  pointer-events: none;
}

.projects > .project {
  z-index: 1;
}

.project {
  position: relative;
  padding: clamp(26px, 3vw, 38px) clamp(24px, 3vw, 40px);
  border-radius: 24px;
  /* metallic white-orange surface: alternating light bands like brushed metal */
  background:
    linear-gradient(118deg,
      #ffffff 0%,
      #fdf1e4 16%,
      #f6d7b6 30%,
      #fffaf4 44%,
      #f3c896 58%,
      #ffe9d2 72%,
      #eda868 86%,
      #fff6ec 100%);
  color: var(--ink);
  isolation: isolate;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

/* static edge glow — white/orange rim light, fixed position */
.project::before {
  content: '';
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: inherit;
  padding: 4px;
  background: conic-gradient(
    from 220deg,
    rgba(255, 255, 255, 0.95) 0deg,
    rgba(229, 148, 79, 0.95) 70deg,
    rgba(255, 244, 230, 0.35) 140deg,
    rgba(194, 112, 63, 0.85) 210deg,
    rgba(255, 255, 255, 0.7) 280deg,
    rgba(229, 148, 79, 0.9) 330deg,
    rgba(255, 255, 255, 0.95) 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  filter: blur(5px);
  pointer-events: none;
}

/* metallic sheen — fixed diagonal highlight across the surface */
.project::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(118deg,
      transparent 22%,
      rgba(255, 255, 255, 0.5) 34%,
      rgba(255, 255, 255, 0.85) 41%,
      rgba(255, 255, 255, 0.25) 48%,
      transparent 56%,
      rgba(255, 255, 255, 0.35) 78%,
      transparent 90%);
  pointer-events: none;
}

/* Flashlight spotlight effect following mouse */
.project-flashlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: radial-gradient(
    circle 220px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 214, 170, 0.3) 40%,
    transparent 72%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.project:hover .project-flashlight {
  opacity: 1;
}

/* Corner light beam from bottom-left — static */
.project-corner-light {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  overflow: hidden;
}

.project-corner-light::before {
  content: '';
  position: absolute;
  left: -25%;
  bottom: -35%;
  width: 120%;
  height: 120%;
  background: conic-gradient(
    from 40deg at 25% 75%,
    rgba(255, 255, 255, 0.75) 0deg,
    rgba(255, 196, 138, 0.5) 28deg,
    rgba(229, 148, 79, 0.28) 55deg,
    transparent 110deg
  );
  filter: blur(34px);
}

.project:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 34px -8px rgba(255, 255, 255, 0.25),
    0 0 60px -14px rgba(229, 148, 79, 0.5),
    0 24px 60px -22px rgba(0, 0, 0, 0.85);
}

.project-head {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 1.8vw, 22px);
  position: relative;
  z-index: 2;
}

.project-icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.85), rgba(229, 148, 79, 0.25));
  color: #9c5227;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -10px 16px -12px rgba(150, 90, 40, 0.35),
    0 8px 18px -12px rgba(120, 60, 20, 0.4);
}

.project-icon svg {
  width: 26px;
  height: 26px;
}

/* uploaded project image covers the tile; SVG shows only if it's missing */
.project-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  transform: scale(1.5);
  transform-origin: 50% 42%;
  border-radius: 15px;
}

.project-heading {
  min-width: 0;
}

.project-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(8, 8, 10, 0.52);
}

.project-title {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: clamp(25px, 2.6vw, 37px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0a0a0c;
}

.project-sub {
  margin-top: 9px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: #8a4520;
}

.project-body {
  margin-top: clamp(18px, 2vw, 24px);
  max-width: 64ch;
  font-size: 15px;
  line-height: 1.72;
  color: rgba(8, 8, 10, 0.76);
  position: relative;
  z-index: 2;
}

.project-stats {
  margin-top: 16px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: rgba(8, 8, 10, 0.82);
  position: relative;
  z-index: 2;
}

.project-stats i {
  font-style: normal;
  margin: 0 8px;
  color: #9c4f26;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(18px, 2vw, 24px);
  position: relative;
  z-index: 2;
}

.project-tags span {
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(8, 8, 10, 0.72);
}

/* footer row: tags left, live-product button right */
.project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: clamp(18px, 2vw, 24px);
  position: relative;
  z-index: 2;
}

.project-foot .project-tags {
  margin-top: 0;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 26px -14px rgba(8, 8, 10, 0.7);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    color 0.35s var(--ease), gap 0.35s var(--ease), transform 0.35s var(--ease);
}

.project-cta:hover {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff;
  gap: 12px;
  transform: translateY(-1px);
}

/* contact */
.contact {
  background: var(--ink);
}

.contact-mail {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(28px, 4.4vw, 66px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.025em;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 8px;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.contact-mail:hover {
  color: var(--copper-lit);
  border-color: var(--copper);
}

.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 13px 22px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
  color: var(--paper);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), gap 0.4s var(--ease), transform 0.4s var(--ease);
}

.resume-btn svg {
  width: 14px;
  height: 14px;
}

.resume-btn:hover {
  color: var(--copper-lit);
  border-color: var(--copper);
  gap: 14px;
  transform: translateY(-1px);
}

.offices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
  margin-top: clamp(52px, 6vw, 86px);
  padding-top: clamp(30px, 3vw, 42px);
  border-top: 1px solid var(--rule);
}

.office h4 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper);
}

.office p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--paper-dim);
}

/* footer */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 26px var(--gutter);
  border-top: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.foot nav {
  display: flex;
  gap: 22px;
}

.foot a:hover {
  color: var(--copper-lit);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 18px;
  font-size: 13px;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

/* ── responsive ──────────────────────────────────────────── */

@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }

  .nav {
    grid-template-columns: 1fr auto;
  }

  .section-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .cap {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .cap p {
    grid-column: 2;
  }

  .cap .svc {
    grid-column: 2;
  }
}

@media (max-width: 860px) {
  .cover {
    display: block;
    height: auto;
    min-height: 0;
  }

  .cover-left {
    height: 64svh;
    min-height: 400px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .field-tag {
    display: none;
  }

  .title-block {
    bottom: clamp(18px, 4vw, 30px);
    width: calc(100% - var(--gutter) * 2);
  }

  .cover-right {
    padding: 52px var(--gutter) 40px;
  }

  .flower {
    top: calc(var(--nav-h) + 16px);
    right: 18px;
    bottom: auto;
    width: 62px;
  }

  .cover-strip {
    position: static;
    border-top: 1px solid var(--rule);
  }

  .boards {
    grid-template-columns: minmax(0, 1fr);
  }

  .offices {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .work-row {
    grid-template-columns: 28px minmax(0, 1fr) 20px;
  }

  .work-row .tag {
    display: none;
  }

  .btn {
    padding: 11px 17px;
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  .cover-left {
    height: 56svh;
  }

  .title-block {
    padding: 20px;
  }

  .title-block p {
    display: none;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .line > span {
    transform: none;
  }

  .flower {
    opacity: 0.92;
  }
}

/* ── 本我 / introduction modules ─────────────────────────── */

.me-intro,
.me-id,
.me-modules,
.me-panels {
  min-width: 0;
}

.me-id {
  display: grid;
  grid-template-columns: clamp(96px, 12vw, 148px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}

.me-shot {
  position: relative;
  margin: 0;
  padding: 3px;
  border-radius: 22px;
  background: linear-gradient(
    145deg,
    var(--copper-lit) 0%,
    rgba(194, 112, 63, 0.35) 32%,
    rgba(242, 239, 233, 0.14) 58%,
    rgba(194, 112, 63, 0.55) 82%,
    var(--copper-lit) 100%
  );
  box-shadow:
    0 22px 48px -22px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(242, 239, 233, 0.05),
    0 0 46px -14px rgba(194, 112, 63, 0.4);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

.me-shot::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 28px;
  background: radial-gradient(
    closest-side,
    rgba(194, 112, 63, 0.28),
    transparent 72%
  );
  opacity: 0;
  transition: opacity 0.7s var(--ease);
  pointer-events: none;
}

.me-shot:hover {
  transform: translateY(-4px);
}

.me-shot:hover::before {
  opacity: 1;
}

.me-shot-inner {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 19px;
  background:
    radial-gradient(120% 100% at 30% 20%, rgba(194, 112, 63, 0.42), transparent 62%),
    radial-gradient(90% 90% at 80% 90%, rgba(120, 60, 30, 0.32), transparent 60%),
    var(--ink-soft);
}

.me-shot-inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.me-shot:hover .me-shot-inner img {
  transform: scale(1.06);
}

.me-shot-inner.is-empty::after {
  content: '待补充';
  position: absolute;
  inset: auto 0 14px;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.me-id-text {
  min-width: 0;
}

.me-id-text .statement {
  margin: 0;
}

.me-role {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}

.me-line {
  margin-top: 12px;
  max-width: 44ch;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--paper-dim);
}

/* module cards */
.me-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
  margin-top: clamp(38px, 4.4vw, 62px);
}

.me-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-height: clamp(178px, 17vw, 224px);
  padding: clamp(20px, 2.2vw, 28px);
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: var(--paper);
  background: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.5s var(--ease), transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

/* photo layer — stays sharp */
.me-card-bg {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    var(--bg),
    radial-gradient(110% 90% at 30% 20%, rgba(194, 112, 63, 0.5), transparent 64%);
  background-size: cover;
  background-position: center;
  opacity: 0.8;
  transform: scale(1.02);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease);
}

/* bottom veil of blur — blurs the photo behind it, fading in downward */
.me-card-blur {
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72%;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 38%,
    rgba(0, 0, 0, 0.92) 72%,
    #000 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 38%,
    rgba(0, 0, 0, 0.92) 72%,
    #000 100%
  );
  pointer-events: none;
  transition: -webkit-backdrop-filter 0.6s var(--ease), backdrop-filter 0.6s var(--ease);
}

/* readability scrim + glass sheen */
.me-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 8, 10, 0.72) 0%,
    rgba(8, 8, 10, 0.38) 34%,
    rgba(8, 8, 10, 0.08) 72%,
    transparent 100%
  );
  transition: opacity 0.5s var(--ease);
}

.me-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(242, 239, 233, 0.09);
  box-shadow: inset 0 1px 0 rgba(242, 239, 233, 0.14);
  pointer-events: none;
  transition: border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.me-card:hover {
  transform: translateY(-5px);
  border-color: var(--rule-strong);
  box-shadow: 0 26px 54px -26px rgba(0, 0, 0, 0.95);
}

.me-card:hover .me-card-bg {
  opacity: 0.92;
  transform: scale(1.05);
}

.me-card:hover .me-card-blur {
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.me-card:hover::after {
  border-color: rgba(242, 239, 233, 0.2);
}

.me-card-n {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--copper);
  transition: color 0.4s var(--ease);
}

.me-card-title {
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 20px rgba(8, 8, 10, 0.85), 0 1px 3px rgba(8, 8, 10, 0.7);
}

.me-card-sub {
  font-size: 13px;
  line-height: 1.6;
  color: var(--paper-dim);
  text-shadow: 0 1px 14px rgba(8, 8, 10, 0.85);
  transition: color 0.45s var(--ease);
}

/* active */
.me-card[aria-expanded='true'] {
  border-color: var(--copper);
  box-shadow:
    0 26px 54px -26px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(194, 112, 63, 0.35);
}

.me-card[aria-expanded='true'] .me-card-bg {
  opacity: 1;
  transform: scale(1.04);
}

/* selected tab: the photo comes into full focus */
.me-card[aria-expanded='true'] .me-card-blur {
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
}

.me-card[aria-expanded='true']::before {
  opacity: 0.85;
}

.me-card[aria-expanded='true']::after {
  border-color: rgba(194, 112, 63, 0.42);
  box-shadow: inset 0 1px 0 rgba(242, 239, 233, 0.2);
}

.me-card[aria-expanded='true'] .me-card-n {
  color: var(--copper-lit);
}

/* panels */
.me-panels {
  margin-top: clamp(20px, 2.4vw, 30px);
}

.me-panel[hidden] {
  display: none;
}

.me-panel {
  animation: me-in 0.7s var(--ease) both;
}

@keyframes me-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.me-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-strong);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.me-panel-tag {
  color: var(--copper);
}

/* music deck */
.me-deck {
  position: relative;
  margin-top: clamp(22px, 2.6vw, 32px);
  padding: clamp(18px, 2vw, 26px);
  background: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 18px;
}

.me-deck audio {
  display: none;
}

.me-deck-now {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
}

.me-cover {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 3px;
  background:
    radial-gradient(110% 100% at 30% 20%, rgba(194, 112, 63, 0.34), transparent 64%),
    var(--ink);
}

.me-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.me-now-meta {
  min-width: 0;
}

.me-now-title {
  font-family: var(--serif);
  font-size: clamp(19px, 1.9vw, 27px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-now-artist {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-ctrls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.me-ctrls button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--paper-dim);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
    background 0.35s var(--ease);
}

.me-ctrls button svg {
  width: 17px;
  height: 17px;
}

.me-ctrls button:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.me-ctrls #me-toggle {
  width: 46px;
  height: 46px;
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

.me-ctrls #me-toggle:hover {
  color: #fff;
  background: var(--copper);
  border-color: var(--copper);
}

.me-ctrls #me-toggle .i-pause,
.me-ctrls #me-toggle.is-playing .i-play {
  display: none;
}

.me-ctrls #me-toggle.is-playing .i-pause {
  display: block;
}

.me-bar {
  position: relative;
  height: 2px;
  margin-top: clamp(16px, 2vw, 22px);
  background: var(--rule);
  cursor: pointer;
}

.me-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--copper);
  transition: width 0.2s linear;
}

.me-tracks {
  list-style: none;
  margin: clamp(16px, 2vw, 22px) 0 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
  border-top: 1px solid var(--rule);
}

.me-tracks li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 10px 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
  color: var(--paper-dim);
  cursor: pointer;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.me-tracks li:hover {
  color: var(--paper);
  background: rgba(242, 239, 233, 0.04);
}

.me-tracks li .n {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--copper);
  text-align: center;
}

.me-tracks li .t {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-tracks li.is-on {
  color: var(--copper-lit);
}

.me-tracks li.is-on .d {
  color: var(--copper);
}

.me-more {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 11px 14px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-dim);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
    background 0.35s var(--ease);
}

.me-more[hidden] {
  display: none;
}

.me-more:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

.me-fallback[hidden] {
  display: none;
}

.me-fallback {
  display: inline-block;
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper-lit);
  border-bottom: 1px solid var(--copper);
  padding-bottom: 4px;
}

.me-note {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--paper-faint);
}

/* travel gallery — masonry, every photo shown in full */
.me-gallery {
  column-count: 3;
  column-gap: clamp(10px, 1.2vw, 16px);
  margin-top: clamp(22px, 2.6vw, 32px);
}

.me-shot-lg {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(10px, 1.2vw, 16px);
  overflow: hidden;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background:
    radial-gradient(110% 100% at 30% 20%, rgba(194, 112, 63, 0.3), transparent 64%),
    var(--ink-soft);
}

/* keep a placeholder box when the file is missing */
.me-shot-lg.is-empty {
  min-height: clamp(200px, 22vw, 300px);
}

.me-shot-lg img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.9s var(--ease), filter 0.5s var(--ease);
}

.me-shot-lg figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 14px 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: linear-gradient(to top, rgba(8, 8, 10, 0.9), transparent);
}

.me-shot-lg figcaption span:last-child {
  color: var(--copper);
}

.me-shot-lg:hover img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

/* code panel */
.me-body {
  margin-top: clamp(22px, 2.6vw, 32px);
  max-width: 60ch;
  font-size: 15px;
  line-height: 1.72;
  color: var(--paper-dim);
}

.me-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.me-stack span {
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--paper-faint);
  border: 1px solid var(--rule);
  padding: 5px 11px;
}

.me-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(34px, 4vw, 52px);
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
}

.me-project {
  background: var(--ink);
  padding: clamp(20px, 2.2vw, 28px);
  transition: background 0.45s var(--ease);
}

.me-project:hover {
  background: var(--ink-soft);
}

.me-project h4 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(18px, 1.7vw, 23px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.me-project p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--paper-faint);
}

@media (max-width: 1080px) {
  .me-modules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .me-gallery {
    column-count: 2;
  }
}

@media (max-width: 860px) {
  .me-projects {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .me-id {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .me-modules {
    grid-template-columns: minmax(0, 1fr);
  }

  .me-gallery {
    column-count: 1;
  }

  .me-card {
    min-height: 132px;
    padding: 18px 20px;
  }

  .me-deck-now {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .me-ctrls {
    grid-column: 1 / -1;
  }

  .project {
    padding: 22px 20px;
  }

  .project-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .project-icon svg {
    width: 22px;
    height: 22px;
  }

  .project-body {
    font-size: 14px;
  }
}
