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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --border: #222;
  --text: #f0f0f0;
  --muted: #666;
  --accent: #fff;
  --nav-h: 60px;
  --basketball: #fc7f12;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
}

.nav-name {
  font-size: 1rem;
  font-weight: 400;
  font-family: "Alice", serif;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  pointer-events: none
  text-decoration: none !important;
}

.nav-name a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-name a:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}


.nav-links a.nav-basketball {
  transition: all 0.5s ease;
}

.nav-links a.nav-basketball:hover {
  color: var(--basketball);
  text-shadow:
    0 0 7px var(--basketball),
    0 0 10px var(--basketball),
    0 0 21px var(--basketball),
    0 0 42px var(--basketball),
    0 0 82px var(--basketball),
    0 0 92px var(--basketball);
  transform: translateY(-1px);
}

/* HAMBURGER BUTTON (navigation) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s;
}

.nav-toggle:hover {
  background: rgba(255,255,255,0.06);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* DROPDOWN MENU */
.nav-dropdown {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  z-index: 99;
}

.nav-dropdown.open {
  display: flex;
}

.nav-dropdown a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  transition: color 0.2s, background 0.2s;
  border-bottom: 1px solid var(--border);
}

.nav-dropdown a:last-child {
  border-bottom: none;
}

.nav-dropdown a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

main {
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 4rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* GALLERY GRID */
#gallery {
  columns: 4 280px;
  column-gap: 0.75rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 0.75rem;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  background: var(--surface);
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.gallery-item img.loaded {
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s;
  border-radius: 6px;
}

.gallery-item:hover::after {
  background: rgba(0,0,0,0.15);
}

/* LOADING */
.loading {
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  padding: 4rem 0;
  letter-spacing: 0.05em;
}

.loading.hidden {
  display: none;
}

/* FULLSCREEN VIEW */
.fs-view {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.fs-view.open {
  display: flex;
}

.fs-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fs-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
}

.fs-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transition: opacity 0.3s ease;
}

.fs-content img.fs-img-hidden {
  opacity: 0;
}

/* FULLSCREEN SPINNER */
.fs-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.fs-spinner.hidden {
  display: none;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: rgba(255,255,255,0.7);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fs-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fs-btn {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.fs-btn:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.25);
}

.fs-btn-close {
  background: rgba(255, 60, 60, 0.15);
  border-color: rgba(255, 60, 60, 0.25);
}

.fs-btn-close:hover {
  background: rgba(255, 60, 60, 0.3);
}

.fs-btn-download {
  background: rgba(255,255,255,0.12);
  font-weight: 500;
}

.fs-counter {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

/* KEYBOARD HINT */
@keyframes fadeout {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* RESPONSIVE */
@media (max-width: 600px) {
  nav { padding: 0 1rem; }
  main { padding-left: 0.75rem; padding-right: 0.75rem; }
  #gallery { columns: 2 140px; column-gap: 0.5rem; }
  .gallery-item { margin-bottom: 0.5rem; }
  .nav-links { gap: 1rem; }
}

/* BUTTONS */
.btn {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 0.65rem 1.75rem;
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  background: transparent;
}

.btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: #444;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  nav { padding: 0 1rem; }
  .nav-links { gap: 1rem; }
}

/* FOOTER */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 2rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-copy {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-icons a {
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.footer-icons a:hover {
  color: var(--text);
}

.footer-icons svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (max-width: 600px) {
  .footer-copy {
    text-align: center;
    padding: 0.5rem 2rem;
  }
  .footer-copy span { display: none; }
  .footer-icons { display: none; }
  footer {
    justify-content: center;
    height: auto;
  }
}

.mobile-footer {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  gap: 0;
  border-bottom: 0.5px solid var(--border);
}

.mobile-footer a {
  border-bottom: none;
  border-left: 0.5px solid var(--border);
  flex: 1;
  display: flex;
  justify-content: center;
}

.mobile-footer svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* FULLSCREEN SIDE PANEL LAYOUT */
.fs-content {
  flex-direction: row;
  gap: 2rem;
  max-width: 95vw;
}

.fs-image-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.fs-content img {
  max-width: 75vw;
}

/* EXIF PANEL */
.fs-exif {
  width: 200px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-self: center;
  position: absolute;
  right: -220px;
  top: 50%;
  transform: translateY(-50%);
}

.fs-exif-title {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.fs-exif-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fs-exif-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.fs-exif-value {
  font-size: 0.875rem;
  color: var(--text);
}

.fs-exif-loading {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

@media (max-width: 900px) {
  .fs-content {
    flex-direction: column;
  }
  .fs-content img {
    max-width: 90vw;
    max-height: 60vh;
  }
  .fs-exif {
    width: 100%;
    min-width: unset;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
  .fs-exif-title {
    width: 100%;
  }
}

/* EXIF PANEL POSITION FIX */
.fs-content {
  justify-content: center;
}

@media (max-width: 1200px) {
  .fs-exif {
    position: static;
    transform: none;
    width: 100%;
    min-width: unset;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
  .fs-exif-title {
    width: 100%;
  }
  .fs-content {
    flex-direction: column;
  }
  .fs-content img {
    max-width: 90vw;
    max-height: 60vh;
  }
}

.scroll-hint {
  position: fixed;
  bottom: 50vh;
  right: 10vw;
  display: flex;
  align-items: center;
  color: var(--muted);
  animation: scroll-bounce 2.2s ease-in-out infinite;
  z-index: 10;
  border-radius: 50%;
  transition: all 0.5s ease;
}

.scroll-hint svg {
  transition: transform 0.3s ease;

}

.top-scroll-hint {

  cursor: pointer;
}

.top-scroll-hint svg {
  transform: rotate(180deg);
}

.hidden-scroll-hint svg {
  transform: rotate(180deg);
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: default;
}

.bottom-scroll-hint {
  transform: scale(2);
}

.bottom-scroll-hint svg {
  transform: scale(2) rotate(180deg);
}

@media (max-width: 1000px)  {
  .scroll-hint {
    display: none;
  }
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}
