/* PotoDesign homepage extension. Inherit the approved blue/silver world.
   The local reading measure and section rhythm derive from existing spacing. */
body.portfolio-page { overflow-x: clip; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--poto-blue-light) var(--poto-year-ink); }
body.portfolio-page.is-opening { overflow-y: hidden; }
.portfolio-page { --story-width: calc(36rem * 2); --story-section-space: calc(var(--poto-space-xxl) * 3); }
.portfolio-page .rings-background { touch-action: pan-y; }
.portfolio-story { position: relative; background: var(--reference-dark); color: var(--poto-paper); padding-top: var(--poto-space-lg); }
.story-nav { position: sticky; z-index: 8; top: var(--poto-space-md); display: flex; justify-content: center; align-items: center; gap: var(--poto-space-lg); width: max-content; max-width: calc(100% - var(--poto-space-xl)); margin: 0 auto; padding: var(--poto-space-sm) var(--poto-space-lg); border-radius: var(--poto-space-xxl); background: var(--poto-glass); box-shadow: var(--poto-shadow); backdrop-filter: blur(var(--poto-glass-blur)); -webkit-backdrop-filter: blur(var(--poto-glass-blur)); overflow-x: auto; scrollbar-width: thin; }
.story-nav a { flex-shrink: 0; display: flex; align-items: center; min-height: var(--poto-control-height); font-size: .8125rem; text-decoration: none; text-underline-offset: var(--poto-space-sm); }
.story-nav a:first-child { font-weight: 600; }
.story-nav img { display: block; width: auto; height: calc(var(--poto-control-height) * .4); }
.story-nav a:is(:hover, :focus-visible, [aria-current='location']) { text-decoration: underline; }
.story-section { width: min(var(--story-width), calc(100% - var(--poto-space-xl) * 2)); margin-inline: auto; padding-block: var(--story-section-space); scroll-margin-top: calc(var(--poto-control-height) + var(--poto-space-xl) * 2); }
.story-display { margin: 0; font-family: 'Poto Display', Georgia, serif; font-size: clamp(3rem, 7.5vw, 6rem); font-weight: 300; font-synthesis: none; line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
.story-lead { max-width: 36rem; margin: var(--poto-space-xl) 0 0; color: var(--poto-glass-muted); font-size: 1.125rem; line-height: 1.6; text-wrap: pretty; }
.experience-section { min-height: 140dvh; padding-top: calc(var(--poto-space-xxl) * 2); }
.experience-sticky { position: sticky; top: calc(var(--poto-control-height) + var(--poto-space-xl) * 2); padding-bottom: var(--poto-space-xxl); }
.experience-detail { max-width: 34rem; margin: var(--poto-space-lg) 0 var(--poto-space-xl); color: var(--poto-glass-muted); font-size: .9375rem; line-height: 1.7; }
.story-word { display: inline-block; white-space: nowrap; }
.toolkit-section > .story-display, .toolkit-section > .story-lead { text-align: center; margin-inline: auto; }
.toolkit-groups { margin-top: calc(var(--poto-space-xxl) * 2); display: grid; gap: calc(var(--poto-space-xxl) * 2); }
.toolkit-group h3 { margin: 0 0 var(--poto-space-lg); font-weight: 400; font-size: 1.125rem; text-align: center; }
.toolkit-deck { display: flex; gap: var(--poto-space-lg); }
.toolkit-card { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; min-height: calc(var(--poto-space-xxl) * 7); padding: var(--poto-space-xl); border-radius: var(--poto-card-radius); background: var(--poto-blue-deep); box-shadow: 0 12px 32px rgb(5 18 34 / .2); transition: transform var(--poto-reveal) var(--poto-ease), background var(--poto-reveal) var(--poto-ease); }
.toolkit-card:nth-child(2) { background: var(--poto-blue-mid); }
.toolkit-card:nth-child(3) { background: var(--poto-glass); }
.toolkit-card:hover { transform: translateY(calc(var(--poto-space-sm) * -1)); }
.toolkit-card h4 { margin: 0; font-family: 'Poto Display', Georgia, serif; font-size: clamp(2.25rem, 3.5vw, 3.25rem); line-height: 1.05; font-weight: 300; letter-spacing: -.02em; }
.toolkit-card p { margin: var(--poto-space-xxl) 0 0; font-size: .875rem; line-height: 1.6; color: var(--poto-paper); }
.project-list { position: relative; margin-top: var(--poto-space-xxl); }
.project-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 18rem var(--poto-space-xl); gap: var(--poto-space-xl); align-items: center; min-height: calc(var(--poto-space-xxl) * 4); padding-block: var(--poto-space-xl); text-decoration: none; cursor: pointer; list-style: none; }
.project-row::-webkit-details-marker { display: none; }
.project-name { font-family: 'Poto Display', Georgia, serif; font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 300; line-height: 1.1; transition: transform var(--poto-reveal) var(--poto-ease); }
.project-description { color: var(--poto-glass-muted); font-size: .875rem; line-height: 1.6; }
.project-row .action-icon { width: var(--poto-space-lg); height: var(--poto-space-lg); }
.project-preview { position: absolute; z-index: 2; right: 25%; top: 50%; width: min(25rem, 44%); aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--poto-control-radius); box-shadow: var(--poto-shadow); opacity: 0; transform: translateY(-40%) rotate(-3deg) scale(.94); pointer-events: none; transition: opacity var(--poto-reveal) var(--poto-ease), transform var(--poto-reveal) var(--poto-ease); }
.project-row:is(:hover, :focus-visible) .project-preview { opacity: 1; transform: translateY(-50%) rotate(-3deg) scale(1); }
.project-row:is(:hover, :focus-visible) .project-name { transform: translateX(var(--poto-space-sm)); }
.project-study[open] .project-row .action-icon { transform: rotate(90deg); }
.project-study-content { display: grid; grid-template-columns: 2fr 1fr; gap: var(--poto-space-xl); align-items: center; padding-bottom: var(--poto-space-xxl); }
.project-study-content img { display: block; width: 100%; border-radius: var(--poto-control-radius); }
.project-study-content p { color: var(--poto-glass-muted); font-size: .9375rem; line-height: 1.7; }
.archive-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: var(--poto-space-lg); margin-top: calc(var(--poto-space-xxl) * 2); }
.archive-gallery figure { margin: 0; }
.archive-gallery figure:nth-child(2) { margin-top: var(--poto-space-xxl); }
.archive-gallery figure:nth-child(3) { margin-top: calc(var(--poto-space-xxl) * 2); }
.archive-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--poto-control-radius); }
.archive-gallery figcaption { color: var(--poto-glass-muted); margin-top: var(--poto-space-md); font-size: .8125rem; line-height: 1.5; }
.notes-list { max-width: 48rem; margin-top: var(--poto-space-xxl); }
.notes-list details { padding-block: var(--poto-space-lg); }
.notes-list summary { min-height: var(--poto-control-height); font-size: 1.25rem; cursor: pointer; }
.notes-list p { margin: var(--poto-space-md) 0 0; font-size: 1rem; line-height: 1.7; color: var(--poto-glass-muted); max-width: 65ch; }
.contact-section { min-height: 85dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.contact-section .story-lead { margin-inline: auto; }
.contact-disclosure { margin-top: var(--poto-space-xxl); }
.contact-disclosure summary { list-style: none; }
.contact-disclosure summary::-webkit-details-marker { display: none; }
.contact-disclosure p { color: var(--poto-glass-muted); font-size: .875rem; }
.story-footer { display: flex; justify-content: space-between; gap: var(--poto-space-lg); width: 100%; margin-top: calc(var(--poto-space-xxl) * 3); color: var(--poto-glass-muted); font-size: .75rem; line-height: 1.5; }
.story-footer a { color: var(--poto-paper); }
.is-reading-story .preview-controls { visibility: hidden; pointer-events: none; }
/* The first toolkit deck and both project names fit a desktop reading frame. */
@media (min-width: 601px) {
  .toolkit-section, .project-section { --story-section-space: calc(var(--poto-space-xxl) * 2); }
  .toolkit-section .story-display, .project-section .story-display { font-size: clamp(3rem, 6vw, 4.5rem); }
  .toolkit-groups { margin-top: var(--poto-space-xxl); }
  .toolkit-card { min-height: calc(var(--poto-space-xxl) * 5); }
  .project-row { min-height: calc(var(--poto-space-xxl) * 3); }
}
@media (max-width: 900px) {
  .project-row { grid-template-columns: minmax(0, 1fr) 14rem var(--poto-space-lg); }
  .toolkit-card { padding: var(--poto-space-lg); }
}
@media (max-width: 600px) {
  .portfolio-page { --story-section-space: calc(var(--poto-space-xxl) * 2); }
  .story-section { width: calc(100% - var(--poto-space-md) * 2); scroll-margin-top: calc(var(--poto-control-height) * 2 + var(--poto-space-md) * 3); }
  .story-nav { justify-content: center; flex-wrap: wrap; gap: 0 var(--poto-space-md); max-width: calc(100% - var(--poto-space-md) * 2); padding-inline: var(--poto-space-md); overflow-x: visible; }
  .story-nav a { font-size: .75rem; }
  .experience-sticky { top: calc(var(--poto-control-height) * 2 + var(--poto-space-md) * 3); }
  .story-display { font-size: clamp(2.75rem, 12vw, 4.5rem); }
  .story-lead { font-size: 1rem; margin-top: var(--poto-space-lg); }
  .experience-section { min-height: 120dvh; }
  .experience-detail { font-size: .875rem; }
  .toolkit-deck { flex-direction: column; gap: var(--poto-space-md); }
  .toolkit-card { min-height: calc(var(--poto-space-xxl) * 4); padding: var(--poto-space-lg); }
  .toolkit-card h4 { font-size: 2.5rem; }
  .toolkit-card p { max-width: 28ch; margin-top: var(--poto-space-lg); }
  .project-row { grid-template-columns: minmax(0, 1fr) var(--poto-space-lg); gap: var(--poto-space-md); min-height: 0; }
  .project-name { font-size: 3.5rem; }
  .project-description { grid-column: 1; grid-row: 2; max-width: 32ch; }
  .project-row .action-icon { grid-column: 2; grid-row: 1; }
  .project-preview { position: static; grid-column: 1 / -1; width: 100%; opacity: 1; transform: none; margin-top: var(--poto-space-sm); }
  .project-row:is(:hover, :focus-visible) .project-preview { transform: none; }
  .project-study-content { grid-template-columns: 1fr; gap: var(--poto-space-md); }
  .project-study[open] .project-preview { display: none; }
  .archive-gallery { grid-template-columns: 1fr; gap: var(--poto-space-xxl); margin-top: var(--poto-space-xxl); }
  .archive-gallery figure:nth-child(n) { margin-top: 0; }
  .notes-list summary { font-size: 1.125rem; }
  .story-footer { flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .experience-section { min-height: 0; }
  .experience-sticky { position: static; }
  .project-preview, .project-name, .toolkit-card { transition: none; }
}
.reduce-motion .experience-section { min-height: 0; }
.reduce-motion .experience-sticky { position: static; }
