/* ==========================================================================
   CSS: Core Variables & Font Import
   ========================================================================== */
/* Import main fonts. Use 'swap' to reduce FOUT, but fallback is possible until loaded. */
@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

:root {
    --font-title: 'Lobster', cursive;
    --font-body: 'Source Code Pro', monospace;
    --navbar-height: 64px;
}

/* ==========================================================================
   CSS: Base Reset & Smooth Scrolling
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

/* 
    Fade-in effect on page load. 
    - Site initially visible (no white screen/hiding)
    - Fallback font (e.g., Arial) may show briefly due to font-display:swap, 
      but this is preferred to a white or blank screen.
    - When fonts are loaded, the site fades in a little for pleasantness.
    - If you wish to avoid FOUT fully, JS is needed to hide body until fonts load (but that's not the CSS responsibility and you said the site is white now).
*/
body {
    font-family: var(--font-body);
    font-size: 16px;
    color: #eaeaea;
    overflow-x: hidden;
    opacity: 1;
    visibility: visible;
    animation: pageFadeIn 0.7s ease-out;
    transition: opacity 0.7s;
    background: none;
}

/* Optionally, for a slightly more pronounced fade on refresh/open: */
body.fade-onload {
    opacity: 0;
    animation: pageFadeIn 0.7s ease-out forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* The rest of your site styles remain normal -- there is no hacky hiding or blinding white screen. */


/* ==========================================================================
   CSS: Background and Parallax Effects
   ========================================================================== */
.parallax-bg {
    position: fixed;
    inset: 0;
    background-image: url('../images/Home_BG.jpg');
    background-size: cover;
    background-position: center bottom;
    transform: scale(1.05);
    z-index: -2;
    will-change: transform;
}

/* ==========================================================================
   CSS: Navbar Structure & Glass Visuals
   ========================================================================== */
.navbar {
    position: fixed;
    top: 12px;
    left: 0;
    right: 0;
    width: 100vw;
    height: var(--navbar-height);
    padding: 0 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    z-index: 1000;
    background: transparent;
    box-shadow: none;
    border-radius: 16px 16px 0 0;
}

.navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(7, 9, 15, 0.18);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: inherit;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    pointer-events: none;
    z-index: -1;
}

.navbar.scrolled::before {
    background: rgba(7, 9, 15, 0.32);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.navbar-right { gap: 20px; }
.navbar-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
}

/* ==========================================================================
   CSS: Navbar Interactive Elements (Search, Items, Dropdown)
   ========================================================================== */
.nav-search {
    width: 100%;
    max-width: none;
}

.nav-search-input {
    width: 100%;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    background: rgba(3, 6, 12, 0.38);
    color: #f7f7f7;
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.60);
}

.nav-search-input:focus {
    border-color: #95e1a3;
    background: rgba(3, 6, 12, 0.52);
    box-shadow: 0 0 0 3px rgba(149, 225, 163, 0.15);
}

.navbar a,
.navbar .nav-item,
.navbar a:hover,
.navbar a:focus,
.navbar a:active,
.navbar a:visited,
.navbar .nav-item:hover,
.navbar .nav-item:focus,
.navbar .nav-item:active,
.navbar .nav-item:visited {
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    background: none !important;
    outline: none !important;
}

.navbar a::after, .navbar a::before,
.navbar .nav-item::after, .navbar .nav-item::before,
.navbar a:hover::after, .navbar a:hover::before,
.navbar .nav-item:hover::after, .navbar .nav-item:hover::before {
    content: none !important;
    display: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    width: 0 !important;
    height: 0 !important;
    transform: none !important;
    transition: none !important;
    background-size: 0 !important;
}

.nav-item {
    position: relative;
    cursor: pointer;
    user-select: none;
    color: #e0e0e0;
    font-size: 15px;
    padding: 8px 0;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav-item::after {
    display: none !important;
    content: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    width: 0 !important;
    height: 0 !important;
    transform: none !important;
    transition: none !important;
    background-size: 0 !important;
}

.nav-item:hover {
    color: #ffffff;
}

.dropdown {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(24, 24, 28, 0.96);
    min-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0,0,0,0.45);
    z-index: 200;
    transform: translateY(-8px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.dropdown a {
    display: block;
    padding: 14px 20px;
    color: #d6d6d6;
    text-decoration: none;
    font-size: 14px;
    font-family: var(--font-body);
    letter-spacing: 0.04em;
    transition: background 0.18s ease, color 0.18s ease;
}

.dropdown a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f0f0f0;
}

.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* ==========================================================================
   CSS: Hero Section & Core Content Sections
   ========================================================================== */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section {
    min-height: calc(100vh - var(--navbar-height));
    margin-top: calc(var(--navbar-height) + 32px);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-inline: 24px;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 1000px;
    margin-inline: auto;
}

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(3rem, 10vw, 7.5rem);
    font-weight: 600;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: 0.5px;
    opacity: 0;
    text-shadow: 0 0 6px rgba(0,0,0,0.5), 1px 2px 6px rgba(0,0,0,0.65);
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
    animation: heroFadeIn 0.7s ease-out forwards;
    word-wrap: break-word;
}
.word-for   { color: #ff6b6b; letter-spacing: 0.06em; }
.word-the   { color: #95e1a3; letter-spacing: 0.12em; }
.word-gifted{ color: #4a9eff; letter-spacing: 0.16em; }

.nav-title {
    font-family: var(--font-title);
    font-weight: 600;
}

.text-muted {
    font-style: italic;
    opacity: 0.75;
}

.highlight {
    font-weight: 600;
    color: #8ab4f8;
}

.hero-subtitle {
    font-family: var(--font-body);
    letter-spacing: 2px;
    font-weight: 500;
    font-style: italic;
    color: rgba(255, 255, 255, 0.75);
    font-size: 18px;
    margin-top: 30px;
    opacity: 0;
    animation: heroFadeIn 0.7s ease-out forwards;
    animation-delay: 0.08s;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(0,0,0,0.15), transparent 40%),
                linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    z-index: 0;
    pointer-events: none;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    animation: bounce 2s infinite;
    text-decoration: none !important;
    outline: none !important;
    border: none !important;
    background: none !important;
    cursor: pointer;
}

.scroll-indicator:focus,
.scroll-indicator:active,
.scroll-indicator:hover,
.scroll-indicator:visited {
    text-decoration: none !important;
    outline: none !important;
    border: none !important;
    background: none !important;
    color: rgba(255, 255, 255, 0.6);
}

/* Core site content wrapper and scroll target section */
#scroll-target,
.content-section {
    background: linear-gradient(180deg, #1a2844 0%, #0d1829 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 24px 40px 24px;
    position: relative;
}

/* ==========================================================================
   CSS: "Central" Section, Content Links, and Footer
   ========================================================================== */
.central-container {
    text-align: center;
    max-width: 800px;
    margin-bottom: 100px;
    padding-inline: 8px;
}

.central-title {
    font-family: var(--font-title);
    font-size: 80px;
    color: white;
    margin-bottom: 60px;
    font-weight: normal;
    font-style: italic;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

.link-item {
    font-size: 20px;
    color: white;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.link-label {
    color: rgba(255, 255, 255, 0.9);
}

.link {
    color: #4a9eff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}
.link:hover {
    color: #6bb3ff;
    border-bottom-color: #4a9eff;
}

.contact-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

/* ==========================================================================
   CSS: Archive Page Styles
   ========================================================================== */
.archive-page {
    min-height: 100vh;
    padding: 100px 40px 60px 40px;
    background: linear-gradient(180deg, #111827 0%, #060b12 100%);
    font-family: var(--font-body);
    color: #f5f5f5;
}

.archive-page__header {
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.archive-page__title {
    font-size: 40px;
    margin-bottom: 10px;
    letter-spacing: 0.12em;
}

.archive-page__subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.65);
}

.archive-page__content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 16px;
}

.archive-entry {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.archive-entry__term {
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 0.08em;
}

.archive-entry__definition {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   CSS: Responsive Breakpoints & Accessibility
   ========================================================================== */
@media (max-width: 768px) {
    .navbar         { padding: 0 16px; gap: 16px; }
    .navbar-inner   { gap: 16px; }
    .navbar-left,
    .navbar-right   { gap: 12px; }
    .navbar-center  { max-width: 260px; }
    .navbar-right   { gap: 12px; }
    .nav-search-input { font-size: 14px; padding: 8px 16px; }
    .hero-title     { font-size: clamp(2.5rem, 8vw, 3.75rem); }
    .hero-subtitle  { font-size: 14px; }
    .central-title  { font-size: 50px; }
    .link-item      { font-size: 16px; flex-direction: column; gap: 5px; }
    .contact-footer { font-size: 11px; }
}

@media (max-width: 480px) {
    .navbar         { padding: 0 12px; gap: 12px; }
    .navbar-left    { display: none; }
    .navbar-center  { max-width: 220px; }
    .dropdown       { min-width: 160px; }
    .nav-item       { font-size: 13px; }
    .nav-search-input { font-size: 13px; padding: 7px 14px; }
    .hero-title     { font-size: clamp(2.25rem, 9vw, 2.75rem); }
    .central-title  { font-size: 40px; }
    .link-item      { font-size: 14px; }
}

/* Reduce motion for accessibility: disables transforms and fades */
@media (prefers-reduced-motion: reduce) {
    .parallax-bg    { transform: none !important; }
    .hero-title,
    .hero-subtitle  { animation: none !important; opacity: 1 !important; }
    body            { animation: none !important; opacity: 1 !important; }
}

/* ==========================================================================
   CSS: Remove ALL Decorations from Home Nav
   ========================================================================== */
a.nav-item.nav-home,
.nav-item.nav-home,
.navbar-left .nav-item.nav-home,
a.nav-item.nav-home:hover,
.nav-item.nav-home:hover,
.navbar-left .nav-item.nav-home:hover,
a.nav-item.nav-home:focus,
.nav-item.nav-home:focus,
.navbar-left .nav-item.nav-home:focus,
a.nav-item.nav-home:active,
.nav-item.nav-home:active,
.navbar-left .nav-item.nav-home:active {
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    background: none !important;
    outline: none !important;
}

a.nav-item.nav-home::after,
a.nav-item.nav-home::before,
.nav-item.nav-home::after,
.nav-item.nav-home::before,
a.nav-item.nav-home:hover::after,
a.nav-item.nav-home:hover::before,
.nav-item.nav-home:hover::after,
.nav-item.nav-home:hover::before {
    content: none !important;
    display: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    width: 0 !important;
    height: 0 !important;
    transition: none !important;
    transform: none !important;
    background-size: 0 !important;
}

/* ==========================================================================
   CSS: Typewriter Effect for Hero Subtitle
   ========================================================================== */
.hero-subtitle[data-typewriter] {
    position: relative;
    display: inline-block;
    min-height: 1em;
}

.typewriter-cursor {
    display: inline-block;
    width: 1ch;
    animation: blink-cursor 0.8s steps(2, start) infinite;
    color: #fff;
    vertical-align: bottom;
    font-family: inherit;
    font-size: 1em;
}
@keyframes blink-cursor {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================================
   CSS: Homepage Hero Heading (Large Display Title)
   ========================================================================== */
.homepage-hero-heading {
    text-align: center;
    font-family: 'Pacifico', 'Lobster', cursive, sans-serif;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.04em;
    font-size: clamp(3.8rem, 14vw, 8.3rem);
    margin: 0 auto 28px;
    line-height: 1.04;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0.12em;
    position: relative;
}
.homepage-hero-heading .word-for,
.homepage-hero-heading .word-the,
.homepage-hero-heading .word-gifted {
    display: inline-block;
    position: relative;
    font-family: inherit;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.08em;
    line-height: 1.06;
    padding: 0 0.04em;
}
.homepage-hero-heading .word-for {
    color: #ff6461;
    text-shadow:
        -2.5px -2.5px 0 #000,   2.5px -2.5px 0 #000,   -2.5px 2.5px 0 #000,   2.5px 2.5px 0 #000,
        0px -3.2px 0 #000,      0px 3.2px 0 #000,       3.2px 0px 0 #000,     -3.2px 0px 0 #000,
        0 0 2.5px #000, 0 0 5px #000,
        0 0 12px #ff6461bb,
        0 0 24px #ffceb5aa,
        0 6px 28px rgba(20,22,22,0.22),
        0 12px 65px rgba(0,0,0,0.21)
    ;
}
.homepage-hero-heading .word-the {
    color: #a8fca4;
    text-shadow:
        -2.5px -2.5px 0 #000,   2.5px -2.5px 0 #000,   -2.5px 2.5px 0 #000,   2.5px 2.5px 0 #000,
        0px -3.2px 0 #000,      0px 3.2px 0 #000,       3.2px 0px 0 #000,     -3.2px 0px 0 #000,
        0 0 2.5px #000, 0 0 5px #000,
        0 0 12px #baffc599,
        0 0 28px #a8fca466,
        0 2.5px 10px #a8fca4aa,
        0 6px 28px rgba(20,22,22,0.22),
        0 12px 65px rgba(0,0,0,0.21)
    ;
}
.homepage-hero-heading .word-gifted {
    color: #56acff;
    text-shadow:
        -2.6px -2.6px 0 #000,   2.6px -2.6px 0 #000,   -2.6px 2.6px 0 #000,   2.6px 2.6px 0 #000,
        0px -3.3px 0 #000,      0px 3.3px 0 #000,       3.3px 0px 0 #000,     -3.3px 0px 0 #000,
        0 0 2.7px #000, 0 0 5.2px #000,
        0 0 13px #8adfffcc,
        0 0 33px #56acff77,
        0 6px 29px rgba(18,25,38,0.21),
        0 14px 66px rgba(0,0,0,0.19)
    ;
}
.homepage-hero-heading .separator {
    color: #f3f6fa;
    text-shadow:
        -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000,
        0px -2.2px 0 #000, 0px 2.2px 0 #000, 2.2px 0px 0 #000, -2.2px 0px 0 #000,
        0 0 1.7px #000,
        0 0 9px #f3f6fa44,
        0 4px 18px rgba(31,31,38,0.185)
    ;
    letter-spacing: 0;
    padding: 0 0.12em;
    font-size: 0.93em;
    font-family: inherit;
    opacity: 0.96;
    vertical-align: middle;
    font-weight: 700;
}

@media (max-width: 900px) {
    .homepage-hero-heading { font-size: clamp(2.55rem, 8vw, 5.15rem); }
}
@media (max-width: 529px) {
    .homepage-hero-heading {
        font-size: clamp(1.29rem, 8vw, 2.25rem);
        letter-spacing: 0.01em;
    }
}