/* ==================
RESET + BASE
================== */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
}

/* ==================
CUSTOM FONT
================== */
@font-face {
  font-family: "GenEiNuGothic-EB";
  src: url("../font/GenEiNuGothic-EB.ttf") format("truetype");
}

/* ==================
HEADER
================== */
header {
  background-color: rgba(226, 223, 223, 0.4);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.2);
  height: 50px;
  position: sticky;
  top: 0;

  z-index: 1000; /* header stays ABOVE menu overlay */
}

header .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  height: 50px;
  padding-left: 25px;
  padding-right: 25px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

header .header #logo {
  width: 75px;
  height: auto;
  display: block;
}

header .header nav > ul {
  display: flex;
  list-style: none;
  font-size: 9px;
  gap: 12px;
  position: absolute;
  right: 0;
  top: 30px;
  padding-right: 75px;
}

header .header nav > ul a img {
  width: 70px;
  transition: transform 0.4s ease;
}

header .header nav > ul a img:hover {
  transform: scale(1.1);
  cursor: pointer;
}

/* ==================
HAMBURGER (USED AS WHITE X ON MENU)
================== */
.ham-menu {
  width: 30px;
  height: 25px;
  margin: 0;
  padding: 0;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  z-index: 1200; /* above header */
  -webkit-tap-highlight-color: transparent;
}

.ham-menu span {
  height: 2px;
  width: 100%;
  background-color: #000;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: 0.3s ease;
}

.ham-menu span:nth-child(1) { top: 25%; }
.ham-menu span:nth-child(2) { top: 70%; }

.ham-menu.active span:nth-child(1) {
  top: 45%;
  transform: translateX(-50%) rotate(45deg);
}

.ham-menu.active span:nth-child(2) {
  top: 45%;
  transform: translateX(-50%) rotate(-45deg);
}

/* ==================
MENU OPEN BEHAVIOR (ONLY X BLEEDS THROUGH)
================== */
body.menu-open { overflow: hidden; }

/* make the X white */
body.menu-open .ham-menu span { background-color: #fff; }

/* pin the X and keep it clickable */
body.menu-open .ham-menu{
  position: fixed;
  top: 14px;
  right: 25px;
  z-index: 1200;
  pointer-events: auto;
}

/* header becomes visually gone AND non-interactive so overlay clicks work */
body.menu-open header{
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  pointer-events: none;
}

/* hide ONLY logo + github row */
body.menu-open .logo-link,
body.menu-open header .header nav > ul{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==================
FULLSCREEN MENU
================== */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 900; /* below header so only X can sit above */
  display: none;
}

.menu-overlay.is-open { display: block; }

.menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
}

.menu-panel {
  position: relative;
  height: 100%;
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  padding: 90px 20px 30px;
}

.menu-list {
  list-style: none;
  padding: 8px 0 12px;
  margin: 0;

  width: min(520px, 92vw);
  text-align: center;

  display: flex;
  flex-direction: column;
  gap: 10px;

  max-height: calc(100vh - 140px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.menu-list::-webkit-scrollbar{
  width: 0;
  height: 0;
  display: none;
}

.menu-list a,
.submenu-toggle {
  display: block;
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  text-decoration: none;
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 800;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.menu-list a:hover,
.submenu-toggle:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.14);
  cursor: pointer;
}

.submenu-toggle {
  border: 1px solid rgba(255,255,255,0.14);
}

.submenu-toggle:focus-visible,
.menu-list a:focus-visible {
  outline: 3px solid rgba(255,255,255,0.6);
  outline-offset: 3px;
}

.has-submenu .chev {
  margin-left: 10px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.has-submenu.open .chev { transform: rotate(180deg); }

.submenu {
  list-style: none;
  padding: 10px 0 0;
  margin: 0;
  display: none;
  gap: 8px;
}

.has-submenu.open .submenu { display: grid; }

.submenu a {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
}

/* ==================
SECTION HEADING
================== */
.h1 {
  margin-top: 2vw;
  margin-left: 5vw;
  border-bottom: 1px solid #000;
  border-bottom-width: thin;
  width: 40%;
  min-width: 300px;
}

.h1 h1 { font-weight: 700; }

/* ==================
GALLERY
================== */
.gallery {
  width: min(1100px, 90%);
  margin: 24px auto;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 700px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1000px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

.thumb {
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
}

.thumb:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.35);
  outline-offset: 3px;
}

.thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  transform: scale(1);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.thumb:hover img {
  transform: scale(1.04);
  filter: saturate(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .thumb,
  .thumb img { transition: none; }
}

/* ==================
LIGHTBOX
================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000; /* above everything */
  display: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.lightbox.is-open {
  display: block;
  opacity: 1;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(2px);
}

.lightbox__panel {
  position: relative;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  margin: 6vh auto 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0.98);
  transition: transform 0.18s ease;
}

.lightbox.is-open .lightbox__panel { transform: scale(1); }

.lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 30px;
  line-height: 42px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.16s ease, background 0.16s ease;
}

.lightbox__close:hover {
  background: #fff;
  transform: scale(1.05);
}

.lightbox__close:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

@media (max-width: 420px) {
  .lightbox__close { top: -8px; right: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox__panel,
  .lightbox__close { transition: none; }
}

/* ==================
FOOTER
================== */
.mini-footer {
  margin-top: auto;
  padding-top: 14px;
  padding-bottom: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.mini-footer .footer-nav,
.mini-footer .footer-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.mini-footer .footer-nav {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.mini-footer .footer-subnav {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}

.mini-footer a {
  color: #000;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 8px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}


@media (max-width: 900px) {
  .mini-footer .footer-nav { font-size: 12px; }
  .mini-footer .footer-subnav { font-size: 10.5px; }
}
