/* *{
  outline: 1px solid red;
} */


:root {
    --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --text: #b0d4ff;
    --text-muted: #b0d4ff;
    --primary: #40c4ff;
    --primary-glow: rgba(64, 196, 255, 0.35);
    --accent: #a78bfa;
    --card: rgba(20, 25, 45, 0.82);
    --border: rgba(100, 180, 255, 0.18);
    --shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    --nav-link: #ffffff;

    --scrollbar-bg: #0f0c29;
    --scrollbar-thumb: #1e1b41;
    --scrollbar-hover: #5967ff;
    --profile-border: rgba(64, 196, 255, 0.45);
    --profile-inner-glow: rgba(64, 196, 255, 0.2);
    --item-bg-muted: rgba(64, 196, 255, 0.07);
    --item-bg-hover: rgba(64, 196, 255, 0.18);
    --btn-grad-start: #3a9eff;
    --btn-grad-end: #7a5aff;
    --btn-shadow: rgba(58, 158, 255, 0.25);
    --btn-hover-shadow: rgba(64, 196, 255, 0.4);
	  --btn-hover-active: rgba(64, 196, 255, 0.3);
    --white: #ffffff;
    --black: #000000;
    --header-bg: #051741;
    --header-bg-dark: #041233;
    --nav-dropdown-grad: linear-gradient(to bottom, #051741, #041233);
    --header-line: #ffffff;
    --header-after: rgba(255, 255, 255, 0.5);
    --box-shadow: rgba(0, 0, 0, 0.35);
    --header-nav: rgba(255, 255, 255, 0.08);
}
.light-theme {
    --bg-gradient: linear-gradient(135deg, #f0f4f8, #e2e8f0, #d1d9e6);
    --card: rgba(255, 255, 255, 0.9);
    --border: rgba(0, 86, 179, 0.15); 
    --shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
    --nav-link: #000000;
    
    --text: #ffffff;       
    --text-muted: #334155; 
    
    --primary: #0056b3;    
    --primary-glow: rgba(0, 86, 179, 0.15);
    --accent: #553c9a;

    --header-bg: #ffffff;        
    --header-bg-dark: #0f172a;
    --nav-dropdown-grad: linear-gradient(to bottom, #1e293b, #0f172a);
    --header-line: #00aeff;      
    --header-after: rgba(64, 196, 255, 0.4);
    --header-nav: rgba(255, 255, 255, 0.1); 
    --box-shadow: rgba(0, 0, 0, 0.2);

    --theme-btn-rect: rgba(0, 0, 0, 1);
    --theme-btn-rect-hover: rgba(255, 255, 255, 0.2);
    --item-bg-muted: rgba(0, 86, 179, 0.08);
    --item-bg-hover: rgba(0, 86, 179, 0.12);
    
    --scrollbar-bg: #e2e8f0;
    --scrollbar-thumb: #cbd5e0;
    --scrollbar-hover: #0056b3;

    --btn-grad-start: #0056b3;
    --btn-grad-end: #553c9a;
    --btn-shadow: rgba(0, 86, 179, 0.25);
    --btn-hover-shadow: rgba(0, 86, 179, 0.4);
    --btn-hover-active: rgba(0, 86, 179, 0.3);

    --profile-border: rgba(0, 86, 179, 0.25);
    --profile-inner-glow: rgba(0, 0, 0, 0.05);

    --white: #ffffff;
    --black: #000000;
}


body { background-color: var(--header-bg); } 

/* Base Toggle Button Styles */
.theme-btn-rect {
    background: var(--theme-btn-rect);
    border: 1px solid var(--border); 
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px; 
    cursor: pointer;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.mode-text{
  color: var(--white);
}

.theme-btn-rect:hover {
    background: var(--theme-btn-rect-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.theme-btn-rect:hover .mode-text{
  color: var(--primary);
}

.icon-moon { display: none; }
.light-theme .icon-sun { display: none; }
.light-theme .icon-moon { display: inline-block; }

.page-wrapper { opacity: 1; }
.page-wrapper {
    position: relative;
    background-color: transparent !important; 
    animation: page-sync-reveal 1.5s linear forwards;
}

@keyframes page-sync-reveal {
    0%, 20% { 
        opacity: 0 !important; 
        visibility: hidden;
        filter: brightness(0);
    }
    
    21% { 
        opacity: 0.1; 
        visibility: visible;
        filter: brightness(0.2);
    } 
    
    100% { 
        opacity: 1 !important; 
        visibility: visible;
        filter: brightness(1);
    }
}

header {
    font-family: "Space Grotesk", sans-serif;
    color: var(--white);
    background-color: var(--header-bg);
    background: var(--header-bg);
    min-height: 100px;
    width: 100%;
    padding: 0 24px;
    position: relative;
    justify-content: space-between; 
    align-items: center;
    padding: 0 5%; 
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: var(--black) 0px 2px 4px;
    animation: header-color-restore 1.5s linear forwards;
}

@keyframes header-color-restore {
    0%, 20% { background-color: var(--header-bg) !important; }
    100%    { background-color: var(--header-bg) !important; } 
}

header::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%; 
    background: var(--header-line);
    box-shadow: 0 0 10px var(--header-line), 0 0 20px var(--header-after);
    
    animation: solid-slide-reveal 1.5s linear forwards;
}

@keyframes solid-slide-reveal {
    0%, 20% { 
        width: 0%; 
    }
    
    21% { 
        width: 0%;  
    }
    
    100% { 
        width: 70%; 
    }
}
.page-wrapper.animate-trigger {
    animation: page-sync-reveal 1.5s linear forwards;
}

header.animate-trigger {
    animation: header-color-restore 1.5s linear forwards;
}

header.animate-trigger::after {
    animation: solid-slide-reveal 1.5s linear forwards;
}






.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

header img {
  height: 85px;
}

.clock {
  height: 28px;
}

header nav {
  margin-left: auto;
  display: flex;
  gap: 32px;
  align-items: center;
  margin-right: 10%;
}

.logo-light {
    display: none;
    height: 75px;
}

.light-theme .logo-dark {
    display: none;
}

.light-theme .logo-light {
    display: block;
}

header nav a {
  text-decoration: none;
  color: var(--nav-link);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
}

header nav a:hover {
  border-bottom: 2px solid var(--white);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
}

@media (max-width: 960px) {
  .logo-light{
    height: 60px;
  }
}



@media (max-width: 900px) {
  header {
    padding: 0 16px;
  }

  header img {
    height: 64px;
  }

  .logo-light{
    height: 56px;
  }

  header nav {
    gap: 20px;
    margin-right: 5%;
  }
}










@media (max-width: 800px) {
  .menu-toggle {
    display: block;
    font-size: 2.2rem;
    color: var(--nav-link);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    margin-right: 10%;
    margin-left: auto; 
  }

  header nav {
    position: absolute;
    top: 100%; 
    left: 0;
    width: 100%;
    background: var(--header-bg) !important;
    background-image: var(--nav-dropdown-grad); 
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 20px var(--box-shadow);
    
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: all 0.3s ease;
    margin-left: -0.9em;
  }

  header nav.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }


  header nav a {
    width: 100%;
    text-align: center;
    padding: 18px 0;
    color: var(--nav-link);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--header-nav);
    transition: background 0.2s;
  }

  header nav a:hover {
    background: var(--item-bg-hover);
  }

  .theme-btn-rect {
    width: 60%;
    margin: 20px 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
  }
}















@media (max-width: 720px) {

  .menu-toggle {
    display: block;
    margin-left: 40%; 
    font-size: 2.2rem;
    color: var(--nav-link);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
  }

  header nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(
      to bottom,
      var(--header-bg),
      var(--header-bg)
    );
    flex-direction: column;
    align-items: center;
    gap: 0; 
    padding: 20px 0;
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 20px var(--box-shadow);
    
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  header nav.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  header nav a {
    width: 100%;
    text-align: center;
    padding: 16px 0;
    color: var(--nav-link);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--header-nav);
    
  }

  header nav a:hover {
    background: var(--header-nav);
  }

  .theme-btn-rect {
    width: 80%;
    margin: 15px 0;
    padding: 12px;
  }
}
/* --- Compact Mobile Viewport (Max 580px) --- */
@media (max-width: 580px) {
  header {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: row; 
    justify-content: space-between; 
    align-items: center;
    background: var(--header-bg);
    z-index: 1000;
  }

  .brand {
    display: flex;
    align-items: center;
    margin: 0; 
  }

  .logo-light, .logo-dark {
    height: 56px; 
    width: auto;
  }

  .menu-toggle {
    display: block;
    margin: 0; 
    font-size: 2rem;
    color: var(--nav-link);
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 10%;
  }

  header nav {
    position: absolute;
    top: 100%; 
    left: 0;
    width: 100%;
    background: var(--header-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0; 
    padding: 20px 0;
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 20px var(--box-shadow);
    
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  header nav.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  header nav a {
    width: 100%;
    text-align: center;
    padding: 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--nav-link);
    border-bottom: 1px solid var(--header-nav);
    transition: background 0.2s;
  }

  .theme-btn-rect {
    width: 80%;
    margin: 20px auto; 
    padding: 12px;
    background: var(--theme-btn-rect);
    color: white;
    border-radius: 8px;
    display: block;
  }
}