/* ==========================================================================
   GLOBAL DESIGN SYSTEM & STYLESHEET
   Artist: Hailey Young (TAMUCC)
   Theme: Earthy Tech / Cyberpunk Edge with Glow and Light Elements
   ========================================================================== */

/*
   Pedagogical Comment:
   We declare global CSS Custom Properties (Variables) to establish a highly consistent,
   theme-driven design system.
   - Muted Lavender (#A18DA8): Used for primary accent, hover highlights, and active states.
   - Warm Taupe (#C4B49C): Used for secondary accents, lighter borders, and system status.
   - Rich Umber (#5C4B3E): The primary interactive element backdrop, card headers, and button fills.
   - Soft Muted Purple (#8E7E9B): Perfect for body text, muted labels, and neutral borders.
   - Dark Purple-Brown (#3E2E34): The deep, rich, low-light backdrop that anchors the aesthetic.
   - Warm Dark (#1A1414): A deeper variant of the dark backdrop for absolute background containment.
*/
:root {
  --color-pearl-aqua: #A18DA8;
  --color-tea-green: #bc9354;
  --color-dark-teal: #5C4B3E;
  --color-lavender-grey: #c7afdb;
  --color-midnight-violet: #3E2E34;
  --color-dark-bg: #2d1926;
  --color-card-bg: rgba(62, 46, 52, 0.6);
  --color-glow: rgba(161, 141, 168, 0.4);

  --font-logo: 'Saira', sans-serif;
  --font-body: 'Roboto Flex', sans-serif;

  --header-height: 70px;
  --footer-height: 80px;
  --transition-speed: 0.3s;
}

/*
   Pedagogical Comment:
   Enforcing Strict Viewport Confinement.
   By setting height: 100vh, width: 100vw, and overflow: hidden on html and body,
   we guarantee that the application behaves exactly like a native tablet/mobile app interface.
   No scrollbars will ever appear on the main browser window.
   Instead, all scrolling is delegated to isolated internal sub-containers.
*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: var(--font-body);
  background-color: var(--color-dark-bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(92, 75, 62, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(62, 46, 52, 0.3) 0px, transparent 50%);
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar Styles for Isolated Scrollable Sub-containers */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(26, 20, 20, 0.5);
}
::-webkit-scrollbar-thumb {
  background: var(--color-dark-teal);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-pearl-aqua);
}

/*
   Pedagogical Comment:
   UNIVERSAL FRAMING PERSISTENCE.
   The main layout is structured as a fixed top header, a fixed bottom navigation footer,
   and a sandwiched main content area calculated to fit perfectly between them.
*/
header.app-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(26, 20, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--color-dark-teal);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.logo-container a {
  text-decoration: none;
  font-family: var(--font-logo);
  font-size: 1.8rem;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  color: var(--color-pearl-aqua);
  text-shadow: 0 0 8px var(--color-glow);
  letter-spacing: 2px;
  transition: text-shadow var(--transition-speed) ease;
}

.logo-container a:hover {
  text-shadow: 0 0 15px var(--color-pearl-aqua);
}

/* Sliding Menu Burger Button */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 22px;
  z-index: 1001;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--color-pearl-aqua);
  border-radius: 2px;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 0 5px var(--color-glow);
}

/* Toggle Menu Active Animating Burger to X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6deg, -6px);
  transform: rotate(-45deg) translate(6px, -6px);
}

/*
   Pedagogical Comment:
   SLIDING TRANSITION MENU DRAWER.
   It starts positioned off-screen (transform: translateX(100%)) and slides in smoothly
   when the active class is toggled via JavaScript.
*/
.sliding-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background-color: rgba(26, 20, 20, 0.95);
  backdrop-filter: blur(15px);
  border-left: 2px solid var(--color-dark-teal);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 120px 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
}

.sliding-menu.active {
  transform: translateX(0);
}

.sliding-menu-title {
  font-family: var(--font-logo);
  color: var(--color-tea-green);
  font-size: 1.4rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-dark-teal);
  padding-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sliding-menu nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sliding-menu nav ul li a {
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--color-lavender-grey);
  transition: color var(--transition-speed) ease, padding-left var(--transition-speed) ease;
  display: block;
}

.sliding-menu nav ul li a:hover {
  color: var(--color-pearl-aqua);
  padding-left: 8px;
  text-shadow: 0 0 8px var(--color-glow);
}

/* Sandwiched Main Content Container */
main.app-content {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  overflow: hidden;
}

/*
   Pedagogical Comment:
   BOTTOM FIXED OS-STYLE NAVIGATION DOCK.
   Combines 5 square tile quick-launch buttons and an interactive mouse-tracking eye widget.
*/
footer.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-height);
  background-color: rgba(26, 20, 20, 0.85);
  backdrop-filter: blur(10px);
  border-top: 2px solid var(--color-dark-teal);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

/* 5 Square Tile App-Style Navigation Widgets */
.nav-dock-tiles {
  display: flex;
  gap: 0.5rem;
}

.dock-tile {
  width: 50px;
  height: 50px;
  background-color: var(--color-dark-teal);
  border: 1px solid var(--color-lavender-grey);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: #ffffff;
  transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.dock-tile:hover {
  transform: translateY(-5px);
  border-color: var(--color-pearl-aqua);
  box-shadow: 0 0 10px var(--color-pearl-aqua);
  background-color: var(--color-midnight-violet);
}

.dock-tile.active {
  border-color: var(--color-tea-green);
  box-shadow: 0 0 10px var(--color-tea-green);
  background-color: var(--color-midnight-violet);
}

.dock-tile i {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.dock-tile span.tile-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Interactive Eyes Container - Cyberpunk Theme Element */
#interactive-eyes-container {
  display: flex;
  gap: 8px;
  padding: 8px;
  background-color: rgba(92, 75, 62, 0.3);
  border: 1px solid var(--color-dark-teal);
  border-radius: 20px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.eye {
  width: 30px;
  height: 20px;
  background-color: #f5c6d0;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.eye::before,
.eye::after {
  content: '';
  position: absolute;
  top: -4px;
  width: 2px;
  height: 6px;
  background-color: #f5c6d0;
  border-radius: 1px;
}

.eye::before {
  left: 6px;
  transform: rotate(-20deg);
}

.eye::after {
  right: 6px;
  transform: rotate(20deg);
}

.pupil {
  width: 12px;
  height: 12px;
  background-color: #2a1018;
  border: 2px solid #e8879b;
  border-radius: 50%;
  position: absolute;
  transition: transform 0.05s linear;
}

/* Stationary center eyelash attached to the eye (not the pupil) */
.lash-center {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background-color: #f5c6d0;
  border-radius: 1px;
  z-index: 1;
}

/* Winged black eyeliner extending from the outer corner of each eye */
.eye-wing {
  position: absolute;
  top: 9px;
  width: 12px;
  height: 2px;
  background-color: #000000;
  border-radius: 2px;
  z-index: 2;
}

.eye:first-child .eye-wing {
  left: -10px;
  transform-origin: right center;
  transform: rotate(-20deg);
}

.eye:last-child .eye-wing {
  right: -10px;
  transform-origin: left center;
  transform: rotate(20deg);
}

/* Responsive Scaling for Layout Persistence Elements */
@media (max-width: 768px) {
  header.app-header {
    padding: 0 1rem;
  }

  .logo-container a {
    font-size: 1.4rem;
  }

  footer.app-footer {
    padding: 0 0.8rem;
  }

  .dock-tile {
    width: 44px;
    height: 44px;
  }

  .dock-tile span.tile-label {
    display: none; /* Hide label text on narrow mobile viewports to conserve space */
  }

  .dock-tile i {
    font-size: 1.4rem;
    margin-bottom: 0;
  }

  #interactive-eyes-container {
    padding: 6px;
  }

  .eye {
    width: 24px;
    height: 16px;
  }

  .eye::before {
    left: 4px;
    height: 5px;
  }

  .eye::after {
    right: 4px;
    height: 5px;
  }

  .lash-center {
    height: 5px;
  }

  .eye-wing {
    width: 8px;
    height: 1.5px;
    top: 7px;
  }

  .eye:first-child .eye-wing {
    left: -6px;
  }

  .eye:last-child .eye-wing {
    right: -6px;
  }

  .pupil {
    width: 10px;
    height: 10px;
  }
}
