:root {
  --font-sans: 'Manrope', 'Noto Sans SC', sans-serif;
  --font-mono: 'DM Mono', monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 16px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-2xl: 40px;
  --text-3xl: 60px;
  --text-display: 84px;

  --leading-tight: 1.08;
  --leading-title: 1.15;
  --leading-body: 1.55;
  --leading-copy: 1.55;

  --content-max: 1320px;
  --page-gutter: clamp(20px, 4vw, 64px);
  --section-space: clamp(72px, 8vw, 96px);
  --content-gap: var(--space-6);

  --radius-control: 8px;
  --radius-panel: 12px;
  --radius-card: 20px;
  --radius-media: 20px;
  --radius-pill: 999px;

  --motion-fast: 110ms;
  --motion-base: 170ms;
  --motion-slow: 220ms;
  --motion-enter: 320ms;
  --hover-lift: -3px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.2, .9, .25, 1.15);
}

body { font-family: var(--font-sans); font-size: var(--text-base); line-height: var(--leading-body); }
.app-shell { position: relative; isolation: isolate; }
.app-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .2;
  background-image:
    linear-gradient(rgba(184,255,27,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,255,27,.055) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  animation: portfolio-grid-drift 28s linear infinite;
}
@keyframes portfolio-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 84px 84px, 84px 84px; }
}
.hero.section-band::after {
  content: '';
  position: absolute;
  inset: -30% -15%;
  pointer-events: none;
  opacity: .16;
  background: linear-gradient(112deg, transparent 38%, rgba(184,255,27,.18) 48%, transparent 58%);
  transform: translateX(-35%);
  animation: portfolio-light-sweep 18s ease-in-out infinite;
}
@keyframes portfolio-light-sweep {
  0%, 100% { transform: translateX(-35%); }
  50% { transform: translateX(35%); }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell::before, .hero.section-band::after { animation: none; }
}
.section-band { padding-top: var(--space-9); padding-bottom: var(--space-9); }
.section-number, .eyebrow, .contact-kicker, .project-no, .skill-card .index { font-size: var(--text-xs); }
.section-heading { gap: var(--space-5); margin-bottom: var(--space-7); }
.section-heading p { margin-top: var(--space-3); font-size: var(--text-sm); }
.section-title-input { font-size: clamp(44px, 5.45vw, var(--text-display)); line-height: 1.08; }

.primary-action, .secondary-action, .add-text-button, .rail-clear, .toolbar-button {
  border-radius: var(--radius-pill);
  transition: color var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), transform var(--motion-base) var(--ease-spring), box-shadow var(--motion-base) var(--ease-out);
}
.tag-chip, .availability-card, .contact-tag { border-radius: var(--radius-panel); }
.experience-card, .project-card, .skill-card, .qr-shell { border-radius: var(--radius-card); }
.experience-card, .project-card, .skill-card, .showcase-item {
  transition: color var(--motion-fast) var(--ease-out), background-color var(--motion-base) var(--ease-out), border-color var(--motion-base) var(--ease-out), transform var(--motion-base) var(--ease-spring), box-shadow var(--motion-base) var(--ease-out);
}
input, textarea { transition: color var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out); }

/* Content-led project rhythm: banner, split editorial, immersive full image. */
.project-section { min-height: 0; }
.project-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: none;
  gap: var(--space-6);
}
.project-card {
  grid-column: 1 !important;
  grid-row: auto !important;
  width: 100%;
  min-height: 0;
  border-radius: var(--radius-card);
  background: #111b20;
  isolation: isolate;
}
.project-card .project-media { border: 0; }
.project-card .project-meta { z-index: 3; }
.project-card .project-name { font-size: clamp(24px, 3vw, var(--text-2xl)); line-height: 1.15; }
.project-card .project-description { font-size: var(--text-sm); line-height: 1.75; }
.project-card .project-result strong { font-size: var(--text-lg); }

.project-card.layout-banner {
  position: relative;
  display: block;
  min-height: clamp(400px, 52vw, 620px);
}
.project-card.layout-banner .project-media { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-card.layout-banner .project-meta {
  position: absolute;
  inset: auto 0 0;
  padding: 140px var(--space-7) var(--space-7);
  background: linear-gradient(transparent, rgba(4, 9, 11, .95) 72%);
}
.project-card.layout-banner .project-description { width: min(680px, 80%); height: 48px; }

.project-card.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  min-height: 500px;
  overflow: hidden;
}
.project-card.layout-split .project-media { min-height: 500px; height: 100%; }
.project-card.layout-split .project-meta {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-7);
  background: #111b20;
}
.project-card.layout-split .project-name { margin: var(--space-6) 0 var(--space-3); }
.project-card.layout-split .project-description { height: 110px; }
.project-card.layout-split .project-result { display: flex; margin-top: var(--space-5); }

.project-card.layout-full {
  position: relative;
  display: block;
  min-height: min(78vh, 760px);
}
.project-card.layout-full .project-media { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-card.layout-full .project-meta {
  position: absolute;
  inset: auto 0 0;
  padding: 180px var(--space-7) var(--space-7);
  background: linear-gradient(transparent, rgba(4, 9, 11, .96) 78%);
}
.project-card.layout-full .project-name { font-size: clamp(32px, 4vw, 56px); }
.project-card.layout-full .project-description { width: min(760px, 78%); height: 50px; }
.project-card.layout-full .project-result { display: flex; width: min(760px, 78%); }

.project-card:hover { transform: translateY(-2px); box-shadow: 0 18px 46px rgba(0,0,0,.28); }
.project-media img { transition: transform var(--motion-slow) var(--ease-out), filter var(--motion-slow) var(--ease-out); }
.project-card:hover .project-media img { transform: scale(1.008); }

.project-media-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #0d171b;
  color: #dce5e0;
}
.layout-split .project-media-open { position: relative; min-height: 100%; }
.project-media-open img { width: 100%; height: 100%; object-fit: cover; }
.project-media-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.video-fallback { display: grid; place-items: center; width: 100%; height: 100%; color: #7f8d88; font: 500 var(--text-sm) 'DM Mono'; }
.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  background: rgba(4,9,11,.72);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  transition: transform var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out);
}
.play-mark::after { content: ''; position: absolute; left: 22px; top: 17px; border-left: 15px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.video-cover:hover .play-mark { background: var(--accent); transform: translate(-50%, -50%) scale(1.04); }
.video-cover:hover .play-mark::after { border-left-color: #081012; }

.project-detail-toggle {
  width: max-content;
  min-height: 36px;
  margin-top: var(--space-3);
  padding: 0 var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-pill);
  background: rgba(7,13,15,.42);
  color: #dce5e0;
  font-size: var(--text-xs);
}
.project-detail-toggle i { font-style: normal; font-size: var(--text-base); line-height: 1; }
.project-detail-toggle:hover { border-color: var(--accent); color: var(--accent); }
.project-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height var(--motion-base) var(--ease-out), opacity var(--motion-fast) var(--ease-out), transform var(--motion-base) var(--ease-out);
}
.project-card.details-open .project-details { max-height: 240px; opacity: 1; transform: translateY(0); }
.project-card.details-open .project-detail-toggle { border-color: var(--accent); color: var(--accent); }
.project-details .project-description { margin-top: var(--space-3); }
.skill-card:hover, .skill-card:focus-within { transform: translateY(-2px); }
.showcase-item:hover, .showcase-item:focus-within { transform: translateY(-6px) scale(1.06) rotate(0deg); }

#media-viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: var(--space-6);
  border: 0;
  background: rgba(2,5,7,.97);
  overflow: hidden;
}
#media-viewer[open] { display: grid; place-items: center; }
#media-viewer::backdrop { background: rgba(0,0,0,.92); backdrop-filter: blur(8px); }
#media-viewer img, #media-viewer video { max-width: calc(100vw - 64px); max-height: calc(100dvh - 64px); width: auto; height: auto; object-fit: contain; }
.media-viewer-close {
  position: fixed;
  z-index: 3;
  top: var(--space-5);
  right: var(--space-5);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: rgba(8,14,16,.82);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  transition: background-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out), transform var(--motion-fast) var(--ease-out);
}
.media-viewer-close:hover { background: #fff; color: #071117; transform: scale(1.03); }

@media (max-width: 800px) {
  :root {
    --space-7: 32px;
    --space-8: 48px;
    --space-9: 72px;
    --text-display: 60px;
  }
  .project-list { gap: var(--space-5); }
  .project-card.layout-banner { min-height: 460px; }
  .project-card.layout-split { display: block; min-height: 0; }
  .project-card.layout-split .project-media { min-height: 320px; height: 52vw; }
  .project-card.layout-split .project-media-open { min-height: 320px; }
  .project-card.layout-split .project-meta { min-height: 280px; padding: var(--space-6); }
  .project-card.layout-full { min-height: 620px; }
  .project-card.layout-banner .project-meta, .project-card.layout-full .project-meta { padding: 120px var(--space-6) var(--space-6); }
  .project-card.layout-banner .project-description, .project-card.layout-full .project-description,
  .project-card.layout-full .project-result { width: 100%; }
}

@media (max-width: 700px) {
  :root {
    --text-base: 14px;
    --text-lg: 18px;
    --text-xl: 24px;
    --text-2xl: 32px;
    --radius-card: 16px;
  }
  .section-band { padding-top: var(--space-8); padding-bottom: var(--space-8); }
  .project-card.layout-banner { min-height: 400px; }
  .project-card.layout-full { min-height: 540px; }
  .project-card .project-name, .project-card.layout-full .project-name { font-size: var(--text-xl); }
  #media-viewer { padding: var(--space-4); }
  #media-viewer img, #media-viewer video { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); }
  .media-viewer-close { top: var(--space-4); right: var(--space-4); width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Final reference alignment. */
@media (min-width: 701px) {
  .hero-grid { align-items: start; }
  .hero-visual { padding-top: 36px; }
  .availability-card {
    top: auto;
    right: calc((100% - min(28vw, 400px)) / 2);
    bottom: calc(600px - 36px - min(28vw, 400px));
    width: 190px;
    min-height: 68px;
    padding: var(--space-3) var(--space-5);
    display: grid;
    align-content: center;
    gap: var(--space-1);
  }
  .availability-card .availability-note {
    height: 20px;
    min-width: 0;
    overflow: hidden;
    color: #bac6c0;
    font-size: 11px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ghost-word {
    z-index: 1;
    left: auto;
    right: calc((100% - min(28vw, 400px)) / 2);
    bottom: -38px;
    width: max-content;
    max-width: none;
    font-size: clamp(100px, 12vw, 170px);
    letter-spacing: 0;
    white-space: nowrap;
    text-align: right;
    transform: scaleX(.88);
    transform-origin: right center;
  }
}

/* Showcase posters fill their frames consistently on every viewport. */
.showcase-rail .showcase-tile,
.showcase-rail .showcase-item .showcase-tile {
  overflow: hidden;
  background: #0b1114;
}
.showcase-rail .showcase-tile > img,
.showcase-rail .showcase-item .showcase-tile > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 700px) {
  .showcase-rail .showcase-tile > img {
    object-fit: cover;
    object-position: center;
  }
}

.tag-chip:nth-child(4n + 1) { background: #b8ff1b !important; }
.tag-chip:nth-child(4n + 2) { background: #9ee51b !important; }
.tag-chip:nth-child(4n + 3) { background: #cdfb5c !important; }
.tag-chip:nth-child(4n) { background: #88cf24 !important; }

.section-band > .section-number,
.section-band > .section-heading {
  width: min(100%, 1320px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}
.section-heading > div, .section-title-label, .section-title-input { margin-left: 0; padding-left: 0; }

.showcase-item:nth-child(1) { transform: translateY(38px) rotate(-6deg); }
.showcase-item:nth-child(2) { transform: translateY(21px) rotate(-4deg); }
.showcase-item:nth-child(3) { transform: translateY(8px) rotate(-2deg); }
.showcase-item:nth-child(4) { transform: translateY(0) rotate(-.5deg); }
.showcase-item:nth-child(5) { transform: translateY(0) rotate(.5deg); }
.showcase-item:nth-child(6) { transform: translateY(8px) rotate(2deg); }
.showcase-item:nth-child(7) { transform: translateY(21px) rotate(4deg); }
.showcase-item:nth-child(8) { transform: translateY(38px) rotate(6deg); }
.showcase-item:hover, .showcase-item:focus-within { transform: translateY(-5px) scale(1.055) rotate(0deg); }

.experience-card .index {
  width: 54px;
  height: 54px;
  border-width: 8px;
  font-size: 18px;
  color: #071117;
  box-shadow: 0 0 0 2px var(--accent);
}

.section-number { position: relative; top: 10px; }
.experience-card {
  min-height: 0;
  align-self: center;
}
.experience-card > div { min-width: 0; }
.experience-role {
  color: var(--accent) !important;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}
.experience-summary {
  height: auto;
  min-height: 48px;
  overflow: hidden;
}
.contact-copy-input { position: relative; top: -20px; }
.project-media.is-empty { cursor: pointer; }
.project-media.is-empty:hover,
.project-media.is-dragging {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: linear-gradient(145deg, rgba(96,137,56,.78), #0a1215);
}
.project-media.is-dragging .upload-project { transform: translateY(-2px) scale(1.03); }

.project-details {
  max-height: none;
  opacity: 1;
  overflow: visible;
  transform: none;
}
.project-details .project-description { margin-top: var(--space-4); }
.upload-project {
  width: auto !important;
  min-width: 96px;
  min-height: 58px;
  padding: 0 var(--space-4) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  border-radius: 22px !important;
  font-size: 14px !important;
  font-weight: 700;
}
.upload-project::after { content: ' 上传图片'; }

.skill-card { min-height: 410px; padding: 30px 28px; }
.skill-card input { margin-top: 48px; font-size: clamp(24px, 2.35vw, 34px); line-height: 1.2; }
.skill-card textarea { height: 118px; margin-top: 22px; font-size: clamp(13px, 1.2vw, 17px); line-height: 1.75; }
.skill-card::after {
  content: '◒';
  right: var(--space-4);
  bottom: var(--space-2);
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  font-size: 72px;
  line-height: 1;
}
.skill-card:nth-child(even)::after { content: '✦'; font-size: 72px; }

.contact-tags {
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-self: start;
}
.contact-section > .section-number,
.contact-section > .contact-kicker,
.contact-section > .field-label,
.contact-section > .contact-tags,
.contact-section > .contact-layout {
  width: min(100%, 1320px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0;
  padding-right: 0;
}
.contact-tags { justify-content: start; }
.contact-details span {
  color: var(--accent);
  font: 600 25px/1.2 'Manrope', 'Noto Sans SC', sans-serif;
  letter-spacing: 0;
}
.contact-details input { font-size: 25px; line-height: 1.2; }
.contact-thanks {
  position: absolute;
  z-index: 0;
  right: var(--portfolio-right-offset, var(--page-gutter));
  bottom: var(--thanks-bottom-offset, var(--space-5));
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.1);
  width: max-content;
  max-width: none;
  font: 700 clamp(100px, 12vw, 170px)/.8 var(--font-sans);
  letter-spacing: 0;
  white-space: nowrap;
  text-align: right;
  transform: translateY(-120px) scaleX(.88);
  transform-origin: right center;
  pointer-events: none;
}
@media (max-width: 700px) {
  .contact-thanks { position: relative; top: auto !important; right: auto; margin: 24px 0 0 auto; display: block; }
}
.contact-section > :not(.contact-thanks):not(.contact-layout) { position: relative; z-index: 1; }
.contact-details { position: relative; z-index: 1; }
.qr-shell { z-index: 2; }

@media (min-width: 1051px) {
  .qr-shell { top: 167px; }
}
.qr-shell {
  aspect-ratio: .86;
  padding: var(--space-5);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  overflow: hidden;
}
.qr-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255,255,255,.04);
}
.qr-shell .qr-media img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  background: #fff;
}
.qr-caption { color: #aeb8b4; font-size: var(--text-sm); text-align: center; }

/* Final cross-section alignment notes. */
.contact-details { border-top: 0; }

@media (min-width: 1051px) {
  .qr-shell { top: 131px; }
}

@media (min-width: 701px) {
  .hero-grid { transform: translateY(40px); }
  .ghost-word {
    bottom: 136px;
    transform: scaleX(.88);
  }
}

@media (max-width: 700px) {
  .hero-visual { padding-top: 0; }
  .showcase-item:nth-child(n) { transform: none; }
  .skill-card { min-height: 320px; padding: 20px 16px; }
  .skill-card input { margin-top: 40px; font-size: 19px; }
  .skill-card textarea { height: 105px; margin-top: 14px; font-size: 11px; }
  .contact-details span, .contact-details input { font-size: 16px; }
}

/* Unified visual system: type, rhythm, alignment, radii and motion. */
.section-band {
  padding: var(--section-space) var(--page-gutter);
}

.hero-grid,
.section-band > .section-number,
.section-band > .section-heading,
.section-band > .experience-list,
.section-band > .experience-controls,
.section-band > .project-list,
.section-band > .skill-grid,
.section-band > .skill-actions,
.section-band > .showcase-rail,
.contact-section > .contact-kicker,
.contact-section > .field-label,
.contact-section > .contact-tags,
.contact-section > .contact-tag-add,
.contact-section > .contact-layout {
  width: min(100%, var(--content-max));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1051px) {
  .contact-section > .contact-tags {
    width: min(720px, calc(100% - 350px)) !important;
    max-width: 720px;
    margin-left: max(0px, calc((100% - var(--content-max)) / 2)) !important;
    margin-right: auto !important;
  }
}

.section-number,
.eyebrow,
.contact-kicker,
.field-label,
.project-no,
.skill-card .index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-title);
  letter-spacing: .08em;
}

.section-title-input,
.contact-title-input {
  font-family: var(--font-sans);
  font-size: clamp(var(--text-2xl), 5.45vw, var(--text-display));
  line-height: var(--leading-tight);
  letter-spacing: 0;
}

.section-heading {
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}
.section-heading p,
.project-description,
.experience-summary,
.skill-card textarea,
.contact-copy-input {
  line-height: var(--leading-copy);
}

.hero-actions,
.experience-controls,
.skill-actions { gap: var(--space-3); }
.tag-editor,
.contact-tags { gap: var(--space-3); }
.project-list { gap: var(--content-gap); }
.skill-grid { gap: var(--space-4); }

.tag-chip,
.availability-card,
.contact-tag { border-radius: var(--radius-panel); }
.experience-card,
.project-card,
.skill-card,
.qr-shell,
.showcase-tile { border-radius: var(--radius-card); }
.project-media,
.project-media-open,
.project-media-open img,
.project-media-open video { border-radius: inherit; }
.primary-action,
.secondary-action,
.add-text-button,
.rail-clear,
.quiet-button,
.upload-project,
.contact-tag-add,
.showcase-actions button { border-radius: var(--radius-pill) !important; }

button,
a,
input,
textarea,
.tag-chip,
.contact-tag,
.experience-card,
.project-card,
.skill-card,
.showcase-item,
.showcase-tile,
.project-media img,
.project-media video {
  transition-property: color, background-color, border-color, opacity, transform, box-shadow, filter;
  transition-duration: var(--motion-base);
  transition-timing-function: var(--ease-out);
}

.hero-copy > * {
  animation-duration: var(--motion-enter);
  animation-timing-function: var(--ease-out);
}

.primary-action:hover,
.secondary-action:hover,
.quiet-button:hover,
.add-text-button:hover,
.experience-card:hover,
.experience-card:focus-within,
.project-card:hover,
.skill-card:hover,
.skill-card:focus-within {
  transform: translateY(var(--hover-lift));
}
.project-card:hover .project-media img { transform: scale(1.008); }

@media (max-width: 700px) {
  :root {
    --page-gutter: 20px;
    --section-space: 64px;
    --content-gap: var(--space-5);
    --radius-panel: 10px;
    --radius-card: 16px;
    --motion-enter: 240ms;
    --hover-lift: -2px;
  }

  .section-title-input,
  .contact-title-input { font-size: var(--text-2xl); }
  .section-heading { gap: var(--space-4); margin-bottom: var(--space-6); }
  .project-list { gap: var(--space-5); }
  .skill-grid { gap: var(--space-2); }
  .skill-card::after {
    right: var(--space-2);
    bottom: var(--space-1);
    width: 64px;
    height: 64px;
    font-size: 54px;
  }
  .skill-card:nth-child(even)::after { font-size: 54px; }
  .contact-thanks { right: var(--page-gutter); bottom: var(--space-4); font-size: 76px; }
  .qr-shell { padding: var(--space-3); gap: var(--space-2); }
  .qr-caption { font-size: var(--text-xs); }
}

/* Final interaction and layout refinements. */
@media (min-width: 701px) {
  .showcase-item:has(+ .showcase-item:is(:hover, :focus-within)),
  .showcase-item:is(:hover, :focus-within) + .showcase-item {
    z-index: 5;
    transform: translateY(-3px) scale(1.06) rotate(0deg);
  }
  .showcase-item:is(:hover, :focus-within) {
    z-index: 6;
    transform: translateY(-7px) scale(1.12) rotate(0deg);
  }
}

@media (min-width: 1051px) {
  .experience-list::before { left: 50%; transform: translateX(-50%); }
  .experience-card:nth-child(odd) .index { right: -69px; left: auto; }
  .experience-card:nth-child(even) .index { left: -69px; right: auto; }
}
.experience-card .index {
  box-shadow:
    0 0 0 2px var(--accent),
    0 0 18px rgba(184,255,27,.38),
    0 0 38px rgba(184,255,27,.16);
}

@media (min-width: 801px) {
  .project-card.layout-banner { min-height: clamp(540px, 58vw, 760px); }
  .project-card.layout-banner .project-meta {
    padding: 200px var(--space-7) var(--space-5);
    background: linear-gradient(transparent, rgba(4,9,11,.97) 76%);
  }
  .project-card.layout-banner .project-name { font-size: clamp(34px, 4vw, 58px); }
  .project-card.layout-banner .project-description,
  .project-card.layout-banner .project-result { width: min(760px, 72%); }
}

/* Final contact and empty-project alignment. */
.contact-copy-input {
  top: 0;
  height: auto;
  min-height: 56px;
  margin-top: var(--space-5);
}
.qr-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  justify-self: center;
  align-self: center;
  border-radius: inherit;
}
.qr-shell {
  aspect-ratio: 1;
  padding: 0;
  display: block;
  overflow: visible;
  cursor: pointer;
}
.qr-shell .qr-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.qr-shell:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.qr-media #qr-fallback {
  padding: var(--space-4);
  color: #eef3ed;
  font-size: var(--text-sm);
  text-align: center;
}
.qr-shell > .qr-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -34px;
  display: block;
  color: #aeb8b4;
  font-size: var(--text-sm);
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}

/* Final editorial type scale for editable cards and supporting copy. */
.skill-card input {
  font-size: 26px;
  line-height: 1.2;
}
.skill-card textarea,
.project-card .project-description {
  font-size: 15px;
  line-height: 1.55;
}
.tag-chip .tag-title { font-size: 15px; }

@media (max-width: 700px) {
  .skill-card input { font-size: 20px; }
}
.section-heading > div {
  min-width: 0;
  flex: 1;
}
.section-title-label,
.section-title-input { width: 100%; }
#experience .section-title-input {
  padding-right: var(--space-3);
  font-size: clamp(40px, 5vw, 72px);
}
.contact-section > .section-number { margin-bottom: 22px; }
.contact-kicker { margin-bottom: var(--space-2); }
.project-details .project-description { margin-top: var(--space-2); }
.project-media.is-empty .upload-project {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.project-media.is-empty .upload-project:hover,
.project-media.is-empty:focus-within .upload-project {
  transform: translate(-50%, calc(-50% - 2px));
}
.project-media.is-dragging .upload-project {
  transform: translate(-50%, calc(-50% - 2px)) scale(1.03);
}

@media (min-width: 1051px) {
  .contact-thanks { right: max(40px, calc((100vw - 1320px) / 2)); }
}

.experience-summary {
  color: rgba(238, 243, 237, .8);
  font-size: 15px;
  line-height: var(--leading-copy);
  white-space: pre-wrap;
}

.section-heading p {
  margin-top: var(--space-2);
  line-height: 1.5;
}
.project-card .project-name { line-height: 1.1; }
.auto-title {
  display: block;
  height: auto;
  min-height: 1.1em;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.section-title-input.auto-title { width: min(100%, 900px); max-width: 100%; }
.project-card .project-name.auto-title { width: 100%; max-width: 100%; }
.skill-card .skill-name.auto-title { width: 100%; margin-top: 35px; }
.project-details .project-description {
  margin-top: 6px;
  line-height: 1.5;
}
.contact-title-input { line-height: 1.08; }
.contact-copy-input,
.skill-card textarea { line-height: var(--leading-copy); }

@media (max-width: 700px) {
  .experience-summary { font-size: 13px; }
  #experience .section-title-input { font-size: 28px; }
  .qr-shell > .qr-caption { bottom: -28px; font-size: var(--text-xs); }
}

/* Compact, consistent vertical rhythm across editable copy. */
.section-title-input,
.contact-title-input { line-height: 1.04; }
.section-heading p {
  margin-top: 6px;
  line-height: 1.45;
}
.contact-section > .section-number { margin-bottom: var(--space-3); }
.contact-kicker {
  margin-bottom: 6px;
  line-height: 1.2;
}
.contact-copy-input {
  margin-top: var(--space-3);
  line-height: 1.5;
}
.project-no { line-height: 1.2; }
.project-card .project-name,
.project-card.layout-split .project-name {
  margin: var(--space-3) 0 6px;
  line-height: 1.06;
}
.project-details .project-description {
  margin-top: 0;
  line-height: 1.45;
}

.upload-project {
  min-width: 164px;
  min-height: 72px;
  padding: 0 var(--space-5) !important;
  border-radius: var(--radius-pill) !important;
  background: var(--accent);
  color: #071117;
  font-size: 18px !important;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.upload-project:hover,
.upload-project:focus-within {
  background: #c7ff43;
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
}

@media (max-width: 700px) {
  .upload-project {
    min-width: 132px;
    min-height: 58px;
    padding: 0 var(--space-4) !important;
    font-size: 15px !important;
  }
}

/* React Bits CircularGallery behavior adapted for this static editor. */
.circular-gallery.showcase-rail {
  position: relative;
  width: min(100%, var(--content-max));
  height: 300px;
  margin-top: -90px;
  padding: 0;
  display: block;
  overflow: visible;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  outline: 0;
}
.circular-gallery.showcase-rail.is-dragging { cursor: grabbing; }
.circular-gallery.showcase-rail canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.showcase-view-hint {
  position: absolute;
  left: var(--showcase-hint-x, 50%);
  top: var(--showcase-hint-y, 50%);
  z-index: 8;
  min-height: 26px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #08100b;
  box-shadow: 0 4px 12px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.14) inset;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(13px, -50%);
  transition: opacity 120ms ease, visibility 0s linear 120ms;
}
.showcase-view-hint::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 2px 0 2px 0;
  background: var(--accent);
  transform: translateY(-50%) rotate(45deg);
  z-index: -1;
}
.showcase-view-hint.is-visible { opacity: 1; visibility: visible; transition-delay: 0s; }
.circular-gallery.showcase-rail:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.circular-gallery .showcase-item {
  position: absolute;
  left: 50%;
  top: 0;
  width: clamp(108px, 12vw, 154px);
  height: clamp(142px, 15.5vw, 198px);
  margin: 0;
  transform-origin: center;
  will-change: transform;
  transition: none;
}
.circular-gallery .showcase-tile {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: var(--radius-media);
  transition: border-color var(--motion-fast) var(--ease-out), box-shadow var(--motion-base) var(--ease-out), filter var(--motion-fast) var(--ease-out);
}
.circular-gallery .showcase-item:hover .showcase-tile,
.circular-gallery .showcase-item:focus-within .showcase-tile {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 18px 34px rgba(0,0,0,.42);
  filter: brightness(1.05);
}
.circular-gallery .showcase-item.is-active .showcase-tile {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 22px 46px rgba(0,0,0,.48);
  filter: brightness(1.06);
}
.circular-gallery.is-dragging .showcase-tile { pointer-events: none; }

@media (max-width: 700px) {
  .circular-gallery.showcase-rail { height: 220px; margin-top: -8px; }
  .circular-gallery .showcase-item {
    width: 102px;
    height: 136px;
    top: 12px;
  }
}

@media (min-width: 701px) {
  .availability-card {
    right: 50%;
    transform: translateX(50%);
  }
}

/* QR card follows the supplied vertical reference while keeping 1:1 media. */
.qr-shell {
  aspect-ratio: .8;
  padding: var(--space-4);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: var(--space-3);
  overflow: hidden;
  cursor: pointer;
}
.qr-media {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--radius-control);
  background: #fff;
}
.qr-shell .qr-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.qr-shell > .qr-caption {
  position: static;
  display: block;
  color: #aeb8b4;
  font-size: var(--text-sm);
  line-height: 1.4;
  text-align: center;
}

/* Final copy color and card typography. */
.experience-summary,
.project-card .project-description { color: #aebbb5; }
.tag-chip .tag-title { font-weight: 700; }
.tag-chip .tag-subtitle { font-size: 12px; }

@media (min-width: 701px) {
  .skill-card input { font-size: 30px; }
  .skill-card textarea {
    height: 118px;
    font-size: 15px;
    line-height: 1.55;
  }
}

/* React Bits DriftWall adapted for project media. */
.project-drift-wall { overflow: hidden; background: #071014; }
.drift-wall {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  --dw-gap: 18px;
  --dw-radius: 12px;
  --dw-lift: 64px;
  --dw-dim: .55;
  --dw-overlay: #060010;
  -webkit-mask-image: radial-gradient(ellipse 78% 82% at 50% 46%, #000 36%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 82% at 50% 46%, #000 36%, transparent 100%);
}
.drift-wall__plane {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  will-change: transform;
}
.drift-wall__col { width: 182px; transform-style: preserve-3d; }
.drift-wall__track { display: flex; flex-direction: column; will-change: transform; transform-style: preserve-3d; }
.drift-wall__tile {
  position: relative;
  width: 100%;
  height: calc(var(--dw-tile-h, 128px) + var(--dw-gap));
  flex: 0 0 auto;
  outline: 0;
  transform-style: preserve-3d;
}
.drift-wall__inner {
  position: absolute;
  inset: calc(var(--dw-gap) / 2);
  display: block;
  overflow: hidden;
  border-radius: var(--dw-radius);
  background: #0b0b12;
  opacity: var(--dw-dim);
  transform: translateZ(0);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .42s cubic-bezier(.22, 1, .36, 1), box-shadow .42s cubic-bezier(.22, 1, .36, 1);
}
.drift-wall__tile img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.92); }
.drift-wall__overlay { position: absolute; inset: 0; background: var(--dw-overlay); opacity: .42; transition: opacity .42s cubic-bezier(.22, 1, .36, 1); }
.drift-wall__tile.is-active .drift-wall__inner,
.drift-wall__tile:focus-visible .drift-wall__inner { opacity: 1; transform: translateZ(var(--dw-lift)); box-shadow: 0 24px 60px -18px rgba(0,0,0,.7); }
.drift-wall__tile.is-active .drift-wall__overlay,
.drift-wall__tile:focus-visible .drift-wall__overlay { opacity: 0; }

/* Project wall: a fixed multi-column image board, matching the supplied reference. */
.project-drift-wall { cursor: pointer; background: #111516; }
.project-image-count {
  position: absolute;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 5;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(238,243,237,.5);
  border-radius: var(--radius-pill);
  background: rgba(10,15,16,.9);
  color: #eef3ed;
  font-size: 16px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transition: border-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out), transform var(--motion-fast) var(--ease-out);
}
.project-image-count:hover,
.project-image-count:focus-visible { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Keep project copy on one line and align it with the right edge of the four-slot wall. */
.project-card.layout-banner .project-description { width: 100%; max-width: none; height: 24px; white-space: nowrap; line-height: 1.4; overflow: hidden; }
.drift-wall { display: block; padding: 17px; perspective: none; -webkit-mask-image: none; mask-image: none; }
.drift-wall__plane { position: relative; inset: auto; width: 100%; min-height: 100%; display: grid; grid-template-columns: repeat(var(--dw-columns, 4), minmax(0, 1fr)); gap: var(--dw-gap); align-items: start; transform: none !important; }
.drift-wall__col { width: auto; display: flex; flex-direction: column; gap: var(--dw-gap); transform: none; }
.drift-wall__col:nth-child(n) { padding-top: 0; }
.drift-wall__track { display: contents; transform: none !important; }
.drift-wall__tile { position: relative; width: 100%; height: auto; margin: 0; overflow: hidden; border: 0; outline: 0; border-radius: var(--dw-radius); background: transparent; box-shadow: none; transform: none; }
.drift-wall__tile:not(.is-empty) { transition: transform 240ms cubic-bezier(.2,.8,.2,1), box-shadow 240ms ease; }
.drift-wall__tile:not(.is-empty):hover { z-index: 4; transform: scale(1.045); box-shadow: none; }
.drift-wall__tile:not(.is-empty):focus,
.drift-wall__tile:not(.is-empty):focus-visible { border: 0; outline: 0; box-shadow: none; }
.drift-wall__view-hint { position:absolute; left:var(--dw-hint-x, 50%); top:var(--dw-hint-y, 50%); transform:translate(13px, -50%); min-height:26px; display:flex; align-items:center; padding:0 10px; border:0; border-radius:999px; background:var(--accent); color:#08100b; box-shadow:0 4px 12px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.14) inset; font-size:11px; font-weight:600; line-height:1; white-space:nowrap; opacity:0; visibility:hidden; pointer-events:none; transition:opacity 120ms ease, visibility 0s linear 120ms; z-index:5; }
.drift-wall__view-hint::before { content:''; position:absolute; left:-5px; top:50%; width:10px; height:10px; border-radius:2px 0 2px 0; background:var(--accent); transform:translateY(-50%) rotate(45deg); z-index:-1; }
.drift-wall__tile:not(.is-empty):hover .drift-wall__view-hint, .drift-wall__tile:not(.is-empty):focus-visible .drift-wall__view-hint { opacity:1; visibility:visible; transition-delay:0s; }
.drift-wall__tile:nth-child(odd) { aspect-ratio: 4 / 5; }
.drift-wall__tile:nth-child(even) { aspect-ratio: 1 / 1.22; }
.drift-wall__tile:nth-child(3n) { aspect-ratio: 16 / 10; }
.drift-wall__tile img, .drift-wall__tile:hover img, .project-card:hover .drift-wall__tile img { width:100%; height:auto; display:block; object-fit:contain; object-position:top center; filter:none !important; opacity:1 !important; transform:none !important; translate:none !important; animation:none !important; image-rendering:auto; transition:none !important; }
.drift-wall__remove { position: absolute; top: 12px; right: 12px; z-index: 2; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(6,10,11,.82); color: #fff; font-size: 20px; line-height: 1; opacity: 0; transition: opacity var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out); }
.drift-wall__tile:hover .drift-wall__remove, .drift-wall__remove:focus-visible { opacity: 1; }
.drift-wall__remove:hover { background: #d84c5b; }
.drift-wall__tile.is-empty { min-height: 180px; display: grid; place-items: center; border: 1px dashed rgba(238,243,237,.28); background: rgba(255,255,255,.025); }
.drift-wall__empty-upload { min-height: 40px; padding: 0 16px; border: 1px solid rgba(238,243,237,.35); border-radius: 999px; background: rgba(8,13,14,.72); color: #aebbb5; font-size: 13px; }
.drift-wall__tile.is-empty:hover { border-color: var(--accent); background: rgba(184,255,27,.06); }
.drift-wall__empty-upload:hover { color: var(--accent); border-color: var(--accent); }
.drift-wall__inner, .drift-wall__overlay { display: none; }
.project-drift-wall:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

/* Project cards stay visually open; copy fields remain editable without blocking image clicks. */
.project-card,
.project-card:hover { border-color: transparent; box-shadow: none; }
.project-card.layout-banner .project-meta { pointer-events: none; }
.project-card.layout-banner .project-meta input,
.project-card.layout-banner .project-meta textarea { pointer-events: auto; }
.project-card.layout-banner.has-masonry-wall {
  min-height: 0;
  overflow: visible;
  padding: 16px 16px 0;
  border: 1px solid rgba(229,244,238,.16);
  border-radius: 24px;
  background: #111b20;
}
.project-card.layout-banner.has-transparent-frame {
  border: 1px solid rgba(229,244,238,.16);
  border-radius: 24px;
  background: rgba(17,27,32,.72);
  box-shadow: 0 14px 36px rgba(0,0,0,.12) inset;
}
.project-card.layout-banner.has-fixed-wall {
  min-height: clamp(570px, 61vw, 680px);
  overflow: hidden;
}
.contact-section > .field-label:has(.contact-copy-input) {
  width: min(100%, var(--content-max)) !important;
  margin: -96px auto 30px !important;
}
.contact-copy-input {
  height: auto;
  min-height: 30px;
  max-width: 100%;
  color: #b8c4be;
  font-size: clamp(14px, 1.35vw, 20px);
  line-height: 1.55;
}
.project-card.layout-banner.has-fixed-wall .project-media,
.project-card.layout-banner.has-fixed-wall .drift-wall,
.project-card.layout-banner.has-fixed-wall .drift-wall__plane,
.project-card.layout-banner.has-fixed-wall .drift-wall__col,
.project-card.layout-banner.has-fixed-wall .drift-wall__track,
.project-card.layout-banner.has-fixed-wall .drift-wall__tile {
  height: 100%;
  min-height: 0;
}
.project-card.layout-banner.has-fixed-wall .drift-wall {
  padding: 16px;
  overflow: hidden;
}
.project-card.layout-banner.has-fixed-wall .drift-wall__plane {
  align-items: stretch;
}
.project-card.layout-banner.has-fixed-wall .drift-wall__tile {
  aspect-ratio: auto !important;
  border-radius: 16px;
  overflow: hidden;
}
.project-card.layout-banner.has-fixed-wall .drift-wall__tile img,
.project-card.layout-banner.has-fixed-wall .drift-wall__tile:hover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.project-card.layout-banner.has-fixed-wall .project-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  margin: 0;
  border-radius: 0 0 23px 23px;
  overflow: hidden;
}
.project-card.layout-banner.has-masonry-wall .project-media {
  position: relative;
  inset: auto;
  height: auto;
  min-height: 0;
  overflow: visible;
  background: transparent;
}
.project-card.layout-banner.has-masonry-wall .drift-wall {
  height: auto;
  padding: 0;
  overflow: visible;
  background: transparent;
}
.project-card.layout-banner.has-masonry-wall .drift-wall__plane { background: transparent; }
.drift-wall__plane--grouped {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.drift-wall__group {
  display: grid;
  grid-template-columns: minmax(240px, 1.05fr) minmax(0, 2fr);
  gap: var(--dw-gap);
  align-items: start;
}
.drift-wall__group-lead,
.drift-wall__group-variants { min-width: 0; }
.drift-wall__group-variants {
  column-count: 3;
  column-gap: var(--dw-gap);
}
.drift-wall__group-variants .drift-wall__tile {
  margin: 0 0 var(--dw-gap);
  break-inside: avoid;
}
@media (max-width: 700px) {
  .drift-wall__group { grid-template-columns: 1fr; }
  .drift-wall__group-variants { column-count: 2; }
}
.project-card.layout-banner.has-masonry-wall .project-meta {
  position: relative;
  inset: auto;
  margin-top: -36px;
  padding: var(--space-4) var(--space-5) var(--space-4);
  background: transparent;
}

/* Keep case copy readable over the image wall while preserving the content-led height. */
.project-card.layout-banner .project-meta {
  box-sizing: border-box;
  min-height: 164px;
  padding: 72px var(--space-7) var(--space-5);
  background: linear-gradient(180deg, transparent 0%, rgba(4, 9, 11, .34) 28%, rgba(4, 9, 11, .60) 100%);
}
.project-card.layout-banner.has-masonry-wall .project-meta {
  margin-top: -108px;
  min-height: 164px;
  padding: 72px var(--space-5) var(--space-4);
  background: linear-gradient(180deg, transparent 0%, rgba(4, 9, 11, .34) 28%, rgba(4, 9, 11, .60) 100%);
  width: calc(100% + 32px);
  margin-left: -16px;
  margin-right: -16px;
  border-radius: 0 0 23px 23px;
  overflow: hidden;
}

/* Read-only portfolio presentation. */
input[readonly], textarea[readonly] {
  cursor: default;
  caret-color: transparent;
  user-select: text;
}
.section-title-input.auto-title,
.project-card .project-name.auto-title,
.skill-card .skill-name.auto-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 1.12em !important;
  min-height: 1.12em;
}
.contact-title-input,
.experience-company,
.experience-role {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.experience-card,
.project-card {
  border: 1px solid rgba(238, 243, 237, .28);
  background: rgba(17, 27, 32, .28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.experience-card,
.experience-card:nth-child(even),
.experience-card:nth-child(odd) {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(238, 243, 237, .3);
  border-radius: 22px;
}
.experience-card.is-selected,
.experience-card.is-selected:nth-child(even),
.experience-card.is-selected:nth-child(odd) {
  background: rgba(104, 135, 62, .35);
  border-color: rgba(184, 255, 27, .62);
}
.experience-card:hover,
.experience-card.is-selected {
  z-index: 4;
  transform: scale(1.018);
  background: rgba(104, 135, 62, .35);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 42px rgba(0, 0, 0, .24), 0 0 28px rgba(184, 255, 27, .12);
}
.experience-card:hover .experience-summary,
.experience-card.is-selected .experience-summary {
  color: rgb(238, 243, 237);
}
.project-card.layout-banner.has-masonry-wall,
.project-card.layout-banner.has-transparent-frame {
  background: rgba(17, 27, 32, .28);
  border-color: rgba(238, 243, 237, .28);
}
.experience-summary {
  font-size: 14px;
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 300;
  color: rgb(174, 187, 181);
  line-height: 1.72;
}
.skill-card .skill-name.auto-title {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 800;
  color: #fff;
  height: 1.5em !important;
  min-height: 1.5em;
  padding: .12em 0 .18em;
  line-height: 1.2;
  overflow: visible;
  opacity: 1;
  white-space: nowrap;
  text-overflow: clip;
}
.skill-card textarea {
  height: auto;
  min-height: 0;
  overflow: visible;
  background: transparent !important;
}
.skill-card {
  min-width: 0;
  overflow: visible;
}
.skill-card .skill-copy {
  width: 100%;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 900px) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .skill-grid { grid-template-columns: 1fr; }
  .skill-card .skill-name.auto-title { font-size: 24px; }
}
.skill-card.is-selected,
.skill-card.is-selected .index,
.skill-card.is-selected .skill-name.auto-title,
.skill-card.is-selected textarea {
  color: #07110a !important;
}
.skill-card.is-selected textarea {
  background: transparent !important;
  opacity: 1;
}

/* Case 4 copy sits on the same baseline as the end of its masonry wall. */
.project-card.project-case-4 .project-meta {
  margin-top: -36px;
  transform: translateY(-2px);
}

/* Editing controls remain available through the data model without visual delete chrome. */
.tag-chip > button,
.contact-tag > button,
.icon-delete,
.remove-media,
.avatar-mode { display: none !important; }

.skill-card.is-selected {
  background: var(--accent);
  color: #07110a;
  border-color: var(--accent);
  animation: skill-card-wiggle 420ms cubic-bezier(.36,.07,.19,.97) both;
}
.skill-card.is-selected textarea,
.skill-card.is-selected .skill-name,
.skill-card.is-selected .index { color: #07110a; }
@keyframes skill-card-wiggle {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .skill-card.is-selected { animation: none; }
}

/* Selected skill cards use dark type for contrast against the accent fill. */
.skill-card.is-selected .index,
.skill-card.is-selected .skill-name,
.skill-card.is-selected .skill-name.auto-title,
.skill-card.is-selected .skill-copy {
  color: #07110a !important;
  -webkit-text-fill-color: #07110a !important;
}
.skill-card:hover,
.skill-card:focus-within,
.skill-card.is-selected {
  background: var(--accent);
  border-color: var(--accent);
}
.skill-card:hover .index,
.skill-card:hover .skill-name,
.skill-card:hover .skill-copy,
.skill-card:focus-within .index,
.skill-card:focus-within .skill-name,
.skill-card:focus-within .skill-copy {
  color: #07110a !important;
  -webkit-text-fill-color: #07110a !important;
}
.skill-card.is-selected textarea.skill-name.auto-title {
  color: #07110a !important;
  -webkit-text-fill-color: #07110a !important;
  text-shadow: none;
}

/* Shared interaction and media rules. */
:where(.project-card, .skill-card, .experience-card, .qr-shell) { border-radius: var(--radius-card); }
:where(.primary-action, .secondary-action, .quiet-button) { border-radius: var(--radius-pill); }
:where(.project-media img, .drift-wall__tile img, #avatar-image, #qr-image) { user-select: none; -webkit-user-drag: none; }
.drift-wall__tile img { content-visibility: auto; }

@media (max-width: 700px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  .canvas, .section-band { min-width: 0; width: 100%; }
  .sidebar.topbar { width: 100%; max-width: 100%; overflow: hidden; }
  .topbar .side-nav { max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .topbar .side-nav::-webkit-scrollbar { display: none; }
  .topbar .side-nav a { flex: 0 0 auto; min-width: 64px; min-height: 34px; }
  .hero-copy, .hero-visual, .section-heading, .project-list, .skill-grid, .experience-list, .contact-layout { min-width: 0; max-width: 100%; }
  .hero-copy { overflow: hidden; }
  .hero-copy .intro-input, .contact-copy-input { max-width: 100%; }
  .project-card.layout-banner.has-fixed-wall { min-height: 520px; }
  .project-card.layout-banner.has-fixed-wall .drift-wall__plane { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card.layout-banner.has-fixed-wall .drift-wall__col:nth-child(n + 3) { display: none; }
  .project-card.layout-banner.has-masonry-wall .project-meta { width: calc(100% + 20px); margin-left: -10px; margin-right: -10px; padding-left: 20px; padding-right: 20px; }
  .drift-wall__group { gap: 12px; }
  .drift-wall__group-variants { column-count: 2; }
  .experience-card { transform: none !important; }
  .experience-card:hover, .experience-card.is-selected { transform: none !important; }
  .experience-card > div { min-width: 0; }
  .experience-summary { overflow-wrap: anywhere; word-break: break-word; }
  .contact-details { min-width: 0; }
  .primary-action, .secondary-action, .quiet-button { min-height: 44px; }
  .hero-visual { display: flex; flex-direction: column; align-items: center; }
  .hero-visual .avatar-shell { left: 0 !important; right: 0 !important; margin-left: auto !important; margin-right: auto !important; transform: none !important; }
  .hero-visual .availability-card { left: 0 !important; right: 0 !important; margin-left: auto !important; margin-right: auto !important; transform: none !important; }
  .contact-layout { flex-direction: column; align-items: center; gap: 28px; }
  .contact-details { width: 100%; }
  .qr-shell { width: 132px; margin: 0 auto; align-self: center; }
  .project-image-count { right: var(--space-3); bottom: var(--space-3); min-height: 40px; padding: 0 14px; font-size: 13px; }
  .drift-wall { padding: 10px; }
  .drift-wall__plane { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .drift-wall__col { gap: 10px; }
  .drift-wall__col:nth-child(n + 4) { display: none; }
  .drift-wall__col:nth-child(2) { padding-top: 26px; }
  .drift-wall__col:nth-child(3) { padding-top: 6px; }
}

@media (min-width: 701px) and (max-width: 1050px) {
  .canvas { width: calc(100% - 174px); margin-left: 174px; }
  .section-band { padding-left: clamp(28px, 4vw, 54px); padding-right: clamp(28px, 4vw, 54px); }
  .project-list, .skill-grid, .experience-list { max-width: 100%; }
  .project-card.layout-banner.has-fixed-wall { min-height: 540px; }
  .experience-card { grid-template-columns: 48px minmax(0, 1fr) 150px; }
  .experience-card .icon-delete { display: none !important; }
}

/* Keep the requested breathing room between the QR image and its caption. */
.qr-shell { gap: 17px; }

/* Contact title follows the supplied two-line editorial layout on every viewport. */
.contact-section > .field-label:has(.contact-title-input) {
  display: block;
  width: min(100%, var(--content-max)) !important;
  margin: 22px auto 28px !important;
  padding: 0 6px;
  background: transparent;
  border: 0;
}
.contact-title-input {
  display: block;
  width: 100%;
  max-width: none;
  height: clamp(190px, 23vw, 340px);
  min-height: 0;
  padding: 0;
  color: #eef3ed;
  font-size: clamp(46px, 7.1vw, 104px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
  white-space: pre-wrap;
  overflow: hidden;
}
@media (max-width: 1050px) {
  .contact-section > .field-label:has(.contact-title-input) { padding: 0 3px; }
  .contact-title-input { height: clamp(170px, 27vw, 280px); font-size: clamp(40px, 7.3vw, 74px); line-height: 1.12; }
  .contact-section > .field-label:has(.contact-copy-input) { margin-top: -62px !important; }
}
@media (max-width: 700px) {
  .contact-section > .field-label:has(.contact-title-input) {
    margin: 18px auto 22px !important;
    padding: 0;
  }
  .contact-title-input {
    height: 122px;
    font-size: clamp(30px, 9.3vw, 44px);
    line-height: 1.12;
  }
  .contact-section > .field-label:has(.contact-copy-input) { margin-bottom: 24px !important; }
.contact-copy-input { font-size: 13px; line-height: 1.6; }
  .contact-section > .field-label:has(.contact-copy-input) { margin-top: -22px !important; }
}

/* Published presentation mode: text remains selectable but no editor affordances are shown. */
.presentation-mode input,
.presentation-mode textarea { pointer-events: none; caret-color: transparent; }
.presentation-mode .image-upload,
.presentation-mode .remove-media,
.presentation-mode .icon-delete,
.presentation-mode .tag-chip button,
.presentation-mode .contact-tag button,
.presentation-mode .add-text-button,
.presentation-mode #reset-button,
.presentation-mode .toolbar { display: none !important; }
.presentation-mode input[readonly],
.presentation-mode textarea[readonly] { cursor: default; }

/* Mobile composition pass: keep media, copy and contact content in one grid. */
@media (max-width: 700px) {
  :root { --page-gutter: 20px; }

  .sidebar.topbar {
    left: 0;
    right: 0;
    width: 100%;
    padding-inline: 10px;
  }
  .topbar .side-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    gap: 2px;
    overflow: hidden;
  }
  .topbar .side-nav a {
    min-width: 0;
    padding-inline: 4px;
    text-align: center;
    white-space: nowrap;
  }

  .hero.section-band {
    min-height: 0;
    padding: 72px var(--page-gutter) 118px;
    overflow: hidden;
  }
  .hero-grid { gap: 34px; }
  .hero-visual {
    position: relative;
    width: 100%;
    height: 360px;
    min-height: 360px;
    padding: 0;
    overflow: visible;
  }
  .hero-visual .avatar-shell {
    position: absolute;
    top: 0;
    left: 50% !important;
    right: auto !important;
    width: min(76vw, 294px);
    margin: 0 !important;
    transform: translateX(-50%) !important;
  }
  .hero-visual .availability-card {
    position: absolute;
    left: 50% !important;
    right: auto !important;
    bottom: 0;
    width: min(190px, 58vw);
    margin: 0 !important;
    padding: 16px 18px;
    transform: translateX(-50%) !important;
    text-align: center;
  }
  .availability-card label,
  .availability-card input {
    display: block;
    width: 100%;
    text-align: center;
    white-space: normal;
    overflow: visible;
  }
  .availability-card input { font-size: 14px; line-height: 1.35; }
  .availability-card .availability-note { margin-top: 8px; font-size: 11px; }
  .hero-copy { width: 100%; overflow: visible; }
  .title-input { font-size: clamp(48px, 14vw, 56px); }
  .english-input { font-size: clamp(34px, 10vw, 40px); }

  .project-list { width: 100%; gap: 28px; }
  .project-card,
  .project-card.layout-banner,
  .project-card.layout-banner.has-fixed-wall,
  .project-card.layout-banner.has-masonry-wall {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: 16px;
  }
  .project-card.layout-banner.has-fixed-wall .project-media {
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(500px, 142vw, 640px);
    min-height: 0;
    flex: 0 0 auto;
  }
  .project-card.layout-banner.has-fixed-wall .drift-wall {
    padding: 12px;
  }
  .project-card.layout-banner.has-fixed-wall .drift-wall__plane {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .project-card.layout-banner.has-fixed-wall .drift-wall__col { gap: 10px; }
  .project-card.layout-banner.has-fixed-wall .drift-wall__col:nth-child(n + 3) { display: none; }
  .project-card.layout-banner.has-fixed-wall .drift-wall__tile { border-radius: 12px; }

  .project-card.layout-banner .project-meta,
  .project-card.layout-banner.has-fixed-wall .project-meta,
  .project-card.layout-banner.has-masonry-wall .project-meta,
  .project-card.project-case-4 .project-meta {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 20px;
    transform: none;
    border-radius: 0 0 15px 15px;
    background: linear-gradient(180deg, rgba(4, 9, 11, .82), rgba(4, 9, 11, .98));
    overflow: visible;
  }
  .project-card .project-name.auto-title {
    height: auto !important;
    min-height: 1.2em;
    margin: 0 0 10px;
    font-size: clamp(24px, 7vw, 28px);
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .project-card .project-details { width: 100%; overflow: visible; }
  .project-card .project-description,
  .project-card.layout-banner .project-description {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow: visible;
  }
  .project-card.layout-banner.has-masonry-wall .project-media,
  .project-card.layout-banner.has-masonry-wall .drift-wall,
  .project-card.layout-banner.has-masonry-wall .drift-wall__plane {
    width: 100%;
  }
  .drift-wall__group { grid-template-columns: 1fr; gap: 12px; }
  .drift-wall__group-variants { column-count: 2; column-gap: 10px; }
  .drift-wall__group-variants .drift-wall__tile { margin-bottom: 10px; }

  .contact-section {
    min-height: 0;
    padding-bottom: 72px;
    overflow: hidden;
  }
  .contact-tags {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 12px;
  }
  .contact-tag { width: 100%; min-width: 0; }
  .contact-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 54px !important;
    gap: 34px;
  }
  .contact-details {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
    padding: 0;
  }
  .contact-details span,
  .contact-details input {
    width: 100%;
    margin: 0;
    text-align: left;
  }
  .contact-details span { margin-top: 16px; }
  .contact-details span:first-child { margin-top: 0; }
  .contact-details input { font-size: 18px; line-height: 1.4; }
  .qr-shell {
    position: relative;
    top: auto;
    width: min(200px, 58vw);
    height: auto;
    aspect-ratio: auto;
    margin: 0 auto;
    padding: 12px !important;
    display: flex;
    flex-direction: column;
    gap: 12px !important;
    align-self: center;
    overflow: visible;
  }
  .qr-media {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
  .qr-shell .qr-media img { object-fit: contain; }
  .qr-shell > .qr-caption {
    position: static;
    display: block;
    width: 100%;
    color: #aeb8b4;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
  }
  .contact-thanks {
    position: static;
    display: block;
    width: 100%;
    margin: 30px auto 0;
    font-size: clamp(58px, 18vw, 76px);
    line-height: 1;
    text-align: center;
    transform: none !important;
    transform-origin: center;
  }
}

/* Mobile media rails: only the posters scroll; every image column starts flush. */
@media (max-width: 700px) {
  .hero.section-band {
    padding-bottom: 238px;
    background-attachment: scroll;
    background-position: center top;
  }
  .showcase-rail {
    position: absolute;
    left: var(--page-gutter);
    right: var(--page-gutter);
    bottom: 26px;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 6px 0 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
  .showcase-rail::-webkit-scrollbar { display: none; }
  .showcase-item,
  .showcase-tile,
  .showcase-tile:nth-child(n + 5),
  .showcase-tile:nth-child(n + 6) {
    display: block;
    flex: 0 0 clamp(112px, 31vw, 138px);
    width: clamp(112px, 31vw, 138px);
    min-width: clamp(112px, 31vw, 138px);
    max-width: none;
    margin: 0;
    aspect-ratio: .72;
    border-radius: 14px;
    transform: none !important;
    scroll-snap-align: start;
  }
  .showcase-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center;
  }

  .project-card .drift-wall__plane,
  .project-card .drift-wall__col,
  .project-card .drift-wall__track {
    align-items: start;
    align-content: start;
  }
  .project-card .drift-wall__col,
  .project-card .drift-wall__col:nth-child(2),
  .project-card .drift-wall__col:nth-child(3),
  .project-card .drift-wall__col:nth-child(n) {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  .project-card .drift-wall__tile,
  .project-card .drift-wall__col > .drift-wall__tile:first-child {
    align-self: start;
    margin-top: 0 !important;
  }
  .project-card .drift-wall__tile img {
    display: block;
    object-position: top center;
  }
  .drift-wall__group,
  .drift-wall__group-lead,
  .drift-wall__group-variants {
    align-items: start;
    align-content: start;
  }
  .drift-wall__group-lead > .drift-wall__tile:first-child,
  .drift-wall__group-variants > .drift-wall__tile:first-child {
    margin-top: 0 !important;
  }
}

/* All case headings and supporting copy follow Case 1's text baseline. */
.project-card.layout-banner {
  --project-copy-inset: var(--space-7);
  --project-copy-width: min(680px, 80%);
}
.project-card.layout-banner .project-meta,
.project-card.layout-banner.has-fixed-wall .project-meta,
.project-card.layout-banner.has-masonry-wall .project-meta,
.project-card.project-case-4 .project-meta {
  padding-left: var(--project-copy-inset);
  padding-right: var(--project-copy-inset);
}
.project-card.layout-banner.has-masonry-wall .project-meta,
.project-card.project-case-4 .project-meta {
  width: calc(100% + 32px);
  margin-top: -108px;
  margin-left: -16px;
  margin-right: -16px;
  transform: none;
}
.project-card.layout-banner .project-name.auto-title,
.project-card.layout-banner .project-description {
  width: var(--project-copy-width);
  max-width: 100%;
}
.project-card.layout-banner .project-name.auto-title { margin-left: 0; }
.project-card.layout-banner .project-description { margin-left: 0; }

@media (max-width: 700px) {
  .project-card.layout-banner {
    --project-copy-inset: 20px;
    --project-copy-width: 100%;
  }
  .project-card.layout-banner .project-meta,
  .project-card.layout-banner.has-fixed-wall .project-meta,
  .project-card.layout-banner.has-masonry-wall .project-meta,
  .project-card.project-case-4 .project-meta {
    width: 100%;
    margin: 0;
    padding-left: var(--project-copy-inset);
    padding-right: var(--project-copy-inset);
    transform: none;
  }
  .project-card.layout-banner.has-masonry-wall .project-meta,
  .project-card.layout-banner.has-masonry-wall.project-case-4 .project-meta {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
  }
}
