/* === Arita Heiti / 阿丽达黑体 (see main.html @font-face) === */

/* === Isabel Portfolio · Esther Design System === */
:root {
  --blue: #5BA8F5;
  --blue-deep: #2B7FD8;
  --yellow: #F4D758;
  --yellow-soft: #FFF8E1;
  --orange: #F97316;
  --orange-soft: #FFB380;
  --cream: #FFF9ED;
  --cream-dark: #faf6eb;
  --ink: #1A1A2E;
  --ink-light: #4A4A5A;
  --ink-faint: #8A8A9A;
  --dark-panel: #151821;
  --cursor-blob: url('cursor-blob-hover.png') 12 10, pointer;
}

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

/* Instant jump on first load (e.g. index → #portfolio); smooth only after ready */
html { scroll-behavior: auto; }
html.is-scroll-ready { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

/* === Sparkles Text #44 === */
.sparkles-wrap {
  position: relative;
  display: inline-block;
  padding: 12px 24px;
}
.sparkles-text {
  font-family: 'Noto Serif SC', serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--blue-deep);
  position: relative;
  z-index: 1;
  letter-spacing: 0.04em;
}
.sparkle {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  animation: sparkle-anim 0.8s ease-in-out infinite;
}
@keyframes sparkle-anim {
  0%, 100% { opacity: 0; transform: scale(0) rotate(75deg); }
  50% { opacity: 1; transform: scale(1) rotate(120deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sparkle { animation: none; opacity: 0.6; }
  html,
  html.is-scroll-ready { scroll-behavior: auto; }
  html.portfolio-enter #portfolio,
  html.portfolio-enter.portfolio-morph-ok .portfolio-morph.is-ready .portfolio-morph__sticky {
    animation: none;
  }
}

/* === Placeholder images === */
.img-placeholder {
  background: var(--yellow-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  overflow: hidden;
}

/* === Site Nav === */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 249, 237, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 26, 46, 0.06);
  padding: 0 clamp(1rem, 3vw, 2rem);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--orange);
  text-decoration: none;
  cursor: pointer;
}
.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-light);
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--blue-deep);
  color: #fefcf6;
}

/* === Sections === */
.section {
  padding: clamp(80px, 12vh, 160px) 0;
}
.section--alt {
  background: var(--cream);
}
.section-header {
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--orange);
  display: block;
  margin-bottom: 0.5rem;
}

/* === SKILLS: headline + tech stack + process === */
.skills-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.skills-main {
  min-width: 0;
  flex: 0 1 34rem;
  /* Align with the "I" in SKILLS: sparkles-wrap pad-x + width of "SK" */
  margin-left: calc(24px + 1.32 * clamp(2rem, 5vw, 3.2rem));
}

.skills-headline {
  margin: 0 0 clamp(2rem, 4vw, 2.75rem);
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.skills-headline__muted {
  display: block;
  color: var(--orange);
  font-weight: 500;
}

.skills-headline__strong {
  display: block;
  color: var(--blue-deep);
}

.skills-headline__accent {
  display: block;
  color: var(--blue);
}

.skills-stack__label {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue-deep);
}

.skills-stack__grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skills-stack__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skills-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  height: 3.4rem;
  padding: 0 0.7rem;
  border-radius: 14px;
  background: #fff;
  color: var(--blue-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(43, 127, 216, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skills-tool:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(43, 127, 216, 0.14);
}

.skills-process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 0 0 auto;
  max-width: 20rem;
  margin-left: 0;
}

.skills-process__item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.skills-process__icon {
  flex: 0 0 auto;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  background: var(--blue-deep);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 4px 0 rgba(91, 168, 245, 0.45);
}

.skills-process__text {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  font-weight: 600;
  color: var(--blue-deep);
  line-height: 1.35;
}

@media (max-width: 900px) {
  .skills-layout {
    flex-direction: column;
    gap: 1.75rem;
  }

  .skills-main {
    margin-left: 0;
    flex: 1 1 auto;
    max-width: none;
  }

  .skills-headline {
    margin-bottom: 1.5rem;
    font-size: clamp(1.45rem, 6.2vw, 1.9rem);
  }

  .skills-process {
    margin-left: 0;
    max-width: none;
    padding-bottom: 0.5rem;
  }
}

/* === ABOUT: single-viewport hero (图2 layout) === */
.section--about {
  position: relative;
  display: grid;
  grid-template-areas: "about-main";
  padding: 0;
  height: calc(100vh - 56px);
  min-height: 520px;
  overflow: visible;
  border-top: 1px solid rgba(26, 26, 46, 0.08);
}

.about-side,
.about-center,
.about-photo-cutout {
  grid-area: about-main;
}

.about-side {
  align-self: start;
  justify-self: start;
  position: relative;
  z-index: 3;
  padding: clamp(1.25rem, 3vh, 2rem) clamp(1.25rem, 4vw, 2rem) 0;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  box-sizing: border-box;
}

.about-sparkles {
  padding: 8px 0;
}

.about-title-stack {
  display: inline-block;
  line-height: 0.95;
  font-size: clamp(2.4rem, 6vw, 4rem);
}

.about-center {
  align-self: center;
  justify-self: center;
  position: relative;
  z-index: 2;
  width: min(90%, 640px);
  display: flex;
  justify-content: center;
  text-align: center;
  transform: translateY(clamp(-3rem, -8vh, -5rem));
}

.about-center.reveal-anim.visible:not(.is-story) {
  transform: translateY(clamp(-3rem, -8vh, -5rem));
}

.about-typing-wrap {
  position: relative;
  display: inline-grid;
  justify-items: center;
  max-width: 100%;
  margin-inline: auto;
}

.about-typing-wrap > .typing-text-sizer,
.about-typing-wrap > .about-typing {
  grid-area: 1 / 1;
  width: 100%;
}

.about-typing-wrap > .typing-text-sizer {
  visibility: hidden;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 500;
  line-height: 1.9;
}

.about-typing-wrap > .typing-text-sizer::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
}

.about-center.is-story {
  width: min(92%, 680px);
  align-self: center;
}

.about-center.is-story.visible {
  transform: translateY(clamp(-0.75rem, calc(-2vh + 2.5rem), 0.75rem));
}

.about-typing-wrap.is-story {
  display: block;
  width: 100%;
  position: relative;
  padding-bottom: 0;
}

.about-typing-wrap.is-story > .typing-text-sizer,
.about-typing-wrap.is-story > .about-typing,
.about-typing-wrap.is-story > .about-click-me {
  display: none;
}

.about-story {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.about-story-p {
  opacity: 1;
  transform: none;
  margin: 0 0 1.35em;
  font-family: 'Arita Heiti', '阿丽达黑体', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: clamp(0.82rem, 1.2vw, 0.92rem);
  font-weight: 400;
  line-height: 1.85;
  color: var(--orange);
}

.about-story-p.is-animating {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 2s ease, transform 2s ease;
}

.about-story-p:last-child {
  margin-bottom: 0;
}

.about-story-p.visible {
  opacity: 1;
  transform: translateY(0);
}

/* #46 Cool Mode */
.cool-btn {
  position: relative;
  cursor: var(--cursor-blob);
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 600;
  border: none;
  transition: all 0.2s;
}

.cool-btn-blue {
  background: var(--blue);
  color: #fff;
}

.cool-btn-blue:hover {
  background: #1E5BA8;
  transform: translateY(-2px);
}

.cool-btn.about-story-next {
  position: absolute;
  right: clamp(0.25rem, 6vw, 3.5rem);
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.2s;
  z-index: 5;
  pointer-events: none;
  visibility: hidden;
}

.cool-btn.about-story-next.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.cool-btn.about-story-next:hover {
  transform: translateY(10px);
}

.cool-btn.about-story-next.is-visible:hover {
  transform: translateY(-2px);
}

#_coolMode_effect {
  overflow: hidden;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483647;
}

@media (prefers-reduced-motion: reduce) {
  .about-story-p {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cool-btn.about-story-next {
    transition: none;
  }
}

/* #47 Typing Animation — 中文正文用 Noto Sans SC (brand-dna) */
.about-typing.typing-container {
  font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 500;
  color: var(--orange);
  min-height: 3rem;
  line-height: 1.9;
  text-align: center;
  white-space: nowrap;
}

/* Click Me — video reference interaction */
.about-click-me {
  position: absolute;
  right: -0.76rem;
  bottom: -2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 6px 14px;
  border: none;
  background: transparent;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
  z-index: 1;
  overflow: visible;
  cursor: var(--cursor-blob);
  -webkit-tap-highlight-color: transparent;
}

.about-click-me .click-me-text,
.about-click-me .click-me-arrow {
  position: relative;
  z-index: 1;
}

.click-me-bg,
.click-me-fill,
.click-me-shadow {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.click-me-bg {
  inset: 0;
  background: #A8D4FF;
  z-index: 0;
  transform: scale(0.42);
  transform-origin: 18% 50%;
  transition: transform 0.38s cubic-bezier(0.34, 1.45, 0.64, 1), opacity 0.2s ease;
}

.about-click-me:hover .click-me-bg,
.about-click-me:focus-visible .click-me-bg,
.about-click-me.is-active .click-me-bg,
.about-click-me.is-done .click-me-bg {
  transform: scale(1);
}

.click-me-fill {
  inset: 0;
  background: #5BA8F5;
  z-index: 1;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 999px;
}

.about-click-me.is-active .click-me-fill {
  transform: scaleX(1);
  inset: 0;
}

.about-click-me.is-done .click-me-fill {
  transform: none;
  inset: 0;
}

.click-me-shadow {
  inset: -1px 2px 1px -2px;
  background: #A8D4FF;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.25s ease 0.12s;
}

.about-click-me.is-done .click-me-shadow {
  opacity: 0;
}

.click-me-ripple {
  position: absolute;
  right: -0.45em;
  top: 50%;
  width: 2.4em;
  height: 2.4em;
  margin-top: -1.2em;
  border: 1.5px solid rgba(43, 127, 216, 0.35);
  border-radius: 50%;
  z-index: 2;
  opacity: 0;
  transform: scale(0.35);
  pointer-events: none;
}

.about-click-me.is-active .click-me-ripple {
  animation: click-me-ripple 0.65s ease-out forwards;
}

@keyframes click-me-ripple {
  0% { opacity: 0.75; transform: scale(0.35); }
  100% { opacity: 0; transform: scale(1.75); }
}

.about-click-me.is-active,
.about-click-me.is-done {
  color: #fefcf6;
  border-radius: 999px;
  overflow: visible;
}

.about-click-me.is-done .click-me-bg {
  opacity: 0;
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .click-me-bg,
  .click-me-fill,
  .click-me-shadow {
    transition: none;
  }
  .about-click-me.is-active .click-me-ripple {
    animation: none;
    opacity: 0;
  }
  .about-click-me:hover .click-me-bg,
  .about-click-me:focus-visible .click-me-bg {
    transform: scale(1);
  }
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--blue);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: typing-blink 1s steps(1) infinite;
}

@keyframes typing-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .typing-cursor { animation: none; }
}

.about-photo-cutout {
  align-self: end;
  justify-self: end;
  position: relative;
  right: auto;
  bottom: auto;
  margin-right: clamp(1.25rem, 4vw, 2rem);
  height: clamp(260px, 62vh, 540px);
  width: auto;
  max-width: min(42vw, 420px);
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
  z-index: 1;
}

/* ABOUT / RESUME profile card — Figma Rectangle 2 spec */
.about-profile-card {
  position: relative;
  width: min(620px, 100%);
  height: 520px;
  max-height: 520px;
  margin: 0 auto;
  background: #5BA8F5;
  border-radius: 50px;
  box-shadow:
    0 4px 8px 3px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  overflow: hidden;
}

.resume-profile-card {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* RESUME — internships & education timeline */
#resume.section {
  position: relative;
  padding: clamp(48px, 8vh, 80px) 0;
  overflow: visible;
}

#resume .section-header {
  margin-bottom: clamp(28px, 4vw, 48px);
}

#resume .container {
  padding-bottom: clamp(40px, 6vh, 80px);
}

.resume-experience {
  max-width: 720px;
  margin-top: clamp(0.5rem, 1.5vw, 1rem);
}

.resume-timeline {
  list-style: none;
  position: relative;
  padding-left: 28px;
}

.resume-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(43, 127, 216, 0.22);
}

.resume-timeline-item {
  position: relative;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.resume-timeline-item:last-child {
  margin-bottom: 0;
}

.resume-timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue-deep);
  box-shadow: 0 0 0 3px var(--cream);
}

.resume-timeline-item:nth-child(3n+1)::before {
  background: var(--blue-deep);
}

.resume-timeline-item:nth-child(3n+2)::before {
  background: var(--yellow);
}

.resume-timeline-item:nth-child(3n)::before {
  background: var(--blue-deep);
}

.resume-timeline-type {
  display: block;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}

.resume-timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.2rem;
}

.resume-timeline-org {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.resume-timeline-date {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

.resume-timeline-role {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.88rem;
  color: var(--ink-light);
  margin-bottom: 0.35rem;
  line-height: 1.5;
}

.resume-timeline-note {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.82rem;
  color: var(--ink-light);
  line-height: 1.65;
  max-width: 52ch;
}

@media (max-width: 600px) {
  .resume-timeline-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .resume-timeline-date {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resume-timeline-item::before {
    box-shadow: none;
  }
}

.resume-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  min-height: min(440px, calc(100vh - 56px - 125px));
  overflow: visible;
}

.resume-stage .about-profile-card {
  margin: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* 图1 — click face, bottom-left */
.resume-click-trigger {
  position: absolute;
  left: clamp(0.75rem, 3vw, 2.5rem);
  bottom: 0;
  width: clamp(270px, 31.5vw, 378px); /* 1.5× prior 180–252 */
  padding: 0;
  border: none;
  background: transparent;
  z-index: 3;
  line-height: 0;
  cursor: default;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

.resume-click-trigger.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.92);
}

.resume-click-trigger:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
  border-radius: 12px;
}

.resume-click-face {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: auto;
  user-select: none;
  cursor: url('cursor-blob-hover.png') 12 10, pointer;
}

/* 图2 → 图3 position (right, bottom flush with black edge) */
.resume-fox-link {
  position: absolute;
  right: clamp(0.75rem, 3vw, 2rem);
  left: auto;
  bottom: 0;
  width: clamp(260px, 34vw, 400px);
  z-index: 2;
  line-height: 0;
  text-decoration: none;
  cursor: default;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(18%, 28%) scale(0.88);
  transition:
    opacity 2.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 2.8s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 2.2s;
}

.resume-fox-link.is-in {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(0, 0) scale(1);
}

/* after enter settles: short hover grow/shrink */
.resume-fox-link.is-in.is-settled {
  transition: transform 0.25s ease;
}

.resume-fox-link.is-in.is-grown {
  transform: translateY(-4px) scale(1.08);
}

.resume-fox-link.is-over-art {
  cursor: var(--cursor-blob);
}

.resume-fox-link:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
  border-radius: 12px;
}

.resume-fox {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .resume-click-trigger,
  .resume-fox-link {
    transition: opacity 0.2s ease, visibility 0.2s;
  }

  .resume-click-trigger.is-gone {
    transform: none;
  }

  .resume-fox-link {
    transform: none;
  }

  .resume-fox-link.is-in:hover {
    transform: none;
  }

  .resume-fox-link.is-in.is-grown {
    transform: translate(0, 0) scale(1);
  }
}

@media (max-width: 900px) {
  .resume-stage {
    min-height: 0;
    flex-direction: column;
    align-items: center;
  }

  .resume-click-trigger {
    left: clamp(0.5rem, 4vw, 1.25rem);
    width: clamp(248px, 63vw, 338px);
  }

  .resume-fox-link {
    right: clamp(0.5rem, 3vw, 1.25rem);
    width: clamp(220px, 46vw, 320px);
  }
}

.about-profile-card__scroll {
  padding: 34px 38px 30px;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}

.about-profile-card__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: stretch;
  height: 100%;
}

.about-profile-col {
  max-width: 168px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.about-profile-col--spread .about-profile-entries {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
}

.about-profile-col--spread .about-profile-entry {
  margin-bottom: 0;
}

.about-profile-col--project {
  justify-content: space-between;
}

.about-profile-project-block {
  flex-shrink: 0;
}

.about-profile-skills-block {
  flex-shrink: 0;
  margin-top: auto;
}

.about-profile-col--project .about-profile-heading--sub {
  margin-top: 0;
}

.about-profile-heading {
  font-family: 'Fraunces', serif;
  font-style: normal;
  font-weight: 400;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.about-profile-heading--sub {
  margin-top: 0;
  margin-bottom: 10px;
}

.about-profile-star {
  width: 22px;
  height: 23px;
  flex-shrink: 0;
}

.about-profile-entry {
  margin-bottom: 12px;
}

.about-profile-entry:last-child {
  margin-bottom: 0;
}

.about-profile-title {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
  line-height: 17px;
  letter-spacing: 0.08em;
  color: #F4D758;
  margin: 0 0 6px;
}

.about-profile-title--wrap {
  line-height: 17px;
}

.about-profile-date,
.about-profile-role {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: 11px;
  line-height: 18px;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  margin: 0 0 4px;
}

.about-profile-label {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  line-height: 18px;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  margin: 0 0 4px;
}

.about-profile-meta {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  margin: 0 0 2px;
}

.about-profile-body {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  line-height: 18px;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  margin: 0 0 4px;
}

.about-profile-body:last-child {
  margin-bottom: 0;
}

.about-profile-skills--tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
}

.about-profile-skill {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 8px;
  background: rgba(217, 217, 217, 0.17);
  border: 2px solid #FFFFFF;
  border-radius: 11px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  white-space: nowrap;
  cursor: var(--cursor-blob);
}

@media (max-width: 900px) {
  .about-profile-card {
    width: 100%;
    height: auto;
    max-height: none;
    border-radius: 36px;
  }

  .about-profile-card__scroll {
    padding: 28px 24px;
    overflow-y: auto;
  }

  .about-profile-card__grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px 16px;
    justify-content: stretch;
    height: auto;
  }

  .about-profile-col--spread .about-profile-entries {
    justify-content: flex-start;
    gap: 18px;
  }

  .about-profile-skills-block {
    margin-top: 20px;
  }

  .about-profile-col {
    max-width: none;
  }

  .about-profile-col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .about-profile-card {
    width: calc(100vw - 1.5rem);
    border-radius: 28px;
  }

  .about-profile-card__scroll {
    padding: 24px 20px;
  }

  .about-profile-card__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-profile-col:last-child {
    grid-column: auto;
  }

  .about-profile-heading {
    font-size: 20px;
    line-height: 30px;
  }

  .about-profile-heading--sub {
    margin-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-profile-card {
    transition: none;
  }
}

/* legacy about helpers (unused in hero, kept for reference) */
.layout-sticky {
  display: grid;
  grid-template-columns: 0.35fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.sticky-side {
  position: sticky;
  top: 80px;
}
.about-intro {
  font-size: 1.05rem;
  color: var(--ink-light);
  margin-bottom: 2rem;
  max-width: 560px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 32px);
}
.about-photo {
  aspect-ratio: 4/5;
  width: 100%;
}
.about-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.viral-pullquote {
  padding: 36px 40px;
  background: var(--cream);
  border-radius: 16px;
  border: 40px solid var(--yellow);
  position: relative;
}
.viral-pullquote::before {
  content: '"';
  font-family: 'Fraunces', serif;
  font-size: 5rem;
  color: var(--yellow);
  position: absolute;
  top: -10px;
  left: 20px;
  opacity: 0.5;
  line-height: 1;
}
.viral-pullquote p {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.8;
}

/* === PORTFOLIO: Flip cards === */
.flip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  perspective: 1200px;
}
.flip-card {
  position: relative;
  cursor: pointer;
  /* Height = 16:9 cover + label (front in normal flow) */
}
.flip-inner {
  width: 100%;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: 14px;
}
.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}
.flip-front,
.flip-back {
  backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
}
.flip-front {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--blue-deep);
}
.flip-front .img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  flex: none;
  border-radius: 0;
  font-size: 0.7rem;
}
.flip-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Project cover: 16:9 fill (no letterbox); label below */
.flip-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  flex: none;
  background: var(--cover-bg, #e8ecec);
  overflow: hidden;
}

.flip-cover-wrap .flip-cover--blur {
  display: none;
}

.flip-cover-wrap .flip-cover--main {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Project 03 FLOOD LENS: keep title band visible if any crop */
.flip-cover-wrap .flip-cover--keep-text {
  object-position: center center;
}

.flip-label {
  position: static;
  flex: 0 0 auto;
  z-index: 1;
  display: block;
  padding: 0.7rem 0.95rem 0.85rem;
  background: var(--blue-deep);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-shadow: none;
  line-height: 1.2;
}
.flip-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  background: var(--dark-panel);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #e2e8f0;
}
.flip-back h4 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.flip-back .year {
  font-size: 0.72rem;
  color: var(--orange-soft);
  margin-bottom: 10px;
}
.flip-back p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

a.flip-card.flip-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* === PORTFOLIO: scroll-linked scatter → grid (desktop only) === */
@keyframes portfolio-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.portfolio-morph__header {
  position: relative;
  z-index: 4;
}

html.portfolio-enter:not(.portfolio-morph-ok) #portfolio {
  animation: portfolio-enter 0.7s ease-out both;
}

@media (min-width: 901px) {
  html.portfolio-morph-ok #portfolio.section {
    padding: 0;
  }

  html.portfolio-morph-ok .portfolio-morph:not(.is-ready) .portfolio-morph__sticky {
    opacity: 0;
  }

  html.portfolio-enter.portfolio-morph-ok .portfolio-morph.is-ready .portfolio-morph__sticky {
    animation: portfolio-enter 0.7s ease-out both;
  }

  html.portfolio-morph-ok .portfolio-morph.is-enabled .portfolio-morph__sticky {
    position: sticky;
    top: 56px;
    min-height: calc(100vh - 56px);
    box-sizing: border-box;
    padding: clamp(48px, 7vh, 96px) 0;
  }

  html.portfolio-morph-ok .portfolio-morph.is-enabled .flip-grid {
    overflow: visible;
  }

  html.portfolio-morph-ok .portfolio-morph.is-enabled .flip-card {
    transform-origin: center center;
    will-change: transform;
  }

  html.portfolio-morph-ok .portfolio-morph.is-enabled .flip-label {
    opacity: var(--portfolio-label-o, 1);
  }

  html.portfolio-morph-ok .portfolio-morph.is-morphing .flip-card {
    pointer-events: none;
    cursor: default;
  }

  html.portfolio-morph-ok .portfolio-morph.is-morphing .flip-card:hover .flip-inner {
    transform: none;
  }

  html.portfolio-morph-ok .portfolio-morph.is-morphing .flip-inner {
    background: transparent;
    /* Hide the empty label strip so stacked covers stay solid, not see-through */
    clip-path: inset(0 0 calc(0.7rem + 0.85rem + 0.936rem) 0 round 14px);
  }

  html.portfolio-morph-ok .portfolio-morph.is-morphing .flip-front {
    background: transparent;
  }

  html.portfolio-morph-ok .portfolio-morph.is-morphing .flip-cover-wrap {
    border-radius: 14px;
    background: var(--cover-bg, #e8ecec);
    box-shadow: 0 16px 36px rgba(26, 26, 46, 0.12);
  }

  html.portfolio-morph-ok .portfolio-morph.is-morphing .flip-cover--main {
    opacity: 1;
  }

  html.portfolio-morph-ok .portfolio-morph.is-morphing .flip-back {
    visibility: hidden;
  }

  html.portfolio-morph-ok .portfolio-morph.is-morphing .portfolio-morph__header {
    z-index: 20;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-morph {
    height: auto !important;
  }
  .portfolio-morph__sticky {
    position: static !important;
    min-height: 0 !important;
  }
}

/* === Project case study page === */
body.project-case {
  --project-case-max: 1200px;
  --project-case-pad-x: clamp(0.75rem, 3vw, 2rem);
  background: var(--cream);
  min-height: 100vh;
}

.project-case__header,
.project-case__main,
.project-case__footer {
  max-width: var(--project-case-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--project-case-pad-x);
  padding-right: var(--project-case-pad-x);
}

.project-case__header {
  padding-top: clamp(1.25rem, 4vw, 2rem);
  padding-bottom: 0;
}

.project-case__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(0.85rem, 2vw, 1.25rem);
  font-size: 0.88rem;
}

.project-case__back,
.project-case__home {
  color: var(--blue-deep);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.project-case__back:hover,
.project-case__home:hover {
  color: var(--orange);
}

.project-case__intro {
  margin-bottom: clamp(0.85rem, 2vw, 1.25rem);
}

.project-case__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.35rem;
}

.project-case__intro .section-label {
  margin-bottom: 0;
  line-height: 1.3;
}

.project-case__title {
  font-family: 'Noto Serif SC', serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--blue-deep);
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin: 0;
}

.project-case__desc {
  max-width: 42rem;
  font-size: clamp(0.78rem, 1.35vw, 0.9rem);
  color: var(--orange);
  line-height: 1.45;
}

.project-case__main {
  padding-top: 0;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

/* Continuous vertical strip: frames stacked flush, no gaps */
.project-case__strip {
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.project-case__strip .project-case__img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  vertical-align: top;
}

.project-case__credit {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--orange);
}

.project-case__figure {
  max-width: min(1200px, 100%);
  margin: 0 auto;
}

.project-case__img {
  display: block;
  width: 100%;
  height: auto;
}

/* === SKILLS: Dashed sketch === */
.chair-dashed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.chair-dashed-card {
  border: 2px dashed;
  border-radius: 16px;
  padding: 28px 22px;
  position: relative;
  background: #fefcf6;
}
.chair-dashed-card:nth-child(1) { border-color: rgba(43, 127, 216, 0.35); }
.chair-dashed-card:nth-child(2) { border-color: rgba(244, 215, 88, 0.6); }
.chair-dashed-card:nth-child(3) { border-color: rgba(249, 115, 22, 0.35); }
.chair-dashed-card:nth-child(4) { border-color: rgba(43, 127, 216, 0.35); }
.chair-dashed-card:nth-child(5) { border-color: rgba(244, 215, 88, 0.6); }
.chair-dashed-card:nth-child(6) { border-color: rgba(249, 115, 22, 0.35); }
.chair-label {
  position: absolute;
  top: -10px;
  left: 16px;
  font-family: 'Caveat', cursive;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--cream-dark);
  padding: 0 8px;
  color: var(--orange);
}
.chair-dashed-card h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 8px 0;
}
.chair-dashed-card p {
  font-size: 0.85rem;
  color: var(--ink-light);
  line-height: 1.7;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.skill-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.68rem;
  background: var(--cream-dark);
  color: var(--ink-light);
}

/* === CONTACT: Dark panel + CTA === */
.dark-section {
  background: var(--dark-panel);
  color: #e2e8f0;
  padding: clamp(80px, 12vh, 160px) 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(48px, 8vw, 96px);
  align-items: stretch;
  max-width: 1040px;
  margin: 0 auto;
}

.contact-split-label {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-soft);
  margin-bottom: 0.75rem;
}

.contact-split-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
  color: #fefcf6;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.contact-split-desc {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  max-width: none;
}

.contact-download-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  border-width: 20px;
}

.contact-download-card .contact-download-actions {
  width: 100%;
  max-width: none;
  margin-top: auto;
}

.contact-connect-col {
  display: flex;
  flex-direction: column;
}

.contact-resume-col {
  display: flex;
  align-items: stretch;
}

.contact-download-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: min(100%, 320px);
}

.contact-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 14px 24px;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  background: var(--yellow);
  color: var(--ink);
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244, 215, 88, 0.3);
}

.contact-connect-col .contact-info {
  margin-bottom: 1.75rem;
}

.contact-qr-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-top: auto;
}

.contact-qr {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  box-sizing: border-box;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-item .label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--orange-soft);
}
.contact-item a,
.contact-item span,
.contact-item .contact-copy {
  font-size: 1rem;
  color: #fefcf6;
  text-decoration: none;
}

.contact-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: var(--cursor-blob);
  user-select: all;
}

.contact-copy:hover .contact-copy-text,
.contact-copy:focus-visible .contact-copy-text {
  background: var(--yellow);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
}

.contact-copy:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

.contact-copy-hint {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--yellow);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.contact-copy.is-copied .contact-copy-hint {
  opacity: 1;
  transform: translateY(0);
}

.contact-item a:hover {
  background: var(--yellow);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
}
.contact-card {
  background: rgba(255, 255, 255, 0.04);
  border: 40px solid var(--blue-deep);
  border-radius: 16px;
  padding: clamp(28px, 4vw, 44px);
}
.contact-card p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: var(--yellow);
  color: var(--ink);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244, 215, 88, 0.3);
}

/* Contact message modal */
.message-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.message-modal[hidden] {
  display: none;
}

.message-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 24, 33, 0.72);
  backdrop-filter: blur(4px);
}

.message-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: var(--cream);
  color: var(--ink);
  border-radius: 16px;
  border: 4px solid var(--blue-deep);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  padding: clamp(1.5rem, 4vw, 2rem);
}

.message-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: var(--cursor-blob);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.message-modal__title {
  font-family: 'Noto Serif SC', serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--blue-deep);
  margin: 0 0 0.25rem;
}

.message-modal__sub {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--orange);
  margin: 0 0 1.25rem;
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.message-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-light);
}

.message-field input,
.message-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid rgba(26, 26, 46, 0.14);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.message-field input:focus,
.message-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: transparent;
}

.message-form__submit {
  margin-top: 0.35rem;
  justify-content: center;
  cursor: var(--cursor-blob);
}

body.message-modal-open {
  overflow: hidden;
}

/* === Scroll reveal === */
.reveal-anim {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-anim.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* === Footer === */
.site-footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
  border-top: 1px solid rgba(26, 26, 46, 0.06);
}
.site-footer a {
  color: var(--blue-deep);
  text-decoration: none;
}
.site-footer a:hover {
  background: var(--yellow);
  padding: 2px 4px;
  border-radius: 3px;
}

/* === Responsive === */
@media (max-width: 900px) {
  #skills,
  #about,
  #contact {
    scroll-margin-top: 56px;
  }

  .section {
    padding: clamp(48px, 8vh, 88px) 0;
  }

  .section-header {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  }

  .site-nav {
    padding: 0 0.7rem 0 0.85rem;
    gap: 0.35rem;
  }
  .nav-brand {
    font-size: 0.84rem;
    flex-shrink: 0;
  }
  .nav-links {
    gap: 0;
    min-width: 0;
    overflow-x: auto;
    flex-shrink: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    padding: 6px 8px;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .section--about {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 1.35rem 1.25rem 2.25rem;
  }
  .about-side {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
  }
  .about-title-stack {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }
  .about-center,
  .about-center.is-story {
    width: 100%;
    max-width: none;
    margin-top: 1.15rem;
    transform: none;
    text-align: left;
  }
  .about-center.reveal-anim:not(.visible) {
    transform: translateY(24px);
  }
  .about-center.reveal-anim.visible,
  .about-center.is-story.visible {
    transform: none;
  }
  .about-story {
    max-width: none;
  }
  .about-story-p {
    font-size: clamp(0.88rem, 3.6vw, 0.95rem);
  }
  .about-typing.typing-container {
    font-size: clamp(1.05rem, 4vw, 1.25rem);
  }
  .about-photo-cutout {
    align-self: center;
    width: min(68vw, 260px);
    height: auto;
    max-width: min(68vw, 260px);
    margin: 1.6rem auto 0;
    object-position: bottom center;
  }

  .layout-sticky {
    grid-template-columns: 1fr;
  }
  .sticky-side {
    position: static;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .flip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .chair-dashed-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .contact-resume-col {
    justify-content: flex-start;
  }
  .contact-qr-row {
    flex-wrap: wrap;
  }
  .dark-section {
    padding: clamp(56px, 9vh, 96px) 0;
  }
}

@media (max-width: 600px) {
  .flip-grid,
  .chair-dashed-grid {
    grid-template-columns: 1fr;
  }
  .sparkles-text {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }
  .sparkles-text.about-title-stack {
    font-size: clamp(2rem, 10vw, 2.6rem);
  }
  .skills-tool {
    min-width: 3.1rem;
    height: 3.1rem;
    font-size: 0.68rem;
  }
  .about-photo-cutout {
    width: min(78vw, 240px);
    max-width: min(78vw, 240px);
  }
  .contact-download-btn {
    white-space: normal;
  }
}
