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

html {
  scroll-behavior: smooth;         
  scroll-padding-top: 5rem;        
}

.body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  min-height: 100vh; 
  width: 100dvw;  
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --max-width:      clamp(320px, 90vw, 100%);
  --font-size-base: clamp(15px, 2.5vw + 0.5rem, 18px);
  --font-size-h1:   clamp(2rem, 6vw + 1rem, 4rem);
  --font-size-h2:   clamp(1.6rem, 5vw + 0.8rem, 3rem);
  --spacing-sm:     clamp(0.5rem, 2vw, 1rem);
  --spacing-md:     clamp(1rem, 4vw, 2rem);
  --spacing-lg:     clamp(2rem, 6vw, 4rem);
  
  --sprucePine: #003a00; 
  --bluegrass: #005500;
  --kentuckyNight: #000d08;
  --mountainFog: #f0fff8; 
  --stormCloud: #333849;
  --blueRidgeParkway: #002167;
  --midnightBlue: #0d0033;
  --marianaTrench: #00001a;
  --starLight: #e1ceff; 
}

/* Base font size */
html { 
  font-size: var(--font-size-base); 
}

/* Light theme default */
body { 
  color: var(--kentuckyNight); 
  background: var(--mountainFog); 
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * { 
    animation: none !important; 
    transition: none !important; 
    scroll-behavior: auto; 
  }
}

/* ====================== LAYOUT ====================== */

.body {
  display: flex; 
  flex-direction: column;
  justify-content: space-between;
  margin: 0; 
  min-height: fit-content;
  width: 100%;
  align-items: center;
}

.header {
  width: 100%;
  max-width: var(--max-width);
  padding: var(--spacing-md);
  text-align: center;
}

.mainContainer {
  flex: 1; 
  width: 100%;
  max-width: var(--max-width);
  padding: var(--spacing-md);
  box-sizing: border-box;
  padding-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  border-radius: 8px;
  padding: var(--spacing-lg) var(--spacing-md);
  margin-bottom: 5vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

div.container {
  border-bottom: 4px solid var(--mountainFog);
  border-right: 3px solid var(--mountainFog);
  width: 102%; 
  margin-top: 5vh;
  background-color: var(--marianaTrench);
}



/* Center main section headings */
.container > h2 {
  text-align: center;
  width: 100%;
  margin-bottom: var(--spacing-md);
}

/* Left-align project titles and descriptions */
.container h3 {
  text-align: left;
  align-self: stretch;
  margin-bottom: 0.6rem;
}


.coming-soon {
  text-align: center;
  font-style: italic;
  padding: 2rem 1rem;
  opacity: 0.9;
}

/* Images - larger on bigger screens */

.moviePoster {
    max-width: 100%;
    width: clamp(200px, 300px, 800px)
}

.moviesContainer > .movieItem {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10vh; 
    margin-top: 7vh; 
    background-color: black;
}


.imageContainer {
  height: auto;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--spacing-sm);
  align-items: center;
  padding: var(--spacing-md) 0;
  width: 100%;
}

.containerImg {
  align-self: center;
  max-height: 36vh;              /* Mobile */
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .containerImg {
    max-height: 48vh;            /* Tablet & small desktop */
  }
}

@media (min-width: 1024px) {
  .containerImg {
    max-height: 52vh;            /* Large desktop */
  }
}

.buttonsContainer {
  margin: var(--spacing-sm) 0;
  padding: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  width: 100%;
}

.searchForm {
  width: clamp(150px, 85%, 420px);
  border-radius: 10px;
  padding: var(--spacing-sm); 
  margin: var(--spacing-sm) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
}

.button.imageButton,
.button,
.textInput {
  font-size: 1rem;
  padding: 10px 16px;
  margin: 5px;
  width: 100%;
  max-width: 280px;
}

/* Aside & Social */
.aside {
  width: 100%;
  min-height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--max-width);
  padding: var(--spacing-md);
  box-sizing: border-box;
  text-align: center;
}

.greeting,
.localTime {
  font-size: clamp(1.2rem, 4vw + 0.6rem, 1.5rem);
  font-weight: 600;
  margin: var(--spacing-sm);
  padding: var(--spacing-sm); 
  color: var(--mountainFog);  
  text-align: center;
}

.socialLinks {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 4vw, 2rem);           
  margin: var(--spacing-md) 0;
  padding: 0;
  list-style: none;  
}

.social-icon {
  width: clamp(2rem, 6vw, 2.8rem);
  height: auto;
  fill: white;               
  color: white;
  transform: scale(1);    
  transition: transform 0.25s ease, color 0.25s ease;
}

.socialLinks a:hover .social-icon,
.socialLinks a:focus .social-icon {
  transform: scale(1.18);                
  color: var(--starLight);
}

.socialLinks a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm);
  border-radius: 10px;                   
  background-color: var(--marianaTrench);
  transition: background 0.2s ease;
}

.socialLinks a:hover,
.socialLinks a:focus {
  background: rgba(51, 56, 73, 0.15);
}

.seal {
  height: clamp(50px, 50%, 200px);
  width: clamp(50px, 50%, 200px);
  border-radius: 50%;
}

/* Footer */
.footer {
  margin: 25px; 
  text-align: center;
  max-width: 100%;
  font-size: clamp(1.2rem, 2vw + 0.2rem, 1.5rem);
}

/* ====================== NAV ====================== */

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; 
  padding: 1rem 1.5rem;
  background: var(--midnightBlue);        
  color: var(--mountainFog);
  min-height: 10vh;
  width: 100%; 
}

.hamburger {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1000;
  position: absolute;
  right: 1.5rem;
  top: 0.5rem;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: white;
  margin: 6px 0;
  transition: all 0.35s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.navLinks {
  display: none;               
  flex-direction: column;
  left: 0;
  width: 100%;
  padding: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.navLinks a { 
  color: white;
  text-decoration: none;
  padding: 1rem 0;
  font-size: 1.4rem;
  border-bottom: 1px solid var(--blueRidgeParkway);
}

.navLinks.active {
  display: flex;
  flex-direction: column;
}

/* ====================== MEDIA QUERIES ====================== */

@media (min-width: 480px) { 
  .mainContainer,
  .container {
    padding: var(--spacing-md); 
  }
}

@media (min-width: 768px) {
  .topnav {
    justify-content: space-evenly;
    height: clamp(10vh, 12vh, 14vh);
  }

  .navLinks {
    display: flex;               
    flex-direction: row;
    justify-content: space-evenly;
    width: clamp(60%, 80%, 100%);
    background: none;
    padding: 0;
    box-shadow: none;
  }
  
  .hamburger {
    display: none; 
  }

  .container {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
  }
}

@media (min-width: 1024px) {
  .mainContainer {
    padding: var(--spacing-lg);
  }
}

/* ====================== NIGHT / EVENING THEME ====================== */

.body {
  background-color: #070031;
  color: #ffffffdf;
  background-image: linear-gradient(rgba(7, 0, 49, 0.68), rgba(7, 0, 49, 0.78)), 
                    url('/media/rainierNightSky.jpeg'); 
  background-size: cover;           
  background-position: center;      
  background-repeat: no-repeat;     
  background-attachment: fixed;     
}

.mainContainer > .container,
.aside.localTime {
  background-color: rgba(20, 20, 49, 0.94);
  backdrop-filter: blur(4px);
}

.socialLinks a {
  background-color: rgba(20, 20, 49, 0.9);
}