/* ---------- Custom Properties ---------- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111;
  --accent: #00ff88;
  --accent-dim: #00ff8820;
  --text-primary: #fff;
  --text-secondary: #a0a0a0;
  --card-bg: #151515;
  --border-color: #222;
}

/* ---------- Global Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0,255,136,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  /* animation removed */
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.9); /* Add semi-transparent background */
    z-index: 100;
}

/* --- DESKTOP NAVIGATION STYLES --- */
nav {
    text-align: center;
    margin-top: 0.95rem;
}
nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0.5rem;
    position: relative;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 0 0.5rem; /* Add padding for separator spacing */
}

/* ADD CSS PIPE SEPARATOR FOR DESKTOP */
nav a:not(:last-child)::after {
    content: '|';
    color: var(--text-secondary);
    position: absolute;
    right: -10px; /* Adjust spacing of the pipe */
    top: 50%;
    transform: translateY(-50%);
}

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

nav a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -8px;
    left: 0;
    background: var(--accent);
    transition: width 0.3s ease;
}

nav a:hover::before {
    width: 100%;
}

h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}
h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin: 3rem 0 2rem;
    letter-spacing: -1px;
}
h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}
/* ---------- Links ---------- */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #00d97a;
}

/* Links inside lists */
ul {
  list-style: none;
  padding: 0;
}

ul li {
  margin: 0.5rem 0;
}

ul li a {
  position: relative;
  padding-bottom: 2px;
}

ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

ul li a:hover::after {
  width: 100%;
}
/* ---------- Main Content ---------- */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
  padding-top: 10rem; /* Add extra top padding for fixed header */
  position: relative;
  z-index: 1;
}

/* ---------- Gallery Grid ---------- */
#gallery {
  display: grid;
  /* Change the minmax value so it can fit a column on smaller screens */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
  gap: 1rem; /* Slightly reduced gap for small screens */
  margin-top: 2rem; /* Slightly reduced margin */
}

/* ---------- Photo Cards ---------- */
.photo-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.photo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.photo-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(0,255,136,0.1);
}

.photo-card:hover::before {
  opacity: 1;
}

.photo-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-card:hover img {
  transform: scale(1.05);
}
.card-content {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}
.photo-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.photo-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
/* ---------- Buttons ---------- */
.card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.photo-card button,
a.download-btn {
  padding: 0.65rem 1.25rem;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.photo-card button {
  background: var(--accent);
  color: var(--bg-primary);
  flex: 1;
}

.photo-card button:hover {
  background: #00d97a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,255,136,0.3);
}

a.download-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  flex: 1;
}

a.download-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
/* ---------- Ambient Glow Effect ---------- */
.glow-orb {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim), transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  animation: pulse 8s ease-in-out infinite;
}

.glow-orb:nth-child(1) {
  top: -200px;
  right: -200px;
  animation-delay: 0s;
}

.glow-orb:nth-child(2) {
  bottom: -200px;
  left: -200px;
  animation-delay: 4s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 2rem auto;
    padding: 0;
}

.home-buttons li {
    margin: 0;
}

.home-buttons a {
  display: block;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.home-buttons a::after {
  display: none; /* Remove underline animation */
}

.home-buttons a:hover {
  background: #00d97a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,255,136,0.3);
}

/* ---------- Loading Animation ---------- */
.loading {
  position: relative;
  width: 100%;
  height: 20px;
  background: red;
  border-radius: 3px;
  overflow: hidden;
  margin: 2rem 0;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: var(--accent);
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* --- HAMBURGER MENU BASE STYLES --- */

/* 1. Hide the checkbox used to control the menu state */
.nav-toggle {
    display: none;
}

/* 2. Style the hamburger icon label (the visible icon) */
.nav-toggle-label {
    position: absolute;
    /* Use top/transform for vertical centering relative to header */
    top: 50%;
    transform: translateY(-65%);
    
    right: 1.5rem; /* Position correctly on the right */
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 101;
    display: none; /* Hidden by default on desktop */
}

/* Create the three bar lines using the label and its pseudo-elements */
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-toggle-label span::before {
    content: '';
    top: -10px;
}

.nav-toggle-label span::after {
    content: '';
    bottom: -10px;
}

/* Transform the icon to an 'X' when the checkbox is checked */
.nav-toggle:checked ~ .nav-toggle-label span {
    transform: rotate(45deg);
    background: transparent;
}

.nav-toggle:checked ~ .nav-toggle-label span::before {
    top: 0;
    transform: rotate(0deg); 
    background: var(--text-primary);
}

.nav-toggle:checked ~ .nav-toggle-label span::after {
    bottom: 0;
    transform: rotate(-90deg);
    background: var(--text-primary);
}


/* --- MOBILE DETECTION VIA MEDIA QUERY --- */

@media (max-width: 850px) { 
    
    /* 1. Header is a stable flex container */
    header {
        display: flex; 
        align-items: center; 
        justify-content: space-between; 
        /* X-AXIS FIX: Increase right padding to reserve safe space for the icon */
        padding-right: 4.5rem; 
        padding-left: 1rem; 
        flex-wrap: nowrap;
        padding-top: 0.75rem; 
        padding-bottom: 0.75rem; 
        height: auto;
    }
    
    /* 2. H1 cleanup for minimal vertical footprint */
    h1 {
        margin: 0 !important; 
        padding: 0 !important;
        text-align: left; 
        font-size: 1.8rem; 
        line-height: 1; 
    }
    
    /* 3. NUDGE APPLIED: Show icon on mobile and shift it UP */
    .nav-toggle-label {
        display: block; /* Show the icon */
        right: 1rem; /* Adjust position */
        top: 50%;
        /* Nudge icon UP by 65% of its height to visually align with the large h1 text */
        transform: translateY(-5%); 
    }
    
    /* Hide the main navigation menu by default on mobile */
    nav {
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        max-height: 0; 
        overflow: hidden;
        background: var(--bg-primary); 
        transition: max-height 0.3s ease-in-out;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
        border-top: 1px solid var(--border-color);
        margin-top: 0;
        text-align: left;
    }
    
    /* Force navigation links to be block elements (stacked buttons) */
    nav a {
        display: block;
        padding: 1rem 2rem; 
        margin: 0;
        border-bottom: 1px solid var(--border-color);
        position: static; 
    }
    
    /* HIDE the CSS pipe separator on mobile */
    nav a::after {
        content: none !important; 
    }

    /* HIDE the hover underline effect on mobile */
    nav a::before {
        display: none !important;
    }
    
    /* Show the menu when the checkbox is checked */
    .nav-toggle:checked ~ nav {
        max-height: 350px; 
    }

    /* Adjust main content top padding */
    main {
        padding-top: 8rem; 
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
