/* Kinetic project wall. The unenhanced layout remains a complete, readable grid. */
.projects-section { --tile-width: clamp(340px, 30vw, 450px); --tile-height: 386px; --tile-gap: 25px; padding-bottom: 80px; overflow: clip; }
.projects-section [hidden] { display: none !important; }
.projects-heading { display: flex; margin-bottom: 30px; align-items: center; }
.projects-pretitle { font: italic 400 clamp(20px, 2.2vw, 32px)/1.2 Georgia, serif; color: #75834c; margin-bottom: 17px; letter-spacing: -.04em; }
[data-theme="dark"] .projects-pretitle { color: var(--accent); }
.projects-heading-note > p { max-width: 245px; font-size: 13px; color: var(--muted); }
.projects-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 30px; padding-block: 18px; border-top: 1px solid var(--line); }
.projects-hint { display: flex; align-items: center; gap: 12px; font-size: 9px; color: var(--muted); }
.projects-hint > span { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; width: 28px; height: 28px; font-size: 17px; font-weight: 400; }
.projects-controls { display: flex; align-items: center; gap: 8px; }
.projects-controls button { border: 1px solid var(--line); background: transparent; transition: background .25s, color .25s, transform .25s; }
.projects-controls button:hover { background: var(--ink); color: var(--paper); }
.projects-controls button:disabled { opacity: .35; cursor: default; }
.projects-layout-button { display: flex; align-items: center; gap: 10px; min-height: 40px; border-radius: 30px; padding: 9px 16px; font-size: 10px; }
.projects-motion-button, .projects-arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; line-height: 1; }
.projects-motion-button { font-size: 15px; }
.projects-control-divider { width: 1px; height: 18px; background: var(--line); margin-inline: 7px; }
.projects-section .project-gallery { position: relative; margin-top: 25px; }
.project-gallery-grid { display: none; pointer-events: none; }
.project-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; width: min(100% - var(--gutter) * 2, 1600px); margin-inline: auto; }
.project-lane, .project-track, .project-set { display: contents; }
.project-set[aria-hidden="true"] { display: none; }
.projects-section .project-card { grid-column: auto; min-width: 0; position: relative; }
/* Keep the existing hues, shaded by 20%; the invitation uses the hero's brand greens. */
.project-card[data-project-tone="apricot"] { --tile-bg: color-mix(in srgb, #e8ad8d 80%, #000); --tile-ink: #43271f; --tile-accent: #934329; }
.project-card[data-project-tone="lavender"] { --tile-bg: color-mix(in srgb, #b9a2db 80%, #000); --tile-ink: #302240; --tile-accent: #5c397e; }
.project-card[data-project-tone="sky"] { --tile-bg: color-mix(in srgb, #94bdd6 80%, #000); --tile-ink: #1e3548; --tile-accent: #2b5980; }
.project-card[data-project-tone="coral"] { --tile-bg: color-mix(in srgb, #e79b98 80%, #000); --tile-ink: #4b222a; --tile-accent: #8f303c; }
.project-card[data-project-tone="orange"] { --tile-bg: color-mix(in srgb, #e8a66e 80%, #000); --tile-ink: #452b1c; --tile-accent: #89471e; }
.project-card[data-project-tone="leaf"] { --tile-bg: color-mix(in srgb, #a4c78c 80%, #000); --tile-ink: #243b25; --tile-accent: #3b6535; }
.project-card[data-project-tone="apricot"][data-project-variant="alternate"] { --tile-bg: color-mix(in srgb, #d99578 80%, #000); }
.project-card[data-project-tone="lavender"][data-project-variant="alternate"] { --tile-bg: color-mix(in srgb, #c6b0e3 80%, #000); }
.project-card[data-project-tone="sky"][data-project-variant="alternate"] { --tile-bg: color-mix(in srgb, #8bc8c4 80%, #000); }
.project-card[data-project-tone="coral"][data-project-variant="alternate"] { --tile-bg: color-mix(in srgb, #d98283 80%, #000); }
.project-card[data-project-tone="orange"][data-project-variant="alternate"] { --tile-bg: color-mix(in srgb, #efba8c 80%, #000); }
.project-card[data-project-tone="leaf"][data-project-variant="alternate"] { --tile-bg: color-mix(in srgb, #7fb38c 80%, #000); }
.project-card.project-invitation { --tile-bg: var(--accent); --tile-ink: #252b22; --tile-accent: #252b22; }
.project-card.project-invitation[data-project-variant="alternate"] { --tile-bg: #252b22; --tile-ink: var(--accent); --tile-accent: var(--accent); }
.project-card-shell { display: block; height: 100%; overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 15px; background: var(--paper); box-shadow: 0 12px 22px -16px #1f281b35; transform: perspective(1000px) translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .55s var(--ease), box-shadow .5s, border-color .4s; }
.project-card:hover .project-card-shell { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); box-shadow: 0 25px 40px -20px #1f281b55; }
.projects-section .project-card .project-visual { height: 245px; aspect-ratio: auto; border-radius: 0; background: radial-gradient(ellipse at 20% 0%, #ffffff26, transparent 70%), var(--tile-bg); color: var(--tile-ink); }
.projects-section .project-logistics .project-visual::before { background-image: linear-gradient(var(--tile-accent) 1px, transparent 1px), linear-gradient(90deg, var(--tile-accent) 1px, transparent 1px); opacity: .1; }
.projects-section .project-card .project-visual-top { inset: 18px 20px auto; font-size: 7px; letter-spacing: .05em; }
.projects-section .project-card .project-screen { width: 82%; transform: rotate(-5deg) translateY(46px); border-radius: 6px; transition: transform .7s var(--ease); }
.projects-section .project-card .project-screen img { aspect-ratio: 1.4222; object-fit: cover; object-position: top; }
.projects-section .project-card:nth-child(even) .project-screen { transform: rotate(5deg) translateY(46px); }
.projects-section .project-card .project-visual:hover .project-screen { transform: rotate(0) translateY(37px) scale(1.035); }
.projects-section .browser-chrome { padding: 7px 10px; }
.projects-section .browser-chrome span { font-size: 6px; }
.projects-section .project-card .project-open { right: 14px; bottom: 14px; width: 34px; height: 34px; font-size: 20px; background: var(--tile-accent); color: #fff; box-shadow: 0 4px 15px #0002; transition: transform .45s var(--ease), background .2s; }
.projects-section .project-card .project-visual:hover .project-open { transform: translate(2px, -2px); }
.projects-section .project-card .project-info { display: block; padding: 19px 21px 22px; }
.projects-section .project-card .project-type { font-size: 7px; letter-spacing: .06em; color: var(--muted); }
.projects-section .project-card .project-info h3 { font: 650 clamp(18px, 1.5vw, 23px)/1.15 Manrope, sans-serif; letter-spacing: -.045em; margin-top: 8px; overflow-wrap: anywhere; }
.projects-section .project-card .project-info h3 a { gap: 10px; }
.projects-section .project-card .project-info h3 span { font-size: 18px; }
.projects-section .project-card .project-info > p { margin-top: 10px; max-width: none; font-size: 10px; line-height: 1.65; color: var(--muted); }
.projects-section .content-art { padding: 25px; gap: 12px; }
.projects-section .content-art strong { font-size: 49px; margin-top: 14px; }
.projects-section .content-art em { color: var(--tile-accent); }
.projects-section .content-art .micro { font-size: 6px; }
.projects-section .code-bracket { font-size: 130px; }
.projects-section .ai-cursor { font-size: 21px; color: var(--tile-accent); }
.projects-section .custom-art { font-size: 90px; }
.project-invitation .project-card-shell { background: var(--tile-bg); color: var(--tile-ink); min-height: 386px; display: flex; flex-direction: column; justify-content: space-between; padding: 25px; position: relative; }
.project-invitation .project-card-shell::before { content: ''; position: absolute; width: 230px; height: 230px; border: 1px solid color-mix(in srgb, var(--tile-accent) 18%, transparent); border-radius: 50%; top: 45px; right: -80px; box-shadow: 0 0 0 36px color-mix(in srgb, var(--tile-accent) 5%, transparent), 0 0 0 72px color-mix(in srgb, var(--tile-accent) 3%, transparent); pointer-events: none; }
.invitation-top { display: flex; justify-content: space-between; font-size: 8px; z-index: 1; }
.invitation-top > span:last-child { font-size: 20px; }
.invitation-art { display: flex; justify-content: flex-end; align-items: center; margin-block: 25px; z-index: 1; }
.invitation-art h3 { font: italic 400 52px/.98 Georgia, serif; letter-spacing: -.06em; text-align: right; }
.invitation-bottom { border-top: 1px solid color-mix(in srgb, var(--tile-accent) 25%, transparent); padding-top: 20px; z-index: 1; }
.invitation-bottom > p { font-size: 11px; margin-bottom: 8px; }
.invitation-bottom strong { display: flex; justify-content: space-between; gap: 15px; font-size: 17px; letter-spacing: -.03em; font-weight: 600; }
.projects-footer { display: flex; align-items: center; gap: 25px; padding-top: 35px; }
.projects-footer .micro { font-size: 8px; color: var(--muted); }
.projects-footer-line { height: 1px; background: var(--line); flex: 1; }

/* Two independent, seamless lanes. Animation is enhanced only when JS is ready. */
.projects-section.is-kinetic .project-gallery { padding-block: 60px 65px; overflow: hidden; isolation: isolate; }
.is-kinetic .project-gallery::before, .is-kinetic .project-gallery::after { content: ''; position: absolute; inset: 0 auto 0 0; width: clamp(20px, 5vw, 90px); z-index: 5; pointer-events: none; background: linear-gradient(90deg, var(--paper), transparent); }
.is-kinetic .project-gallery::after { left: auto; right: 0; transform: rotate(180deg); }
.is-kinetic .project-gallery-grid { display: block; position: absolute; z-index: -1; inset: 0; background-image: radial-gradient(var(--line) .75px, transparent .75px); background-size: 18px 18px; mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); opacity: .65; }
.is-kinetic .project-lanes { display: flex; flex-direction: column; gap: 30px; width: 110%; margin-left: -5%; transform: rotate(-3deg); }
.is-kinetic .project-lane { display: block; position: relative; touch-action: pan-y; cursor: grab; }
.is-kinetic .project-lane.is-dragging { cursor: grabbing; user-select: none; }
.is-kinetic .project-lane.is-dragging a { cursor: grabbing; }
.is-kinetic .project-track { display: flex; width: max-content; will-change: transform; }
.is-kinetic .project-set { display: flex; position: relative; flex-shrink: 0; gap: var(--tile-gap); padding-right: var(--tile-gap); }
.is-kinetic .project-card { flex: 0 0 var(--tile-width); width: var(--tile-width); height: var(--tile-height); animation: project-drift 7s ease-in-out infinite; animation-delay: calc(var(--card-order) * -.9s); }
.is-kinetic .project-card:nth-child(even) { animation-direction: reverse; }
.is-kinetic .project-card:hover, .is-kinetic .project-card:focus-within { z-index: 4; animation-play-state: paused; }
.is-kinetic .project-card .project-info > p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-kinetic .project-invitation .project-card-shell { min-height: 0; }
.is-kinetic.motion-paused .project-card, .is-kinetic.is-interacting .project-card { animation-play-state: paused; }
.is-kinetic.is-offscreen .project-card { animation-play-state: paused; }
.projects-section:not(.is-kinetic) .projects-hint { visibility: hidden; }
.projects-section:not(.is-kinetic) .projects-motion-button, .projects-section:not(.is-kinetic) .projects-arrow, .projects-section:not(.is-kinetic) .projects-control-divider { display: none; }
@keyframes project-drift { 0%, 100% { translate: 0 6px; } 50% { translate: 0 -6px; } }
@media (min-width: 1800px) { .projects-section { --tile-width: 470px; --tile-height: 406px; } .projects-section .project-card .project-visual { height: 265px; } }
@media (max-width: 1000px) {
    .projects-section { --tile-width: 350px; --tile-height: 366px; --tile-gap: 22px; }
    .projects-heading-note > p { max-width: 220px; font-size: 11px; }
    .project-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .projects-section .project-card .project-visual { height: 228px; }
    .projects-section .project-card .project-info h3 { font-size: 20px; }
    .projects-section .content-art strong { font-size: 44px; }
    .project-invitation .project-card-shell { min-height: 366px; }
}
@media (max-width: 600px) {
    .projects-section { --tile-width: min(72vw, 300px); --tile-height: 325px; --tile-gap: 16px; padding-top: 60px; padding-bottom: 50px; }
    .projects-heading { flex-direction: row; align-items: center; margin-top: 32px; gap: 20px; }
    .projects-heading-note { display: none; }
    .projects-pretitle { font-size: 21px; margin-bottom: 12px; }
    .projects-heading .display-title { font-size: clamp(62px, 16vw, 90px); }
    .projects-toolbar { margin-top: 0; padding-block: 15px; gap: 10px; }
    .projects-hint { gap: 6px; font-size: 7px; letter-spacing: .02em; }
    .projects-hint > span { width: 22px; height: 22px; font-size: 13px; }
    .projects-controls { gap: 5px; }
    .projects-layout-button { min-height: 33px; padding: 7px 10px; font-size: 9px; gap: 6px; }
    .projects-layout-button svg { width: 12px; height: 12px; }
    .projects-motion-button, .projects-arrow { width: 33px; height: 33px; font-size: 17px; }
    .projects-motion-button { font-size: 13px; }
    .projects-control-divider { display: none; }
    .project-lanes { grid-template-columns: 1fr; gap: 25px; }
    .projects-section.is-kinetic .project-gallery { margin-top: 0; padding-block: 28px 35px; }
    .is-kinetic .project-lanes { gap: 23px; transform: rotate(-2deg); }
    .projects-section .project-card .project-visual { height: 186px; }
    .projects-section .project-card .project-visual-top { inset: 14px 15px auto; font-size: 6px; }
    .projects-section .project-card .project-screen { width: 86%; }
    .projects-section .project-card .project-info { padding: 14px 15px; }
    .projects-section .project-card .project-type { font-size: 6px; }
    .projects-section .project-card .project-info h3 { font-size: 18px; margin-top: 7px; }
    .projects-section .project-card .project-info > p { font-size: 9px; margin-top: 8px; }
    .projects-section .project-card .project-open { width: 30px; height: 30px; font-size: 18px; right: 12px; bottom: 12px; }
    .projects-section .content-art { padding: 34px 16px 16px; gap: 9px; }
    .projects-section .content-art strong { font-size: clamp(30px, 9vw, 39px); margin-top: 10px; }
    .projects-section .content-art .micro { font-size: 5px; }
    .projects-section .code-bracket { font-size: 100px; }
    .project-invitation .project-card-shell { min-height: 325px; padding: 22px; }
    .invitation-art { gap: 12px; margin-block: 20px; }
    .invitation-art h3 { font-size: clamp(36px, 10vw, 44px); }
    .invitation-bottom strong { font-size: 16px; }
    .projects-footer { gap: 14px; padding-top: 20px; }
    .projects-footer .micro { font-size: 6px; letter-spacing: .035em; }
}
@media (max-width: 370px) {
    .projects-hint { max-width: 65px; }
    .projects-hint > span { display: none; }
    .projects-heading .display-title { font-size: 57px; }
    .projects-section .project-card .project-info h3 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
    .projects-section *, .projects-section *::before, .projects-section *::after { animation: none !important; transition: none !important; }
    .project-card-shell { transform: none !important; }
}
