/* ===== GLOBAL STYLES ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  overflow-y: visible;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-y: scroll;
}

a {
  text-decoration: none;
}
/* controls image sizes */
img,
picture,
svg {
  max-width: 100%;
  display: block;
}

/* ===== HEADER / NAV ===== */
/* Logo */
.site-nav .logo {
  display: block;
  text-decoration: none;
}

.logo img {
  display: block;
}

/* ====== MOBILE NAV BASE ====== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: white;
}

.site-header-inner {
  align-items: center;
  min-height: 64px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-toggle-label {
  z-index: 1001;
  position: relative;
  margin-left: auto;
  width: 32px;
  height: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle-label span:not(.sr-only) {
  height: 2px;
  width: 100%;
  background-color: #000;
  border-radius: 1px;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease;
}

.site-header.nav-open .nav-toggle-label span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-label span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle-label span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== OVERLAY ===== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.3s ease;
  pointer-events: none;
  z-index: 900;
}

/* Active overlay */
.site-header.nav-open .nav-overlay {
  background: rgba(255, 255, 255, 0.85);
  pointer-events: auto;
}

/* ===== MOBILE MENU ====== */

.nav-menu {
  position: fixed;
  top: 20%;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  list-style: none;
  gap: 24px;
  opacity: 0;
  transform: translateY(-20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  z-index: 950;
}

.site-header.nav-open .nav-menu {
  opacity: 1;
  transform: translateY(0);
}

.nav-menu a {
  text-decoration: none;
  position: relative;
}

/* Yellow underline on hover/click */
.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #ffd700;
  transition: width 0.3s ease;
}

/* Keep underline on active page */
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
  width: 100%;
}

/* Hide logo when menu open */
.site-header.nav-open .logo {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ===== DESKTOP NAVIGATION ===== */
@media (min-width: 768px) {
  .nav-toggle-label,
  .nav-overlay {
    display: none;
  }

  /* Keep logo visible at all times */
  .logo {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Horizontal menu */
  .nav-menu {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 2.5rem;
    position: static;
    opacity: 1;
    transform: none;
    margin-left: auto;
  }

  .nav-menu a {
    position: relative;
  }
}
/* ===== ABOUT ME ===== */

/* Secondary navigation */
.secondary-nav {
  text-align: start;
}

.secondary-nav ul {
  list-style: none;
  padding: 0;
  display: inline-flex;
  gap: 2rem;
}

.secondary-nav a {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

/* Underline hover effect */
.secondary-nav a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background-color: #fbd938;
  transition: width 0.3s ease;
  position: absolute;
  left: 0;
  bottom: -3px;
}

/* Expand underline on hover/focus */
.secondary-nav a:hover::after,
.secondary-nav a:focus::after {
  width: 100%;
}

/* ===== PROJECT ONE NAV  ====== */
.project-one-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-one-nav a {
  text-decoration: none;
  color: #1e293b; /* slate-800 */
  position: relative;
  width: fit-content;
}

.project-one-nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #1e293b; /* slate-800 */
  transition: width 0.3s ease;
}

.project-one-nav a:hover::after,
.project-one-nav a:focus::after {
  width: 100%;
}

/* ===== IMAGE LIGHTBOX ===== */

/* Clickable image cursor and hover effect */
.lightbox-trigger {
  cursor: zoom-in;
  transition: all 0.3s ease;
}

.lightbox-trigger:hover {
  transform: translateY(-4px);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

/* Lightbox content container */
.lightbox-content {
  position: relative;
  max-width: 1400px;
  max-height: 90vh;
  width: 100%;
  cursor: default;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem;
  transition: opacity 0.2s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-close:focus {
  opacity: 0.7;
}

.lightbox-close:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Screen reader text */
.lightbox-close .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
