@font-face {
  font-family: "Portfolio Han";
  src: url("assets/noto-sans-sc-portfolio.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
}
/* Homepage art direction: the supplied graphite / ice-blue composition. */
.portfolio-home {
  --paper: #080a0b;
  --white: #121619;
  --ink: #f0f4f7;
  --body: #bdc9d2;
  --muted: #b5c4cf;
  --accent: #c6dfed;
  --accent-dark: #e1eff6;
  --border: #37424b;
  --shell: 1440px;
  --gutter: clamp(20px, 2.7vw, 48px);
  --nav-height: clamp(40px, 4.7vw, 72px);
  --sans: "Portfolio Han", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #080a0b;
  font-weight: 500;
}
.portfolio-home .site-header { position: relative; z-index: 4; background: transparent; }
.portfolio-home .nav { padding-inline: 1.5%; }
.portfolio-home .brand strong { font-size: clamp(15px, 1.8vw, 26px); }
.portfolio-home .nav-links { gap: clamp(16px, 3.1vw, 48px); }
.portfolio-home .nav-links a { font-size: clamp(13px, 1.55vw, 22px); color: var(--body); }
.portfolio-home main { container-type: inline-size; }
.portfolio-home .eyebrow { font-family: var(--sans); font-size: clamp(11px, 1.4cqw, 19px); line-height: 1.3; letter-spacing: .025em; }
.portfolio-home .hero {
  display: block; height: 43.5cqw; min-height: 285px; padding: 0;
  margin-inline: calc(-1 * var(--gutter));
  container-type: normal;
}
.portfolio-home .hero::before {
  content: ''; position: absolute; z-index: -1; inset: 67% 0 0;
  background: #202a33; clip-path: polygon(100% 8%,100% 100%,35% 100%);
}
.hero-name { position: absolute; inset: 0; color: #d4e5f0; font-family: "Portfolio Han", "PingFang SC", sans-serif; font-weight: 900; line-height: 1; letter-spacing: -.07em; -webkit-text-stroke: .035em currentColor; }
.hero-name span { position: absolute; display: block; }
.name-wang { left: 6%; top: -.4%; font-size: 23.5cqw; }
.name-yi { left: 25%; top: 43.8%; width: 46%; height: 3.8cqw; overflow: hidden; font-size: 0; background: #d5e8f2; }
.name-yi::after { content: '一'; font-size: 1px; }
.name-ming { right: 5.5%; top: 37%; font-size: 23.5cqw; }
.portfolio-home .hero-status {
  position: absolute; top: 0; left: 2.5%; writing-mode: vertical-rl; transform: rotate(180deg);
  color: #cad9e3; font: 800 clamp(8px, 1.05cqw, 15px)/1 var(--sans); letter-spacing: -.01em;
}
.portfolio-home .hero-portrait { position: absolute; left: 21%; top: -9%; bottom: auto; translate: none; width: 25%; margin: 0; z-index: 2; }
.portfolio-home .hero-portrait img { width: 100%; }
.hero-message { position: absolute; z-index: 3; top: 6%; left: 48.5%; }
.portfolio-home .hero-role { margin: 0 0 1.2cqw 1.2cqw; font-size: clamp(11px, 1.55cqw, 22px); color: #f0f4f7; font-weight: 700; }
.portfolio-home .hero-headline { color: #080b0d; font-size: clamp(22px, 3.85cqw, 56px); line-height: 1.28; font-weight: 900; letter-spacing: -.055em; -webkit-text-stroke: .018em currentColor; }
.hero-headline span { display: inline-block; padding: 0 2.2cqw 0 1.6cqw; background: #d2e5f0; clip-path: polygon(4% 0,97% 0,100% 18%,95% 100%,0 100%); white-space: nowrap; }
.hero-headline span:last-child { margin-left: -2.2cqw; padding-left: 3.8cqw; }
.portfolio-home .hero-copy { position: absolute; top: 62%; left: 6.5%; width: 64%; max-width: none; font-size: clamp(11px, 1.4cqw, 20px); line-height: 1.7; }
.portfolio-home .hero-intro { margin: 0; }
.portfolio-home .hero-intro p + p { margin-top: .2cqw; }
.portfolio-home .hero-actions { margin-top: 1.2cqw; gap: 1.5cqw; }
.portfolio-home .button { min-height: 44px; padding: .55cqw 1.7cqw; border-radius: 6px; font-size: clamp(12px, 1.45cqw, 20px); gap: 7px; }
.portfolio-home .button-quiet { background: transparent; }
.portfolio-home .hero-actions .button { min-width: 14cqw; }
.portfolio-home .site-section { padding: 2.8cqw 0 0; border: 0; }
.portfolio-home .section-heading { margin-bottom: 1.6cqw; }
.portfolio-home .section-heading h2, .startup-heading { margin: 0; font-size: clamp(28px, 4.15cqw, 58px); font-weight: 850; line-height: 1.15; letter-spacing: -.04em; }
.portfolio-home .strengths { padding: 1.6cqw 1cqw 0; }
.portfolio-home .strengths-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6cqw; }
.portfolio-home .strengths > .strengths-list > li { position: relative; padding: 4.1cqw 2.3cqw 2cqw; min-height: 15.5cqw; border: 1px solid var(--border); border-radius: 10px; background: #121619; }
.portfolio-home .strengths > .strengths-list > li:nth-child(2) { background: #202930; }
.portfolio-home .strengths > .strengths-list > li::before { content: ''; position: absolute; top: 2cqw; left: 2.3cqw; width: 3cqw; height: 4px; background: var(--accent); }
.portfolio-home .strengths-list h3 { font-size: clamp(19px, 2.75cqw, 38px); font-weight: 800; line-height: 1.3; }
.portfolio-home .strengths-list p { font-size: clamp(13px, 1.55cqw, 22px); line-height: 1.65; margin-top: 1cqw; }
.portfolio-home .about { margin-top: 2.3cqw; padding: 2.4cqw 3.1cqw 2.6cqw; border-radius: 12px; background: #202930; }
.portfolio-home .about .section-heading { margin-bottom: 1.3cqw; }
.portfolio-home .about .section-heading h2 { margin-top: 1cqw; }
.portfolio-home .about-copy { max-width: none; font-size: clamp(13px, 1.55cqw, 22px); line-height: 1.85; }
.portfolio-home .about-copy p + p { margin-top: 0; }
.portfolio-home .about-methods { margin-top: 1.8cqw; padding-top: 2cqw; border-top: 1px solid #596773; gap: 2.5cqw; }
.portfolio-home .about-methods li { padding: 0; border-top: 0; }
.portfolio-home .about-methods li + li { padding-left: 2.5cqw; border-left: 1px solid #596773; }
.portfolio-home .about-methods li > .eyebrow { margin: 0 0 1cqw; font-size: clamp(10px, 1.4cqw, 19px); }
.portfolio-home .about-methods h3 { font-size: clamp(15px, 2cqw, 28px); line-height: 1.35; letter-spacing: -.035em; }
.portfolio-home .about-methods li > p:last-child { font-size: clamp(12px, 1.5cqw, 21px); margin-top: 1cqw; }
.portfolio-home #internship { padding-top: 2.7cqw; }
.portfolio-home #internship .section-heading { margin-bottom: .9cqw; padding-left: 1cqw; }
.portfolio-home #projects { padding-top: 1.1cqw; }
.portfolio-home .project-card + .project-card { margin-top: 1.1cqw; }
.portfolio-home .project-card-link { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 1.2cqw 2cqw; padding: 1.4cqw 1.8cqw; border: 1px solid var(--border); border-radius: 13px; background: #121619; align-items: start; }
.portfolio-home .project-card-copy { padding: 0; }
.portfolio-home .internship-card-meta { font-size: clamp(10px, 1.35cqw, 18px); line-height: 1.4; gap: 8px; }
.portfolio-home .internship-card .internship-card-meta > p:last-child { position: absolute; top: 1cqw; right: 1.8cqw; }
.portfolio-home .internship-card-heading h3 { margin: .4cqw 0 .5cqw; font-size: clamp(21px, 3.15cqw, 44px); line-height: 1.2; font-weight: 800; }
.portfolio-home .internship-card-heading .project-role { font-size: clamp(11px, 1.55cqw, 21px); line-height: 1.5; }
.portfolio-home .internship-card-title { margin-top: 1.1cqw; font-size: clamp(16px, 2.1cqw, 30px); line-height: 1.4; font-weight: 800; letter-spacing: -.025em; }
.portfolio-home .internship-card-description { margin-top: .8cqw; font-size: clamp(12px, 1.5cqw, 21px); line-height: 1.65; }
.portfolio-home .internship-card-description + .internship-card-description { margin-top: .3cqw; }
.portfolio-home .internship-card-tools { gap: .65cqw; margin-top: 1.2cqw; }
.portfolio-home .internship-card-tools li { padding: .05cqw .7cqw; font-size: clamp(9px, 1.15cqw, 16px); background: #20262c; color: #d0dbe2; line-height: 1.65; }
.card-screenshot { position: relative; grid-column: 2; grid-row: 1 / 3; align-self: center; overflow: hidden; border: 1px solid #65717c; border-radius: 10px; }
.card-screenshot img { width: 100%; height: auto; }
.internship-card-screenshot { margin-top: 1.6cqw; }
.internship-card-screenshot img { mix-blend-mode: screen; }
.case-image-badge { position: absolute; top: .7cqw; right: .8cqw; padding: .1cqw .8cqw; border-radius: 100px; background: #3456a8; color: white; font-size: clamp(10px, 1.3cqw, 18px); font-weight: 700; }
.portfolio-home .internship-card-results { display: flex; gap: 1.6cqw; }
.portfolio-home .internship-card-results > div { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: .1cqw 1.3cqw; padding: 0; border-radius: 0; background: none; align-content: center; }
.portfolio-home .internship-card-results > div + div { border-left: 1px solid #65717c; padding-left: 1.6cqw; }
.portfolio-home .internship-card-results .internship-card-number { grid-column: 1; grid-row: 1 / 3; margin: 0; align-self: center; color: #f0f4f7; font-size: clamp(25px, 3.8cqw, 54px); line-height: 1.1; letter-spacing: -.04em; white-space: nowrap; }
.portfolio-home .internship-card-results dt { grid-column: 2; font-size: clamp(9px, 1.2cqw, 17px); line-height: 1.5; color: #e1e9ef; }
.portfolio-home .internship-card-results dd:not(.internship-card-number) { grid-column: 2; font-size: clamp(8px, 1.1cqw, 15px); line-height: 1.5; }
.portfolio-home .project-action { display: inline-flex; width: fit-content; min-height: 36px; margin-top: 1.2cqw; padding: .3cqw 1.2cqw; border-radius: 5px; background: var(--accent); color: #0b1318; font-size: clamp(12px, 1.5cqw, 20px); line-height: 1.3; }
.startup-heading { font-size: clamp(26px, 3.5cqw, 48px); }
.portfolio-home .topan-card .internship-card-heading h3 { font-size: clamp(18px, 2.6cqw, 36px); }
.topan-card-screenshot { grid-row: 1; width: 115%; margin-left: -15%; margin-top: 1.6cqw; }
.portfolio-home .topan-card .project-card-copy { padding-right: 3cqw; }
.portfolio-home .topan-card .project-card-footer { grid-column: 1 / -1; }
.portfolio-home .topan-card .internship-card-results { gap: 3cqw; }
.portfolio-home .topan-card .internship-card-results > div + div { margin-left: 1cqw; padding-left: 3cqw; }
.portfolio-home .rehab-card .internship-card-heading h3 { font-size: clamp(18px, 2.65cqw, 37px); }
.portfolio-home .rehab-card .internship-card-meta > p:last-child { display: none; }
.portfolio-home .rehab-card-award { font-size: clamp(10px, 1.2cqw, 17px); margin-top: .8cqw; }
.portfolio-home .rehab-card-screenshot { margin-top: 1.4cqw; }
.portfolio-home .beyond-work { padding: 2.5cqw 1.6cqw 0; }

.beyond-heading { position: absolute; inset: 0 auto auto 0; width: 100%; margin: 0; }
.portfolio-home .beyond-heading h2 { margin: 0; width: fit-content; font: 900 11.3cqw/.95 Kanit, sans-serif; letter-spacing: -.045em; color: #d6eaf6; transform: scaleX(.72); transform-origin: left top; }
.portfolio-home .beyond-heading > p { position: absolute; left: 28%; top: .1cqw; margin: 0; color: var(--body); font-size: clamp(14px, 2cqw, 28px); font-weight: 750; }

.portfolio-home .site-footer { margin-inline: var(--gutter); }
.portfolio-home .footer-row { width: 100%; min-height: clamp(46px, 5vw, 72px); font-size: clamp(12px, 1.5vw, 20px); }
@media (min-width: 1600px) {
  .portfolio-home .hero { margin-inline: -40px; }
}
@media (max-width: 600px) {
  .portfolio-home { --gutter: 18px; --nav-height: 60px; }
  .portfolio-home .nav { width: calc(100% - 28px); padding: 0; gap: 8px; }
  .portfolio-home .brand strong { font-size: 17px; }
  .portfolio-home .nav-links { gap: 4px; }
  .portfolio-home .nav-links a { font-size: 12px; min-width: 34px; padding-inline: 3px; }
  .portfolio-home .hero { height: 510px; min-height: 0; }
  .hero-name { -webkit-text-stroke: .025em currentColor; }
  .name-wang { left: 7%; top: 1%; font-size: 33cqw; }
  .name-yi { top: 30%; left: 29%; width: 40%; height: 3.8cqw; }
  .name-ming { top: 22%; right: 6%; font-size: 31cqw; }
  .portfolio-home .hero-portrait { left: 29%; top: 0; width: 34%; }
  .portfolio-home .hero-status { font-size: 8px; left: 3%; top: 2%; }
  .hero-message { left: 8%; top: 44%; }
  .portfolio-home .hero-role { font-size: 12px; margin: 0 0 8px; }
  .portfolio-home .hero-headline { font-size: clamp(20px, 6.8cqw, 34px); line-height: 1.4; }
  .hero-headline span { padding-inline: 12px 20px; }
  .hero-headline span:last-child { padding-left: 20px; }
  .portfolio-home .hero-copy { top: auto; bottom: 14px; left: 8%; width: 84%; font-size: 12px; }
  .portfolio-home .hero-intro br { display: none; }
  .portfolio-home .hero-actions { margin-top: 13px; gap: 10px; }
  .portfolio-home .hero-actions .button { padding-inline: 12px; font-size: 12px; }
  .portfolio-home .strengths { padding: 24px 0 0; }
  .portfolio-home .section-heading { margin-bottom: 15px; }
  .portfolio-home .section-heading h2 { font-size: 29px; }
  .portfolio-home .strengths-list { grid-template-columns: 1fr; gap: 10px; }
  .portfolio-home .strengths > .strengths-list > li { padding: 22px 20px 18px; min-height: 0; }
  .portfolio-home .strengths > .strengths-list > li::before { width: 22px; height: 3px; top: 12px; left: 20px; }
  .portfolio-home .strengths-list h3 { font-size: 21px; }
  .portfolio-home .strengths-list p { font-size: 14px; margin-top: 6px; }
  .portfolio-home .about { margin-top: 18px; padding: 24px 20px; }
  .portfolio-home .about .section-heading h2 { margin-top: 10px; font-size: 27px; }
  .portfolio-home .about-copy { font-size: 14px; }
  .portfolio-home .about-methods { padding-top: 16px; margin-top: 18px; gap: 18px; }
  .portfolio-home .about-methods li + li { border-left: 0; border-top: 1px solid #53616d; padding: 16px 0 0; }
  .portfolio-home .about-methods li > .eyebrow { font-size: 11px; margin-bottom: 8px; }
  .portfolio-home .about-methods h3 { font-size: 18px; }
  .portfolio-home .about-methods li > p:last-child { font-size: 14px; }
  .portfolio-home #internship { padding-top: 28px; }
  .portfolio-home #internship .section-heading { margin-bottom: 14px; }
  .portfolio-home #projects { padding-top: 14px; }
  .portfolio-home .project-card + .project-card { margin-top: 14px; }
  .portfolio-home .project-card-link { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .portfolio-home .internship-card-meta { font-size: 10px; }
  .portfolio-home .internship-card .internship-card-meta > p:last-child { position: static; }
  .portfolio-home .internship-card-heading h3 { font-size: 25px; margin-block: 7px; }
  .portfolio-home .internship-card-heading .project-role { font-size: 12px; }
  .portfolio-home .internship-card-title { margin-top: 14px; font-size: 19px; }
  .portfolio-home .internship-card-description { margin-top: 9px; font-size: 14px; }
  .portfolio-home .internship-card-tools { margin-top: 12px; gap: 5px; }
  .portfolio-home .internship-card-tools li { font-size: 10px; padding: 2px 7px; }
  .card-screenshot { grid-column: 1; grid-row: 2; width: 100%; margin: 0; max-height: none; }
  .portfolio-home .project-card-footer { grid-column: 1; grid-row: 3; }
  .portfolio-home .internship-card-results { gap: 10px; flex-wrap: wrap; }
  .portfolio-home .internship-card-results > div { gap: 2px 8px; }
  .portfolio-home .internship-card-results > div + div { padding-left: 10px; }
  .portfolio-home .internship-card-results .internship-card-number { font-size: 29px; }
  .portfolio-home .internship-card-results dt { font-size: 10px; }
  .portfolio-home .internship-card-results dd:not(.internship-card-number) { font-size: 9px; }
  .portfolio-home .project-action { min-height: 44px; margin-top: 14px; padding: 6px 12px; font-size: 13px; }
  .startup-heading { font-size: 28px; margin-top: 4px; }
  .portfolio-home .topan-card .project-card-copy { padding: 0; }
  .portfolio-home .topan-card .internship-card-heading h3, .portfolio-home .rehab-card .internship-card-heading h3 { font-size: 23px; }
  .portfolio-home .topan-card .internship-card-results > div + div { margin: 0; padding-left: 10px; }
  .portfolio-home .topan-card .internship-card-results { gap: 12px; }
  .portfolio-home .rehab-card-award { font-size: 11px; margin-top: 9px; }
  .case-image-badge { top: 7px; right: 8px; padding: 2px 8px; }
  .portfolio-home .beyond-work { padding: 26px 0 0; }

  .portfolio-home .beyond-heading h2 { font-size: 64px; }
  .portfolio-home .beyond-heading > p { left: 43%; top: 4px; font-size: 15px; }

}
/* Override the previous homepage's max-content heading geometry. */
.portfolio-home .hero h1 { width: auto; height: auto; font-size: inherit; line-height: 1; white-space: normal; }
@media (min-width: 601px) {
  .portfolio-home .hero { min-height: 0; }
  .portfolio-home .name-wang { top: -4.5%; font-size: 22.5cqw; }
  .portfolio-home .name-yi { top: 47.5%; }
  .portfolio-home .hero-portrait { top: -7%; }
  .portfolio-home .hero-copy { font-size: clamp(10px, 1.4cqw, 20px); }
  .portfolio-home .hero-headline { font-size: clamp(22px, 3.85cqw, 56px); }
  .portfolio-home .button { min-height: clamp(26px, 3.65cqw, 52px); font-size: clamp(11px, 1.45cqw, 20px); }
  .portfolio-home .strengths-list p, .portfolio-home .about-copy { font-size: clamp(11px, 1.55cqw, 22px); }
  .portfolio-home .about-methods li > p:last-child { font-size: clamp(10px, 1.5cqw, 21px); }
  .portfolio-home .about-methods h3 { font-size: clamp(13px, 2cqw, 28px); }
  .portfolio-home .internship-card-description { font-size: clamp(10px, 1.5cqw, 21px); }
  .portfolio-home .internship-card-heading .project-role { font-size: clamp(10px, 1.55cqw, 21px); }
  .portfolio-home .internship-card-title { font-size: clamp(13px, 2.1cqw, 30px); }
  .portfolio-home .internship-card-heading h3 { font-size: clamp(21px, 3.15cqw, 44px); }
  .portfolio-home .project-action { min-height: clamp(22px, 3cqw, 44px); font-size: clamp(10px, 1.5cqw, 20px); }
  .portfolio-home .internship-card-tools { gap: .55cqw; }
  .portfolio-home .internship-card-tools li { font-size: clamp(8px, 1.15cqw, 16px); padding-inline: .65cqw; }
  .portfolio-home .topan-card-screenshot { aspect-ratio: 1.95; }
  .portfolio-home .topan-card-screenshot img { height: 100%; object-fit: cover; object-position: top; }
  .portfolio-home .rehab-card-screenshot { aspect-ratio: 1.55; }
  .portfolio-home .rehab-card-screenshot img { height: 100%; object-fit: cover; transform: scale(1.22); }
  .portfolio-home .rehab-card-award { font-size: clamp(8px, 1.2cqw, 17px); }

}
.portfolio-home h2, .portfolio-home h3 { -webkit-text-stroke: .012em currentColor; }
.portfolio-home .beyond-heading h2 { font-family: Impact, "Arial Narrow", Kanit, sans-serif; font-weight: 900; font-size: 13.5cqw; transform: scaleX(.6); }
@media (min-width: 601px) {
  .portfolio-home .hero-portrait { top: -12%; }
  .portfolio-home .internship-card-screenshot { aspect-ratio: 1.4; }
  .portfolio-home .internship-card-screenshot img { height: 100%; object-fit: contain; }
  .portfolio-home .internship-card-link { column-gap: 1.4cqw; }
  .portfolio-home .internship-card-title { font-size: clamp(13px, 1.96cqw, 28px); }
  .portfolio-home .internship-card-description { font-size: clamp(10px, 1.44cqw, 20px); }
  .portfolio-home .rehab-card .internship-card-description { font-size: clamp(9px, 1.38cqw, 19px); line-height: 1.55; }
  .portfolio-home .internship-card-heading .project-role { font-size: clamp(10px, 1.48cqw, 20px); }
  .portfolio-home .internship-card-tools { margin-top: .9cqw; }
  .portfolio-home .beyond-heading h2 { font-size: 13.5cqw; }
}
@media (max-width: 600px) {
  .portfolio-home .beyond-heading h2 { font-size: 64px; }
  .portfolio-home .internship-card-results { gap: 12px; }
  .portfolio-home .internship-card-results > div + div { border: 0; padding-left: 0; }
}

@media (min-width: 601px) {
  .portfolio-home .topan-card .project-card-link { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .portfolio-home .topan-card .project-card-copy { padding-right: 0; }
  .portfolio-home .topan-card-screenshot { width: 100%; margin-left: 0; }
}

.portfolio-home .hero-name { -webkit-text-stroke: .012em currentColor; }
.portfolio-home h2, .portfolio-home h3 { font-weight: 900; -webkit-text-stroke: 0; }

/* Revision 2: quiet supporting sections, consistent case structure, uncropped interests. */
.portfolio-home .hero-portrait { width: 23%; left: 22%; top: -7.5%; }
.portfolio-home .about { background: #171e24; padding-block: 2cqw; }
.portfolio-home .about .section-heading h2 { font-size: clamp(24px, 3.25cqw, 46px); }
.portfolio-home .about-copy { max-width: 88ch; }
.portfolio-home .about-methods { border-color: #3d4a54; }
.portfolio-home .about-methods li + li { border-color: #3d4a54; }
.portfolio-home #projects { padding-top: 2.7cqw; }
.portfolio-home .experience > .section-heading { padding-left: 1cqw; margin-bottom: 1.2cqw; }
.portfolio-home .project-card-link,
.portfolio-home .topan-card .project-card-link {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(24px, 3.3cqw, 48px);
  row-gap: 1.6cqw;
  padding: 1.6cqw 2cqw;
  align-items: start;
}
.portfolio-home .topan-card .project-card-copy { padding: 0; }
.portfolio-home .internship-card .internship-card-meta > p:last-child { top: 1.3cqw; right: 2cqw; }
.portfolio-home .card-screenshot { grid-column: 2; grid-row: 1; width: 100%; margin: 1.5cqw 0 0; border: 0; background: transparent; border-radius: 0; aspect-ratio: auto; overflow: visible; align-self: center; }
.card-screenshot figcaption { margin-bottom: .7cqw; color: var(--muted); font-size: clamp(10px, 1.25cqw, 17px); line-height: 1.4; }
.screenshot-frame { overflow: hidden; border: 1px solid #4d5b66; border-radius: 9px; background: #1b2228; aspect-ratio: 1.9; }
.portfolio-home .card-screenshot img { width: 100%; height: 100%; object-fit: contain; transform: none; mix-blend-mode: normal; }
.portfolio-home .topan-card-screenshot .screenshot-frame { padding: 1cqw; }
.portfolio-home .topan-card-screenshot img { object-fit: cover; object-position: center top; border-radius: 5px; }
.portfolio-home .rehab-card-screenshot img { object-fit: contain; }
.portfolio-home .project-card-footer, .portfolio-home .topan-card .project-card-footer {
  grid-column: 1 / -1; grid-row: 2; display: grid;
  grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5cqw 2cqw;
  padding-top: 1.2cqw; border-top: 1px solid #29333b;
}
.portfolio-home .project-card-footer .internship-card-results { grid-column: 1; grid-row: 1; gap: 2cqw; }
.portfolio-home .project-card-footer .internship-card-results > div + div { margin-left: 0; padding-left: 2cqw; }
.portfolio-home .project-card-footer .project-action { grid-column: 2; grid-row: 1 / 3; margin: 0; justify-self: end; white-space: nowrap; }
.portfolio-home .project-card-footer .rehab-card-award { grid-column: 1; grid-row: 2; margin: 0; }
.portfolio-home .beyond-work { padding-top: 3.7cqw; }
.portfolio-home .beyond-heading { position: static; display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 0 0 2cqw; width: auto; }
.portfolio-home .beyond-heading h2 { font-family: Impact, "Arial Narrow", Kanit, sans-serif; font-size: clamp(52px, 8.4cqw, 116px); line-height: 1; letter-spacing: -.025em; transform: none; white-space: nowrap; }
.portfolio-home .beyond-heading h2 span { color: #b8ccda; }
.portfolio-home .beyond-heading > p { position: static; margin: 0; font-size: clamp(14px, 1.8cqw, 24px); white-space: nowrap; }

@media (max-width: 800px) and (min-width: 601px) {
  .portfolio-home .project-card-link, .portfolio-home .topan-card .project-card-link { column-gap: 2cqw; }
  .portfolio-home .project-card-footer { grid-template-columns: 1fr; gap: 10px; }
  .portfolio-home .project-card-footer .project-action { grid-column: 1; grid-row: 3; justify-self: end; min-height: 36px; }

}
@media (max-width: 600px) {
  .portfolio-home .hero-portrait { width: 31%; left: 30.5%; top: 2.2%; }
  .portfolio-home .about { padding: 22px 20px; }
  .portfolio-home .about .section-heading h2 { font-size: 25px; }
  .portfolio-home #projects { padding-top: 28px; }
  .portfolio-home .experience > .section-heading { padding-left: 0; margin-bottom: 14px; }
  .portfolio-home .project-card-link, .portfolio-home .topan-card .project-card-link { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 18px; padding: 18px; }
  .portfolio-home .card-screenshot { grid-column: 1; grid-row: 2; margin: 0; }
  .card-screenshot figcaption { margin-bottom: 8px; font-size: 12px; }
  .screenshot-frame { aspect-ratio: 1.4; }
  .portfolio-home .topan-card-screenshot .screenshot-frame { padding: 8px; }
  .portfolio-home .topan-card-screenshot img { object-fit: contain; }
  .portfolio-home .project-card-footer, .portfolio-home .topan-card .project-card-footer { grid-column: 1; grid-row: 3; grid-template-columns: 1fr; gap: 12px; padding-top: 14px; }
  .portfolio-home .project-card-footer .internship-card-results { gap: 14px; }
  .portfolio-home .project-card-footer .internship-card-results > div + div { padding-left: 0; }
  .portfolio-home .project-card-footer .project-action { grid-column: 1; grid-row: 3; justify-self: end; min-height: 44px; }
  .portfolio-home .project-card-footer .rehab-card-award { margin: 0; }
  .portfolio-home .beyond-work { padding-top: 32px; }
  .portfolio-home .beyond-heading { display: block; margin-bottom: 18px; }
  .portfolio-home .beyond-heading h2 { font-size: clamp(43px, 12cqw, 64px); }
  .portfolio-home .beyond-heading > p { margin-top: 10px; font-size: 15px; }

}
.portfolio-home .beyond-heading h2 { display: flex; gap: .16em; }

/* A single, user-driven loop. Cards keep their own image proportions. */
.photo-loop { --photo-height: clamp(210px, 24cqw, 340px); --photo-gap: clamp(14px, 1.8cqw, 26px); min-width: 0; }
.loop-viewport { overflow-x: auto; overflow-y: hidden; width: 100%; padding-block: 14px 22px; scrollbar-width: none; overscroll-behavior-x: contain; overflow-anchor: none; scroll-behavior: auto; }
.loop-viewport::-webkit-scrollbar { display: none; }
.loop-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 7px; }
.loop-track { position: relative; display: flex; align-items: center; width: max-content; gap: var(--photo-gap); padding-block: 10px; overflow-anchor: none; }
.loop-photo { position: relative; display: block; flex: 0 0 auto; width: calc(var(--photo-height) * var(--photo-ratio)); height: var(--photo-height); overflow: hidden; overflow-anchor: none; border-radius: 7px; background: #131a1f; transform: perspective(1100px) translateY(var(--lift, 0px)) rotateY(var(--turn, 0deg)) scale(var(--photo-scale, 1)); transform-origin: center; }
.loop-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--photo-focus, center); user-select: none; -webkit-user-drag: none; }
.loop-photo[data-viewer]::after { display: none; }
.loop-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: -4px; }
.loop-controls { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }
.loop-control { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #465460; border-radius: 50%; background: #172129; color: var(--accent-dark); cursor: pointer; }
.loop-control .icon { width: 21px; height: 21px; }
.loop-control[data-loop-prev] .icon { transform: rotate(-135deg); }
.loop-control[data-loop-next] .icon { transform: rotate(45deg); }
.loop-control:hover { background: #2b3b47; }
@media (max-width: 600px) {
  .photo-loop { --photo-height: clamp(190px, 60cqw, 250px); --photo-gap: 14px; }
  .loop-viewport { padding-block: 8px 18px; }
  .loop-controls { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .loop-photo { transform: none; }
}

/* Text-led contact block; all channels share the same copy interaction. */
.portfolio-home .contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; gap: 4cqw; padding: 4cqw 1.6cqw 2cqw; }
.portfolio-home .contact-intro h2 { margin-top: 0; font-size: clamp(30px, 4cqw, 58px); line-height: 1.2; }
.portfolio-home .contact-lede { margin-top: 12px; color: var(--body); font-size: clamp(14px, 1.6cqw, 22px); }
.portfolio-home .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.portfolio-home .contact-actions .button { min-height: 44px; padding: 8px 16px; font-size: clamp(13px, 1.3cqw, 18px); }
.portfolio-home .contact-channels { min-width: 0; }
.portfolio-home .contact-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.portfolio-home .contact-method { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 88px; padding: 16px 18px; border: 1px solid #303d47; border-radius: 10px; background: #141c22; }
.portfolio-home .contact-primary { background: #202a32; }
.portfolio-home .contact-icon { width: 22px; height: 22px; margin: 0; color: var(--accent); }
.portfolio-home .contact-details { display: block; min-height: 0; }
.portfolio-home .contact-label { display: block; color: var(--body); font-size: 13px; line-height: 1.4; }
.portfolio-home .contact-value { display: block; margin-top: 4px; font-size: clamp(16px, 1.85cqw, 26px); font-weight: 700; line-height: 1.4; letter-spacing: -.015em; }
.portfolio-home .contact-copy { display: inline-flex; justify-content: center; align-items: center; gap: 7px; width: 92px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 6px; background: var(--accent); color: #111c24; font-size: 14px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.portfolio-home .contact-copy:hover { background: var(--accent-dark); }
.portfolio-home .contact-feedback { min-height: 0; margin: 0; }
@media (max-width: 800px) {
  .portfolio-home .contact { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
}
@media (max-width: 600px) {
  .portfolio-home .contact { padding-inline: 0; padding-bottom: 12px; }
  .portfolio-home .contact-intro h2 { margin-top: 0; font-size: 32px; }
  .portfolio-home .contact-lede { font-size: 14px; }
  .portfolio-home .contact-actions { margin-top: 18px; }
  .portfolio-home .contact-method { grid-template-columns: 20px minmax(0, 1fr); gap: 8px 12px; padding: 14px; }
  .portfolio-home .contact-value { font-size: clamp(16px, 5cqw, 20px); }
  .portfolio-home .contact-copy { grid-column: 2; justify-self: end; }
  .portfolio-home .contact-icon { width: 19px; height: 19px; align-self: start; margin-top: 2px; }
}

/* The opening layers replay when the hero returns to the viewport. */
@media (prefers-reduced-motion: no-preference) {
  body.portfolio-home .nav { --entry-y: -10px; animation: page-arrive .55s ease-out both; }
  .portfolio-home .hero h1 { --entry-y: 34px; animation: page-arrive .9s .06s cubic-bezier(.22, .7, .25, 1) both; }
  .portfolio-home .hero-status { animation: section-fade .75s .12s ease both; }
  .portfolio-home .hero-message { --entry-y: 28px; animation: page-arrive .85s .18s cubic-bezier(.22, .7, .25, 1) both; }
  .portfolio-home .hero-portrait { --entry-y: 38px; animation: page-arrive 1s .26s cubic-bezier(.22, .7, .25, 1) both; }
  .portfolio-home .hero-copy { --entry-y: 30px; animation: page-arrive .85s .34s cubic-bezier(.22, .7, .25, 1) both; }
  .portfolio-home .hero.reveal-pending > * { animation: none; }
  .portfolio-home .hero.reveal-instant > * { animation: none; opacity: 1; transform: none; }
}
