:root {
  --sidenav-width: 280px;
  --charcoal-brown: #303A2B;
  --muted-olive: #8CAE68;
  --amethyst-smoke: #947EB0;
  --midnight-violet: #361D2E;
  --accent-light: #B8A8C9;
  --text-light: #E8E8F5;
  --card-bg: rgba(255, 255, 255, 0.05);
  --hover-bg: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #303A2B 0%, #361D2E 50%, #1a1520 100%);
  background-attachment: fixed;
  font-family: 'Julius Sans One', sans-serif;
  color: var(--text-light);
}

/* ================================ */
/* Navbar Styling - Desktop */
/* ================================ */
.sidenav {
  height: 100vh;
  width: var(--sidenav-width);
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(48, 58, 43, 0.95) 0%, rgba(54, 29, 46, 0.95) 100%);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  padding: 2rem 0;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
  border-right: 1px solid rgba(140, 174, 104, 0.2);
}

.name {
  color: var(--text-light);
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.name h1 {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
  letter-spacing: 1px;
}

.profile {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.profile img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--muted-olive);
  box-shadow: 0 4px 15px rgba(140, 174, 104, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(140, 174, 104, 0.5);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.socials a {
  color: var(--text-light);
  transition: all 0.3s ease;
}

.socials a:hover {
  color: var(--muted-olive);
  transform: translateY(-3px);
}

.links {
  display: flex;
  flex-direction: column;
}

.links a {
  padding: 0.9rem 1.5rem;
  text-decoration: none;
  font-size: 1rem;
  color: var(--text-light);
  display: block;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  letter-spacing: 0.5px;
}

.links a:hover {
  background: var(--hover-bg);
  color: white;
  border-left-color: var(--muted-olive);
  padding-left: 2rem;
}

.links a.active {
  background: var(--card-bg);
  border-left-color: var(--amethyst-smoke);
  color: white;
}

/* ================================ */
/* Main Content */
/* ================================ */
.main {
  margin-left: var(--sidenav-width);
  min-height: 100vh;
  padding: 2rem;
}

.section-header {
  text-align: left;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.section-header h1 {
  font-weight: 400;
  font-size: 2.5rem;
  color: var(--text-light);
  margin: 0 0 1rem 0;
  letter-spacing: 2px;
}

.section-header hr {
  width: 100px;
  border: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--muted-olive) 0%, transparent 100%);
  margin: 0;
}

/* ================================ */
/* Footer */
/* ================================ */
#site-footer {
  text-align: center;
  padding: 2rem;
  margin-left: var(--sidenav-width);
  font-size: 0.9rem;
  color: rgba(232, 232, 245, 0.7);
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#site-footer a {
  color: var(--amethyst-smoke);
  text-decoration: none;
  transition: color 0.3s ease;
}

#site-footer a:hover {
  color: var(--muted-olive);
}

/* ================================ */
/* Video Section */
/* ================================ */
#animation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0;
  max-width: 1400px;
  margin: 0 auto;
}

#animation-grid video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

#animation-grid video:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(140, 174, 104, 0.4);
}

/* ================================ */
/* Video Overlay */
/* ================================ */
#video-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

#video-overlay.active {
  display: flex;
}

#video-overlay video {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* ================================ */
/* Image Grid */
/* ================================ */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  padding: 0;
  max-width: 1400px;
  margin: 0 auto;
}

.image-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.image-grid img:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(148, 126, 176, 0.4);
}

/* ================================ */
/* About Page */
/* ================================ */
.about-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem;
  text-align: center;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.about-page h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-weight: 400;
  letter-spacing: 2px;
}

.about-page hr {
  width: 100px;
  height: 3px;
  border: 0;
  background: linear-gradient(90deg, var(--muted-olive), var(--amethyst-smoke));
  margin: 0 auto 2.5rem auto;
}

.about-content {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.about-content p {
  margin-bottom: 1.5rem;
}

.about-content strong {
  color: var(--amethyst-smoke);
  font-weight: 600;
}

.about-content em {
  font-style: italic;
  color: var(--accent-light);
}

.about-image img {
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  margin-top: 2rem;
}

/* Add to the About Page section */
.about-image-top {
  margin: 2rem auto 2.5rem;
  max-width: 500px;
}

.about-image-top img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 3px solid var(--muted-olive);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image-top img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(140, 174, 104, 0.4);
}

/* Mobile optimization for about image */
@media screen and (max-width: 768px) {
  .about-image-top {
    max-width: 100%;
    margin: 1.5rem auto 2rem;
  }
  
  .about-image-top img {
    max-width: 100%;
  }
}

/* ================================ */
/* Contact Page */
/* ================================ */
.contact-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem;
  text-align: center;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.contact-page h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 400;
  letter-spacing: 2px;
}

.contact-page hr {
  width: 100px;
  height: 3px;
  border: 0;
  background: linear-gradient(90deg, var(--muted-olive), var(--amethyst-smoke));
  margin: 0 auto 2.5rem auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

.contact-form label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

.contact-form input,
.contact-form textarea {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transition: all 0.3s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--muted-olive);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(140, 174, 104, 0.1);
}

.contact-form button {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--muted-olive), var(--amethyst-smoke));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(140, 174, 104, 0.3);
  letter-spacing: 1px;
  font-family: 'Julius Sans One', sans-serif;
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(140, 174, 104, 0.5);
}

.contact-form button:active {
  transform: translateY(0);
}

/* ================================ */
/* Demo Reel Section */
/* ================================ */
#demo-reel-video {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

#demo-reel-video video {
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ================================ */
/* Lightbox */
/* ================================ */
#lightbox-overlay {
  backdrop-filter: blur(5px);
}

#lightbox-image {
  border-radius: 12px;
}

/* ================================ */
/* Mobile Responsive - Tablet */
/* ================================ */
@media screen and (max-width: 1024px) {
  :root {
    --sidenav-width: 240px;
  }

  .name h1 {
    font-size: 1.3rem;
  }

  .profile img {
    width: 100px;
    height: 100px;
  }

  .links a {
    font-size: 0.95rem;
    padding: 0.8rem 1.2rem;
  }

  .section-header h1 {
    font-size: 2rem;
  }

  #animation-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }
}

/* ================================ */
/* Mobile Responsive - Phone */
/* ================================ */
@media screen and (max-width: 768px) {
  .sidenav {
    position: fixed;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 1.5rem 1rem;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease-in-out;
    transform: translateY(0);
  }

  .sidenav.hidden {
    transform: translateY(-100%);
  }

  .name {
    margin-bottom: 1rem;
  }

  .name h1 {
    font-size: 1.4rem;
    margin: 0;
  }

  .profile {
    margin-bottom: 1rem;
  }

  .profile img {
    width: 80px;
    height: 80px;
    border-width: 2px;
  }

  .socials {
    margin-bottom: 1.5rem;
    gap: 1.5rem;
    font-size: 1.3rem;
  }

  .links {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .links a {
    width: auto;
    padding: 0.6rem 1.2rem;
    text-align: center;
    font-size: 0.9rem;
    border-left: none;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .links a:hover {
    padding: 0.6rem 1.2rem;
    background: var(--hover-bg);
  }

  .links a.active {
    background: var(--amethyst-smoke);
    border-color: var(--amethyst-smoke);
  }

  .main {
    margin-left: 0;
    margin-top: 320px;
    padding: 1.5rem;
  }

  .section-header {
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
  }

  .section-header h1 {
    font-size: 1.8rem;
  }

  #animation-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .about-page,
  .contact-page {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .about-page h1,
  .contact-page h1 {
    font-size: 2rem;
  }

  .about-content {
    font-size: 1rem;
  }

  #site-footer {
    margin-left: 0;
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
  }

  #video-overlay video {
    max-width: 95vw;
    max-height: 85vh;
  }
}

/* ================================ */
/* Small Phone Optimization */
/* ================================ */
@media screen and (max-width: 480px) {
  .name h1 {
    font-size: 1.2rem;
  }

  .profile img {
    width: 70px;
    height: 70px;
  }

  .socials {
    font-size: 1.2rem;
    gap: 1rem;
  }

  .links a {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  .main {
    margin-top: 280px;
    padding: 1rem;
  }

  .section-header h1 {
    font-size: 1.5rem;
  }

  .image-grid {
    grid-template-columns: 1fr;
  }

  .about-page h1,
  .contact-page h1 {
    font-size: 1.8rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* ================================ */
/* Accessibility Improvements */
/* ================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

.nda-lock-box {
  max-width: 500px;
  margin: 2rem auto;
  padding: 3rem;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid rgba(140, 174, 104, 0.3);
  text-align: center;
  backdrop-filter: blur(10px);
}

.nda-lock-box i {
  font-size: 3rem;
  color: var(--muted-olive);
  margin-bottom: 1.5rem;
}

.nda-input-group {
  display: flex;
  gap: 10px;
  margin-top: 1.5rem;
}

.nda-input-group input {
  flex: 1;
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.3);
  color: white;
}

.nda-input-group button {
  padding: 0.8rem 1.5rem;
  background: var(--muted-olive);
  border: none;
  border-radius: 8px;
  color: var(--midnight-violet);
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s;
}

.nda-input-group button:hover {
  opacity: 0.9;
}

/* Focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--muted-olive);
  outline-offset: 2px;
}



/* Smooth scrolling with offset for fixed header on mobile */
@media screen and (max-width: 768px) {
  section {
    scroll-margin-top: 330px;
  }
}