:root {
  --canvas: #fcfcf9;
  --cream: #f2eee6;
  --cream-deep: #e7ded1;
  --ink: #151917;
  --muted: #59615c;
  --forest: #28483a;
  --forest-dark: #183127;
  --mist: #dde6e4;
  --blue-mist: #e8eef1;
  --line: rgba(31, 45, 38, 0.13);
  --sidebar-width: 274px;
  --font: "Manrope", "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

html.nav-fade-fallback body {
  opacity: 0;
}

html.nav-fade-fallback.page-visible body {
  opacity: 1;
  transition: opacity 0.62s var(--ease-out);
}

html.nav-fade-fallback.page-leaving body {
  opacity: 0;
  transition: opacity 0.34s var(--ease-in);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.65;
}

::selection {
  background: #ccddd5;
  color: var(--forest-dark);
}

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

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

h1,
h2,
p,
figure {
  margin-top: 0;
}

:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1000;
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 0.22s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 44px 34px 32px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfaf7 0%, var(--cream) 62%, #eae4da 100%);
}

.sidebar-identity {
  display: block;
  margin-bottom: 52px;
}

.profile-frame {
  display: block;
  width: 106px;
  height: 106px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(40, 72, 58, 0.55);
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.9),
    0 12px 30px rgba(24, 49, 39, 0.1);
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.identity-copy {
  display: flex;
  flex-direction: column;
}

.identity-copy strong {
  max-width: 200px;
  margin-bottom: 5px;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.identity-copy small {
  color: var(--forest);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.nav-link {
  position: relative;
  display: flex;
  min-height: 34px;
  align-items: center;
  color: #58605b;
  font-size: 0.9rem;
  font-weight: 700;
  transition: color 0.22s ease;
}

.nav-link::before {
  position: absolute;
  top: 50%;
  left: -34px;
  width: 3px;
  height: 0;
  border-radius: 0 2px 2px 0;
  background: var(--forest);
  content: "";
  transform: translateY(-50%);
  transition: height 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link.is-active {
  font-weight: 800;
}

.nav-link:hover::before,
.nav-link.is-active::before {
  height: 22px;
}

.sidebar-footer {
  margin: auto 0 0;
  color: #707873;
  font-size: 0.66rem;
  font-weight: 700;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  margin-left: var(--sidebar-width);
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(40, 72, 58, 0.42);
  border-radius: 999px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.32);
  color: var(--forest-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  transition:
    background-color 0.28s var(--ease),
    border-color 0.28s var(--ease),
    color 0.28s var(--ease),
    transform 0.28s var(--ease);
}

.button:hover {
  border-color: var(--forest);
  background: rgba(255, 255, 255, 0.76);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button-mark {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: transform 0.28s var(--ease);
}

.button:hover .button-mark {
  transform: translateX(3px);
}

.button-primary {
  border-color: rgba(24, 49, 39, 0.58);
  background: rgba(242, 238, 230, 0.42);
  color: var(--forest-dark);
}

.button-primary:hover {
  background: rgba(255, 255, 255, 0.82);
}

.button-primary .button-mark {
  background: transparent;
}

.button-secondary {
  border-color: rgba(21, 25, 23, 0.25);
  background: rgba(255, 255, 255, 0.26);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--forest);
  background: #fff;
}

.button-secondary .button-mark {
  background: transparent;
  color: var(--forest-dark);
}

.page-label {
  margin-bottom: 18px;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-title {
  margin-bottom: 28px;
  font-size: clamp(3.5rem, 7vw, 6.9rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

/* Home */
.home-hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
  overflow: hidden;
  background: #d9e1e3;
  isolation: isolate;
}

.home-photo,
.home-scrim {
  position: absolute;
  inset: 0;
}

.home-photo {
  z-index: -2;
  background: #cfd9d7;
}

.home-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
}

.home-scrim {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(252, 252, 249, 0.97) 0%, rgba(252, 252, 249, 0.93) 34%, rgba(246, 243, 235, 0.72) 52%, rgba(32, 52, 43, 0.12) 76%, rgba(21, 31, 27, 0.18) 100%),
    linear-gradient(0deg, rgba(21, 31, 27, 0.08), transparent 35%);
}

.home-content {
  width: min(68%, 820px);
  padding: 72px clamp(42px, 7vw, 112px);
}

.home-content h1 {
  margin-bottom: 26px;
  font-size: clamp(4rem, 8vw, 8.4rem);
  font-weight: 800;
  letter-spacing: -0.085em;
  line-height: 0.82;
}

.home-content h1 span {
  display: block;
}

.home-role {
  margin-bottom: 16px;
  color: var(--forest-dark);
  font-size: clamp(1.45rem, 2.5vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.home-summary {
  max-width: 610px;
  margin-bottom: 34px;
  color: #35413b;
  font-size: clamp(1rem, 1.35vw, 1.17rem);
  font-weight: 700;
  line-height: 1.7;
}

.home-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* About */
.page-about {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 91% 13%, rgba(221, 230, 228, 0.86), transparent 29rem),
    radial-gradient(circle at 4% 92%, rgba(242, 238, 230, 0.9), transparent 28rem),
    var(--canvas);
}

.about-shell {
  width: min(100%, 1320px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(72px, 8vw, 112px) clamp(42px, 7vw, 96px) 108px;
}

.about-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: end;
  gap: clamp(48px, 8vw, 118px);
  margin-bottom: 58px;
}

.about-lead {
  max-width: 760px;
  margin-bottom: 24px;
  color: var(--ink);
  font-size: clamp(1.18rem, 2vw, 1.62rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.55;
}

.about-body {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
}

.about-facts {
  border-top: 1px solid var(--line);
}

.about-fact {
  display: grid;
  gap: 5px;
  padding: 17px 0 18px;
  border-bottom: 1px solid var(--line);
}

.about-fact span {
  color: var(--forest);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-fact strong {
  font-size: 0.87rem;
  font-weight: 800;
  line-height: 1.42;
}

.capability-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.capability-heading .page-label {
  margin-bottom: 6px;
}

.capability-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.capability-grid {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.capability-card {
  display: grid;
  min-height: 0;
  grid-template-columns: 52px minmax(185px, 0.36fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(18px, 3vw, 34px);
  padding: 28px 2px;
  border-bottom: 1px solid var(--line);
}

.capability-card:last-child {
  border-bottom: 0;
}

.capability-card > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(40, 72, 58, 0.38);
  border-radius: 50%;
  color: #49665a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.capability-card h3 {
  margin: 4px 0 0;
  font-size: clamp(1.2rem, 2vw, 1.58rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.capability-card p {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.75;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.text-link,
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-size: 0.82rem;
  font-weight: 800;
}

.text-link span,
.project-link span {
  transition: transform 0.22s ease;
}

.text-link:hover span,
.project-link:hover span {
  transform: translateX(4px);
}

/* Work */
.page-work {
  background:
    radial-gradient(circle at 90% 5%, rgba(221, 230, 228, 0.9), transparent 28rem),
    linear-gradient(145deg, var(--canvas), #f4f1eb 58%, #edf2ef);
}

.work-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: clamp(72px, 8vw, 112px) clamp(38px, 6vw, 80px) 120px;
}

.work-header {
  position: relative;
  margin-bottom: 54px;
}

.work-header::after {
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 28px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--forest), #8aa69a);
  content: "";
}

.work-header .page-title {
  margin-bottom: 18px;
}

.work-header > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.project-card {
  position: relative;
  display: grid;
  min-height: 340px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 19px 55px rgba(24, 49, 39, 0.075);
  transition:
    border-color 0.26s ease,
    box-shadow 0.26s ease;
}

.project-card:hover {
  border-color: rgba(40, 72, 58, 0.3);
  box-shadow: 0 23px 62px rgba(24, 49, 39, 0.1);
}

.project-card-featured {
  box-shadow: 0 26px 72px rgba(24, 49, 39, 0.12);
}

.project-card-agent {
  background: linear-gradient(135deg, #eef3ef, #fff 68%);
}

.project-card-permit {
  background: linear-gradient(135deg, #f1eae0, #fff 72%);
}

.project-card-bridge {
  background: linear-gradient(135deg, #e8eef5, #fff 72%);
}

.project-card-brand {
  background: #fff;
}

.project-card-peltify {
  background: linear-gradient(135deg, #edf1ea, #fff 72%);
}

.project-card-closed {
  border-color: rgba(21, 25, 23, 0.28);
  background: #faf9f5;
}

.project-visual {
  position: relative;
  display: flex;
  min-height: 340px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.project-logo-visual {
  padding: 42px;
}

.agent-visual {
  background:
    radial-gradient(circle at 50% 42%, rgba(207, 170, 108, 0.18), transparent 32%),
    linear-gradient(145deg, #171918, #090a09);
}

.project-logo-frame {
  position: relative;
  z-index: 1;
}

.agent-logo-frame {
  width: min(55%, 170px);
  overflow: hidden;
  border-radius: 30px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 26px 58px rgba(0, 0, 0, 0.42);
}

.agent-logo-frame img {
  width: 100%;
  height: auto;
}

.bridge-visual {
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.9), transparent 26%),
    #e7edf5;
}

.bridge-logo {
  width: min(84%, 390px);
  height: auto;
}

.visual-stat {
  position: absolute;
  right: 22px;
  bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(17, 21, 19, 0.72);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
}

.visual-stat strong {
  font-size: 0.88rem;
  font-weight: 800;
}

.visual-stat span {
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-visual {
  flex-direction: column;
  padding: 34px;
  text-align: center;
  background:
    linear-gradient(rgba(40, 72, 58, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 72, 58, 0.045) 1px, transparent 1px),
    linear-gradient(145deg, #efe7dc, #f8f5ef);
  background-size: 28px 28px, 28px 28px, auto;
}

.metric-visual strong {
  color: var(--forest);
  font-size: clamp(3.6rem, 6vw, 6.2rem);
  font-weight: 800;
  letter-spacing: -0.085em;
  line-height: 0.9;
}

.metric-visual span {
  max-width: 180px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.45;
}

.metric-visual small {
  margin-top: 25px;
  padding: 9px 13px;
  border: 1px solid rgba(40, 72, 58, 0.17);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--forest-dark);
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-visual {
  background: #1a1a1a;
}

.brand-visual img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: contain;
}

.peltify-visual {
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 52px);
  background:
    linear-gradient(rgba(40, 72, 58, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 72, 58, 0.055) 1px, transparent 1px),
    linear-gradient(145deg, #f5f1e8, #e4ebe5);
  background-size: 34px 34px, 34px 34px, auto;
}

.peltify-eyebrow {
  color: var(--forest);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.peltify-icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  box-shadow: 0 12px 24px rgba(40, 72, 58, 0.12);
}

.peltify-name {
  color: var(--ink);
  font-size: clamp(2.2rem, 3.7vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.085em;
  line-height: 0.9;
}

.peltify-name span {
  color: var(--forest);
}

.peltify-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: #445149;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.peltify-flow b {
  color: #819187;
  font-weight: 800;
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 58px);
}

.project-index {
  margin-bottom: 14px;
  color: var(--forest);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.project-meta-line .project-index {
  margin-bottom: 0;
}

.project-status {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.project-status-building {
  color: var(--forest);
  background: rgba(221, 230, 228, 0.52);
}

.project-status-closed {
  border-radius: 2px;
  color: #272a28;
  background: #ece9e1;
}

.project-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.project-copy > p:not(.project-index) {
  max-width: 680px;
  margin-bottom: 20px;
  color: #454f49;
  font-size: 0.9rem;
  font-weight: 700;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-tags span {
  padding: 6px 9px;
  border: 1px solid rgba(40, 72, 58, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #4d5a53;
  font-size: 0.59rem;
  font-weight: 800;
}

.project-link {
  margin-top: 24px;
}

/* Links */
.page-links {
  background:
    radial-gradient(circle at 12% 88%, rgba(221, 230, 228, 0.85), transparent 26rem),
    linear-gradient(145deg, #f8f7f2 0%, #e8efeb 58%, #f4f0e9 100%);
}

.links-shell {
  width: min(100%, 1120px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(72px, 9vw, 128px) clamp(38px, 7vw, 92px);
}

.links-header {
  margin-bottom: 48px;
}

.links-header .page-title {
  margin-bottom: 16px;
}

.links-header > p:last-child {
  color: var(--muted);
  font-weight: 700;
}

.link-directory {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.83);
  box-shadow: 0 24px 60px rgba(24, 49, 39, 0.085);
}

.directory-link {
  display: grid;
  min-height: 112px;
  grid-template-columns: minmax(170px, 0.75fr) minmax(220px, 1.2fr) minmax(150px, 0.8fr) 34px;
  align-items: center;
  gap: 22px;
  padding: 24px 30px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.24s ease;
}

.directory-link:last-child {
  border-bottom: 0;
}

.directory-link:hover {
  background: rgba(221, 230, 228, 0.62);
}

.directory-name {
  font-size: 1.02rem;
  font-weight: 800;
}

.directory-name-with-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bandcamp-mark {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #1da0c3;
  color: #fff;
}

.bandcamp-mark svg {
  width: 18px;
  height: 13px;
  fill: currentColor;
}

.directory-link-music:hover {
  background: rgba(29, 160, 195, 0.1);
}

.directory-description,
.directory-domain {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.directory-domain {
  text-align: right;
}

.directory-arrow {
  color: var(--forest);
  font-size: 1.15rem;
  font-weight: 800;
  text-align: right;
  transition: transform 0.22s ease;
}

.directory-link:hover .directory-arrow {
  transform: translate(3px, -3px);
}

/* Contact */
.page-contact {
  background: linear-gradient(135deg, #dce8e2 0%, #edf0e9 38%, #f2ece3 72%, #fcfcf9 100%);
}

.contact-stage {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
  overflow: hidden;
}

.contact-stage::before,
.contact-stage::after {
  position: absolute;
  border: 1px solid rgba(40, 72, 58, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.contact-stage::before {
  top: -22vw;
  right: -15vw;
  width: 52vw;
  height: 52vw;
}

.contact-stage::after {
  right: 8vw;
  bottom: -24vw;
  width: 42vw;
  height: 42vw;
}

.contact-content {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 72px clamp(42px, 8vw, 112px);
}

.contact-content h1 {
  max-width: 900px;
  margin-bottom: 32px;
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.085em;
  line-height: 0.86;
}

.contact-intro {
  max-width: 650px;
  margin-bottom: 42px;
  color: #46534c;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 700;
}

.contact-email {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 34px;
  padding: 18px 0;
  border-top: 1px solid rgba(40, 72, 58, 0.28);
  border-bottom: 1px solid rgba(40, 72, 58, 0.28);
  color: var(--forest-dark);
  font-size: clamp(1.25rem, 3.2vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  transition: color 0.22s ease;
}

.contact-email:hover {
  color: var(--forest);
}

/* Resume */
.page-resume {
  background: #d8d7d1;
}

.resume-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: clamp(58px, 7vw, 88px) clamp(30px, 5vw, 58px) 94px;
}

.resume-header {
  margin-bottom: 22px;
  text-align: center;
}

.resume-document-label {
  margin-bottom: 7px;
  color: #343532;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.resume-header h1 {
  margin: 0;
  color: #111;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.resume-document {
  overflow: hidden;
  border: 1px solid #5e5f5a;
  border-radius: 0;
  background: #fff;
  box-shadow: 7px 8px 0 rgba(36, 36, 33, 0.13);
}

.resume-frame {
  display: block;
  width: 100%;
  height: min(1120px, 80vh);
  min-height: 820px;
  border: 0;
  background: #fff;
}

.resume-frame-fallback {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid #777872;
  background: #f1f1ed;
  color: #222;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.76rem;
  font-weight: 400;
}

.resume-frame-fallback a {
  color: #0000ee;
  font-weight: 700;
  text-decoration: underline;
}

.resume-download-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid #565752;
  border-radius: 0;
  background: #ecece7;
  box-shadow: 4px 4px 0 rgba(36, 36, 33, 0.12);
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
}

.resume-file-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.resume-file-copy strong {
  overflow-wrap: anywhere;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.83rem;
  font-weight: 700;
}

.resume-file-copy span {
  color: #444;
  font-size: 0.72rem;
  font-weight: 400;
}

.resume-download-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}

.resume-download-classic {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-width: 2px;
  border-style: outset;
  border-color: #fff #6f706b #6f706b #fff;
  border-radius: 0;
  background: #d4d0c8;
  color: #000;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.resume-download-classic:hover {
  background: #e3dfd6;
}

.resume-download-classic:active {
  border-style: inset;
}

.resume-open-link {
  color: #0000ee;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
}

.resume-open-link:visited {
  color: #551a8b;
}

/* Motion */
.motion-ready .reveal {
  opacity: 0;
  transform: translateY(10px);
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.66s var(--ease),
    transform 0.66s var(--ease);
}

.motion-ready .reveal-2.is-visible { transition-delay: 70ms; }
.motion-ready .reveal-3.is-visible { transition-delay: 140ms; }
.motion-ready .reveal-4.is-visible { transition-delay: 210ms; }
.motion-ready .reveal-5.is-visible { transition-delay: 280ms; }

.motion-ready .photo-settle {
  opacity: 0;
  transform: scale(1.02);
}

.motion-ready .photo-settle.is-visible {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}

@media (max-width: 1080px) {
  :root {
    --sidebar-width: 236px;
  }

  .sidebar {
    padding-right: 28px;
    padding-left: 28px;
  }

  .nav-link::before {
    left: -28px;
  }

  .home-content {
    width: 74%;
    padding-right: 44px;
    padding-left: 54px;
  }

  .home-content h1 {
    font-size: clamp(4rem, 9vw, 6.8rem);
  }

  .about-intro-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
    gap: 48px;
  }

  .project-card {
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  }

  .directory-link {
    grid-template-columns: minmax(140px, 0.75fr) minmax(190px, 1.2fr) 34px;
  }

  .directory-domain {
    display: none;
  }
}

@media (max-width: 790px) {
  :root {
    --sidebar-width: 94px;
  }

  .sidebar {
    align-items: center;
    padding: 26px 9px 22px;
    overflow-y: auto;
  }

  .sidebar-identity {
    margin-bottom: 34px;
  }

  .profile-frame {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    box-shadow:
      0 0 0 4px rgba(255, 255, 255, 0.9),
      0 8px 22px rgba(24, 49, 39, 0.1);
  }

  .identity-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .sidebar-nav {
    width: 100%;
    align-items: stretch;
    gap: 3px;
  }

  .nav-link {
    width: 100%;
    min-height: 42px;
    justify-content: center;
    font-size: 0.6875rem;
    text-align: center;
  }

  .nav-link::before {
    left: -9px;
  }

  .sidebar-footer {
    font-size: 0.54rem;
    text-align: center;
  }

  .home-photo img {
    object-position: 67% center;
  }

  .home-scrim {
    background: linear-gradient(90deg, rgba(252, 252, 249, 0.96) 0%, rgba(252, 252, 249, 0.87) 58%, rgba(34, 51, 43, 0.18) 100%);
  }

  .home-content {
    width: 100%;
    padding: 54px clamp(22px, 7vw, 46px);
  }

  .home-content h1 {
    font-size: clamp(3.5rem, 14vw, 6rem);
  }

  .about-shell {
    min-height: auto;
    padding: 64px clamp(26px, 7vw, 52px) 80px;
  }

  .about-intro-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    margin-bottom: 42px;
  }

  .capability-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .capability-grid {
    border-top-width: 2px;
  }

  .capability-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px 16px;
    padding: 26px 0;
  }

  .capability-card > span {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .capability-card h3,
  .capability-card p {
    grid-column: 2;
  }

  .capability-card h3 {
    margin-top: 3px;
  }

  .work-shell,
  .links-shell {
    padding-right: clamp(24px, 6vw, 48px);
    padding-left: clamp(24px, 6vw, 48px);
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-visual {
    min-height: 225px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .agent-logo-frame {
    width: min(42%, 150px);
  }

  .bridge-logo {
    width: min(72%, 330px);
  }

  .brand-visual img {
    max-height: 260px;
  }

  .directory-link {
    grid-template-columns: 1fr auto;
    gap: 7px 18px;
    padding: 22px 24px;
  }

  .directory-name,
  .directory-description {
    grid-column: 1;
  }

  .directory-arrow {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .contact-content {
    padding-right: clamp(26px, 7vw, 54px);
    padding-left: clamp(26px, 7vw, 54px);
  }

  .resume-shell {
    padding-right: clamp(24px, 6vw, 48px);
    padding-left: clamp(24px, 6vw, 48px);
  }

  .resume-download-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .resume-download-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  :root {
    --sidebar-width: 86px;
  }

  .sidebar {
    padding-right: 7px;
    padding-left: 7px;
  }

  .profile-frame {
    width: 50px;
    height: 50px;
  }

  .nav-link {
    min-height: 40px;
    font-size: 0.6875rem;
  }

  .home-photo img {
    object-position: 70% center;
  }

  .home-scrim {
    background: linear-gradient(90deg, rgba(252, 252, 249, 0.95) 0%, rgba(252, 252, 249, 0.84) 68%, rgba(34, 51, 43, 0.2) 100%);
  }

  .home-content {
    padding: 44px 16px;
  }

  .home-content h1 {
    font-size: clamp(2.2rem, 10.5vw, 3.2rem);
    line-height: 0.88;
  }

  .home-role {
    font-size: 1.3rem;
  }

  .home-summary {
    font-size: 0.86rem;
  }

  .home-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: fit-content;
    max-width: 100%;
  }

  .page-title {
    font-size: 3.4rem;
  }

  .about-shell {
    padding: 40px 18px 64px;
  }

  .about-lead {
    font-size: 1.05rem;
  }

  .capability-card {
    padding: 24px 0;
  }

  .about-actions {
    flex-direction: column;
  }

  .work-shell,
  .links-shell {
    padding: 58px 18px 74px;
  }

  .project-copy {
    padding: 28px 22px;
  }

  .project-visual {
    min-height: 190px;
  }

  .peltify-visual {
    padding: 28px 22px;
  }

  .peltify-name {
    font-size: clamp(1.75rem, 10vw, 2.4rem);
  }

  .metric-visual strong {
    font-size: 3.7rem;
  }

  .directory-link {
    padding: 20px 18px;
  }

  .contact-content {
    padding: 54px 20px;
  }

  .contact-content h1 {
    font-size: clamp(3.4rem, 16vw, 5rem);
  }

  .contact-email {
    font-size: 1rem;
  }

  .resume-shell {
    padding: 58px 18px 74px;
  }

  .resume-header {
    margin-bottom: 20px;
  }

  .resume-download-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .resume-download-panel {
    padding: 16px;
  }

  .resume-frame {
    height: 72vh;
    min-height: 620px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .motion-ready .reveal,
  .motion-ready .photo-settle {
    opacity: 1;
    transform: none;
  }

}

/* Single-page scroll experience */
html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  overscroll-behavior: none;
}

.site-scroll {
  width: calc(100% - var(--sidebar-width));
  height: 100vh;
  height: 100svh;
  margin-left: var(--sidebar-width);
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-color: rgba(40, 72, 58, 0.48) rgba(242, 238, 230, 0.72);
  scrollbar-width: thin;
}

.site-scroll::-webkit-scrollbar {
  width: 10px;
}

.site-scroll::-webkit-scrollbar-track {
  background: rgba(242, 238, 230, 0.72);
}

.site-scroll::-webkit-scrollbar-thumb {
  border: 2px solid rgba(242, 238, 230, 0.72);
  border-radius: 999px;
  background: rgba(40, 72, 58, 0.5);
}

.site-section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  isolation: isolate;
}

.site-section:target {
  scroll-margin-top: 0;
}

.section-home {
  background: #d9e1e3;
}

.sidebar-identity {
  scroll-behavior: smooth;
}

.identity-copy small {
  max-width: 206px;
  font-size: 0.61rem;
  line-height: 1.45;
}

.home-scroll-cue {
  position: absolute;
  right: clamp(28px, 4vw, 58px);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(21, 25, 23, 0.72);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-scroll-cue span:last-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(40, 72, 58, 0.3);
  border-radius: 50%;
  font-size: 1rem;
  transition: transform 0.22s ease, background-color 0.22s ease;
}

.home-scroll-cue:hover span:last-child {
  background: rgba(255, 255, 255, 0.68);
  transform: translateY(3px);
}

/* Shared accordion behavior */
.accordion-trigger {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.48s var(--ease),
    opacity 0.32s ease;
}

.accordion-panel-inner {
  min-height: 0;
  overflow: hidden;
}

.accordion-item.is-open > .accordion-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.accordion-icon {
  position: relative;
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(40, 72, 58, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.accordion-icon::before,
.accordion-icon::after {
  position: absolute;
  width: 11px;
  height: 1.5px;
  border-radius: 99px;
  background: var(--forest);
  content: "";
  transition: transform 0.32s var(--ease);
}

.accordion-icon::after {
  transform: rotate(90deg);
}

[aria-expanded="true"] .accordion-icon::after,
.is-open > .capability-summary .accordion-icon::after {
  transform: rotate(0deg);
}

/* Expandable technical range */
.capability-card {
  display: block;
  min-height: 0;
  padding: 0;
}

.capability-summary {
  display: grid;
  width: 100%;
  grid-template-columns: 52px minmax(185px, 0.36fr) minmax(0, 1fr) 34px;
  align-items: start;
  gap: clamp(18px, 3vw, 34px);
  padding: 28px 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.capability-summary:hover .capability-title strong,
.capability-summary[aria-expanded="true"] .capability-title strong {
  color: var(--forest);
}

.capability-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(40, 72, 58, 0.38);
  border-radius: 50%;
  color: #49665a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.capability-title {
  display: grid;
  gap: 7px;
  padding-top: 2px;
}

.capability-title strong {
  font-size: clamp(1.2rem, 2vw, 1.58rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  transition: color 0.22s ease;
}

.capability-title small {
  color: #718078;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.capability-teaser {
  max-width: 820px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.75;
}

.capability-summary > .accordion-icon {
  margin-top: 2px;
}

.capability-card .accordion-panel-inner {
  padding: 0 2px;
  transition: padding 0.48s var(--ease);
}

.capability-card.is-open .accordion-panel-inner {
  padding: 0 2px 34px 104px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(30px, 5vw, 70px);
}

.detail-grid > div {
  padding-top: 24px;
  border-top: 1px solid rgba(40, 72, 58, 0.16);
}

.detail-grid h3 {
  margin: 0 0 12px;
  color: var(--forest-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-grid p,
.detail-grid li {
  color: #4c5851;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.75;
}

.detail-grid p:last-child {
  margin-bottom: 0;
}

.detail-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

/* Expandable project cards */
.project-card {
  display: block;
  min-height: 0;
}

.project-card-main {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  outline-offset: -5px;
}

.project-card-main:hover .project-expand-cue,
.project-card-main[aria-expanded="true"] .project-expand-cue {
  color: var(--forest-dark);
}

.project-card-main:hover .project-expand-cue > .accordion-icon {
  background: rgba(221, 230, 228, 0.72);
}

.project-copy > p:not(.project-index) {
  margin-bottom: 20px;
}

.project-meta-line + h2 {
  margin-top: 0;
}

.project-expand-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: #536159;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.22s ease;
}

.project-expand-cue > .accordion-icon {
  width: 27px;
  height: 27px;
}

.project-detail-panel {
  border-top: 1px solid transparent;
  background: rgba(255, 255, 255, 0.52);
  transition:
    grid-template-rows 0.54s var(--ease),
    opacity 0.34s ease,
    border-color 0.34s ease;
}

.project-card.is-open > .project-detail-panel {
  border-top-color: var(--line);
}

.project-detail {
  padding: 0 clamp(28px, 5vw, 58px);
  transition: padding 0.54s var(--ease);
}

.project-card.is-open .project-detail {
  padding-top: clamp(34px, 5vw, 56px);
  padding-bottom: clamp(38px, 5vw, 60px);
}

.project-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 38px clamp(34px, 6vw, 78px);
}

.project-detail-grid > div {
  padding-top: 22px;
  border-top: 1px solid rgba(40, 72, 58, 0.17);
}

.detail-label {
  margin-bottom: 10px;
  color: var(--forest);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-detail h3 {
  margin: 0 0 16px;
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.project-detail p:not(.detail-label),
.project-detail li {
  color: #46524b;
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.75;
}

.project-detail p:last-child {
  margin-bottom: 0;
}

.project-detail ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 19px;
}

.project-evidence {
  max-width: 760px;
  margin: 48px auto 0;
}

.project-image-button {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(40, 72, 58, 0.2);
  border-radius: 16px;
  background: #f8f8f6;
  box-shadow: 0 18px 45px rgba(24, 49, 39, 0.1);
  color: inherit;
  cursor: zoom-in;
  font: inherit;
  text-align: left;
}

.project-image-button img {
  width: 100%;
  aspect-ratio: 1.5;
  object-fit: cover;
  transition: transform 0.42s var(--ease);
}

.project-image-button:hover img {
  transform: scale(1.012);
}

.project-image-button > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 17px;
  border-top: 1px solid var(--line);
  color: var(--forest-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.project-evidence figcaption {
  margin-top: 12px;
  color: #68736d;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}

/* Full-size image viewer */
.image-lightbox {
  width: min(94vw, 1440px);
  max-width: none;
  max-height: 94vh;
  margin: auto;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.image-lightbox::backdrop {
  background: rgba(4, 7, 6, 0.88);
  backdrop-filter: blur(7px);
}

.lightbox-frame {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.lightbox-frame img {
  max-width: 100%;
  max-height: calc(94vh - 56px);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.lightbox-frame p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 2;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: rgba(10, 13, 12, 0.68);
  color: #fff;
  cursor: pointer;
  font: 400 2rem/1 Arial, sans-serif;
  transition: background-color 0.22s ease, transform 0.22s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: rotate(4deg);
}

/* Link-directory brand icons */
.directory-link {
  grid-template-columns: 54px minmax(150px, 0.72fr) minmax(220px, 1.2fr) minmax(140px, 0.7fr) 34px;
}

.directory-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
}

.directory-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.directory-icon-linkedin {
  background: #0a66c2;
  color: #fff;
}

.directory-icon-github {
  background: #181918;
  color: #fff;
}

.directory-icon-image {
  border-radius: 50%;
  background: #191a19;
}

.directory-icon-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.directory-icon-peltify {
  background: #5b1a86;
}

.directory-icon-peltify img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.directory-icon-bandcamp {
  background: #1da0c3;
  color: #fff;
}

.directory-icon-bandcamp svg {
  width: 25px;
  height: 18px;
}

/* Two contact addresses */
.contact-email-list {
  width: min(100%, 790px);
  margin-bottom: 34px;
  border-top: 1px solid rgba(40, 72, 58, 0.28);
}

.contact-email {
  display: grid;
  width: 100%;
  gap: 4px;
  margin: 0;
  padding: 16px 0 18px;
  border-top: 0;
  border-bottom: 1px solid rgba(40, 72, 58, 0.28);
  letter-spacing: normal;
}

.contact-email span {
  color: #586960;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-email strong {
  color: var(--forest-dark);
  font-size: clamp(1.15rem, 2.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  .capability-summary {
    grid-template-columns: 48px minmax(160px, 0.38fr) minmax(0, 1fr) 32px;
  }

  .project-card-main {
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  }

  .directory-link {
    grid-template-columns: 52px minmax(130px, 0.7fr) minmax(190px, 1.2fr) 34px;
  }

  .directory-domain {
    display: none;
  }
}

@media (max-width: 790px) {
  .site-scroll {
    width: calc(100% - var(--sidebar-width));
  }

  .home-scroll-cue {
    right: 22px;
    bottom: 18px;
  }

  .capability-summary {
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    gap: 10px 16px;
    padding: 26px 0;
  }

  .capability-number {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .capability-title,
  .capability-teaser {
    grid-column: 2;
  }

  .capability-summary > .accordion-icon {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .capability-card.is-open .accordion-panel-inner {
    padding: 0 0 30px 54px;
  }

  .detail-grid,
  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .project-card-main {
    grid-template-columns: 1fr;
  }

  .project-card-main .project-visual {
    min-height: 225px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-evidence {
    margin-top: 36px;
  }

  .directory-link {
    grid-template-columns: 46px 1fr auto;
    gap: 7px 16px;
  }

  .directory-icon {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .directory-name,
  .directory-description {
    grid-column: 2;
  }

  .directory-arrow {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}

@media (max-width: 480px) {
  .home-scroll-cue span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .capability-summary {
    grid-template-columns: 34px minmax(0, 1fr) 28px;
    gap: 9px 12px;
  }

  .capability-title small {
    display: none;
  }

  .capability-teaser {
    font-size: 0.77rem;
    line-height: 1.65;
  }

  .capability-card.is-open .accordion-panel-inner {
    padding-left: 46px;
  }

  .project-copy {
    padding: 28px 22px;
  }

  .project-detail {
    padding-right: 22px;
    padding-left: 22px;
  }

  .project-detail-grid {
    gap: 28px;
  }

  .directory-link {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 19px 16px;
  }

  .directory-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .directory-icon-image {
    border-radius: 50%;
  }

  .directory-icon svg {
    width: 20px;
    height: 20px;
  }

  .directory-description {
    font-size: 0.69rem;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
  }
}

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

  .accordion-panel,
  .accordion-panel-inner,
  .project-detail,
  .accordion-icon::before,
  .accordion-icon::after {
    transition: none;
  }
}

/* ---------------------------------------------------------------------------
   2026-09-18 polish pass: forward status line, solid primary action, focus and
   selection states, and a resume section that matches the rest of the site.
   --------------------------------------------------------------------------- */
::selection { background: rgba(40, 72, 58, 0.18); color: var(--ink); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, .home-role, .about-lead { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 6px; }

.button { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset; }
.button-primary { border-color: var(--forest-dark); background: var(--forest-dark); color: #f6f3ec; box-shadow: 0 10px 24px -12px rgba(24, 49, 39, 0.7); }
.button-primary:hover { border-color: var(--forest); background: var(--forest); color: #fff; box-shadow: 0 14px 28px -12px rgba(24, 49, 39, 0.75); }
.button-primary .button-mark { color: inherit; }

.profile-frame { transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out); }
.sidebar-identity:hover .profile-frame { transform: scale(1.03); }

.page-resume { background: radial-gradient(circle at 85% 10%, var(--blue-mist), transparent 32rem), linear-gradient(180deg, var(--cream) 0%, #ece6db 100%); }
.resume-document-label { color: var(--forest); font-family: var(--font); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.16em; }
.resume-header h1 { color: var(--ink); font-family: var(--font); font-weight: 800; letter-spacing: -0.055em; }
.resume-document { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(24, 49, 39, 0.35), 0 2px 6px rgba(24, 49, 39, 0.06); }
.resume-frame-fallback { border-top: 1px solid var(--line); background: #faf8f3; color: var(--muted); font-family: var(--font); }
.resume-frame-fallback a { color: var(--forest); }
.resume-download-panel { border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.72); box-shadow: 0 16px 40px -28px rgba(24, 49, 39, 0.4); font-family: var(--font); }
.resume-file-copy strong { font-family: var(--font); font-size: 0.9rem; font-weight: 800; color: var(--ink); }
.resume-file-copy span { color: var(--muted); font-size: 0.76rem; font-weight: 600; }
.resume-download-classic { border: 1px solid var(--forest-dark); border-radius: 999px; background: var(--forest-dark); color: #f6f3ec; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.02em; text-transform: none; transition: background-color 0.28s var(--ease), transform 0.28s var(--ease); }
.resume-download-classic:hover { background: var(--forest); transform: translateY(-1px); }
.resume-download-classic:active { border-style: solid; transform: translateY(0); }
.resume-open-link, .resume-open-link:visited { color: var(--forest-dark); font-family: var(--font); font-size: 0.82rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }


/* Selected work: open editorial rows instead of boxed cards. */
.project-list { gap: 0; border-bottom: 1px solid var(--line); }
.project-card,
.project-card-featured,
.project-card-agent, .project-card-permit, .project-card-bridge,
.project-card-brand, .project-card-peltify, .project-card-closed {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.project-card:hover { box-shadow: none; }
.project-card-main { grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); padding: 38px 0; cursor: pointer; }
.project-card-main .project-visual,
.project-visual { min-height: 0; aspect-ratio: 1; align-self: start; border: 1px solid var(--line); border-radius: 18px; }
.project-copy { padding: 0; justify-content: flex-start; }
.project-copy h2 { margin-bottom: 10px; transition: color 0.22s ease; }
.project-card-main:hover h2 { color: var(--forest); }
.project-copy > p:not(.project-index) { font-size: 1rem; font-weight: 600; color: #3a443e; margin-bottom: 16px; }
.visual-stat { transform: scale(0.82); transform-origin: bottom right; right: 10px; bottom: 10px; }
.project-detail-panel { background: transparent; }
.project-detail { padding-left: 0; padding-right: 0; }
@media (max-width: 1080px) { .project-card-main { grid-template-columns: 200px minmax(0, 1fr); } }
@media (max-width: 790px) {
  .project-card-main { grid-template-columns: 1fr; gap: 22px; padding: 30px 0; }
  .project-card-main .project-visual { aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line); }
}

/* Peltify thumbnail: the app icon, centred, on a soft violet field. */
.peltify-visual {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(147, 51, 234, 0.22), transparent 60%),
    linear-gradient(145deg, #f6f1fb, #ece4f5);
}
.peltify-visual .peltify-icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 22px 40px -14px rgba(106, 27, 154, 0.55); }

/* Lightbox: fade and settle in, fade out on close (see script.js). */
.image-lightbox[open] { animation: lightbox-in 0.42s var(--ease-out) both; }
.image-lightbox[open]::backdrop { animation: backdrop-in 0.42s ease both; }
.image-lightbox.is-closing { animation: lightbox-out 0.24s var(--ease-in) both; }
.image-lightbox.is-closing::backdrop { animation: backdrop-in 0.24s ease reverse both; }
@keyframes lightbox-in { from { opacity: 0; transform: translateY(14px) scale(0.965); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes lightbox-out { to { opacity: 0; transform: scale(0.98); filter: blur(4px); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

/* Opening a project: detail blocks fade up one after another. */
.project-card.is-open .project-detail-grid > * { animation: detail-in 0.55s var(--ease-out) both; }
.project-card.is-open .project-detail-grid > :nth-child(2) { animation-delay: 0.07s; }
.project-card.is-open .project-detail-grid > :nth-child(3) { animation-delay: 0.14s; }
.project-card.is-open .project-detail-grid > :nth-child(n+4) { animation-delay: 0.21s; }
@keyframes detail-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .image-lightbox[open], .image-lightbox[open]::backdrop, .image-lightbox.is-closing,
  .project-card.is-open .project-detail-grid > * { animation: none; }
}
