html { scroll-behavior: smooth; }
.hero::before { animation: heroBackdropIn .6s ease-out; }
@keyframes heroBackdropIn { from { opacity: .35; } to { opacity: 1; } }
.gallery-enter { animation: galleryFadeIn .22s ease-out; }
@keyframes galleryFadeIn { from { opacity: .35; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.gallery-controls + .gallery-indicators { margin-top: 8px; }
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .24s ease; }
.nav-links a.active-nav::after, .nav-links a:focus-visible::after { transform: scaleX(1); }
.social-icon { transition: transform .24s ease; }
.development-project { transition: border-color .25s, box-shadow .25s; }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover::after { transform: scaleX(1); }
  .socials a:hover .social-icon, .socials button:hover .social-icon { transform: translateY(-2px); }
  .featured-project-section .development-project:hover { border-color: var(--primary); box-shadow: 0 0 24px rgba(122,156,255,.12); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.featured-project-section { padding: 28px 0 72px; }
.featured-project-section .development-project { position: relative; z-index: 2; margin: 0; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--border-strong); border-radius: var(--radius); background: linear-gradient(135deg, rgba(122, 156, 255, 0.12), var(--card)); }
.featured-project-section h2 { margin: 6px 0 10px; font-size: clamp(30px, 4vw, 48px); }
.featured-project-section h2::after { display: none; }
.featured-project-section h3 { margin: 20px 0 10px; font-size: 19px; }
.featured-project-section p { margin-bottom: 10px; color: var(--muted); line-height: 1.55; }
.featured-eyebrow { margin: 0 !important; color: var(--primary-2) !important; font-size: 11px; letter-spacing: 0.12em; }
.featured-intro { max-width: 880px; }
.featured-status { color: var(--primary-2) !important; font-size: 14px; }
.featured-project-section .testing-types { margin: 12px 0 0; }
.game-concepts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 24px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: rgba(6, 18, 37, 0.3); }
.game-concepts p { margin: 0; font-size: 14px; }
.game-concepts strong { color: var(--text); }
.development-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.development-facts > div { padding: 10px 12px; border-left: 2px solid var(--primary); background: rgba(6, 18, 37, 0.25); }
.development-facts dt { margin-bottom: 3px; color: var(--soft); font-size: 11px; }
.development-facts dd { margin: 0; color: var(--text); font-size: 14px; }
.project-gallery { max-width: 900px; min-width: 0; margin-top: 10px; }
.gallery-stage { width: 100%; height: clamp(210px, 28vw, 340px); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-strong); border-radius: 14px; background: linear-gradient(135deg, var(--card), rgba(122, 156, 255, 0.12)); color: var(--text); font: inherit; touch-action: pan-y; }
.gallery-stage strong { font-size: 21px; }
.gallery-stage span { color: var(--muted); font-size: 13px; }
.gallery-stage img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.3s; }
.gallery-stage:enabled { cursor: zoom-in; }
.gallery-controls { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; margin-top: 8px; }
.gallery-caption { margin: 0 !important; text-align: center; font-size: 13px; }
.gallery-empty-copy { margin: 0 0 8px !important; color: var(--soft) !important; font-size: 13px; }
.gallery-indicators { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gallery-controls button, .gallery-indicators button, .gallery-lightbox button { min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: rgba(13, 30, 65, 0.7); color: var(--text); cursor: pointer; font: inherit; transition: transform 0.22s, border-color 0.22s, background 0.22s; }
.gallery-indicators button { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; text-align: left; font-size: 12px; }
.gallery-indicators button > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-preview-placeholder { width: 34px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: rgba(122, 156, 255, 0.13); color: var(--soft); }
.gallery-indicators img { width: 34px; height: 28px; border-radius: 7px; object-fit: cover; }
.gallery-indicators button[aria-pressed="true"] { border-color: var(--primary); background: rgba(122, 156, 255, 0.18); }
.gallery-lightbox { width: min(1100px, 94vw); max-height: 94dvh; margin: auto; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--bg); color: var(--text); }
.gallery-lightbox::backdrop { background: rgba(3, 8, 20, 0.9); }
.gallery-lightbox img { display: block; width: 100%; max-height: 78dvh; object-fit: contain; margin-top: 12px; }
.own-studio { grid-column: 1 / -1; background: linear-gradient(125deg, rgba(122, 156, 255, 0.17), var(--card)); border-color: var(--border-strong); }
.own-studio .studio-contribution { max-width: 850px; }
.own-studio .studio-group-link { display: inline-block; margin-top: 12px; }
.reveal, #about.reveal { opacity: 1; transform: none; }
:is(button, a):focus-visible { outline: 2px solid var(--primary-2); outline-offset: 4px; }
button:active, .btn:active { transform: scale(0.98); }
.tags span:hover { transform: none; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .card, .experience-card, .skill-group, .contact-card { transition: transform 0.28s, box-shadow 0.28s, border-color 0.28s, background 0.28s; }
  .card:hover, .experience-card:hover, .skill-group:hover, .contact-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5), 0 0 24px var(--glow); }
  .gallery-stage:enabled:hover img { transform: scale(1.02); }
  .gallery-controls button:hover, .gallery-indicators button:hover { border-color: var(--primary); }
}
@media (hover: none), (pointer: coarse) {
  .card:hover, .experience-card:hover, .skill-group:hover, .contact-card:hover, .btn:hover, .tags span:hover, .project-card:hover img { transform: none; }
  .card:hover::after, .btn:hover::after { animation: none; }
}
@media (max-width: 800px) {
  .featured-project-section { padding: 16px 0 56px; }
  .game-concepts, .development-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-indicators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .game-concepts { grid-template-columns: 1fr; }
  .featured-project-section .development-project { padding: 19px; }
  .gallery-stage { height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card:hover, .experience-card:hover, .skill-group:hover, .contact-card:hover, .btn:hover, .gallery-stage:enabled:hover img { transform: none; }
}
