/* --- Global Styles & Variables --- */
:root {
    --primary-color: #00f2ff;
    --secondary-color: #d000ff;
    --background-color: #02040a;
    --surface-color: rgba(13, 17, 23, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #b0c7e8;
    --heading-color: #ffffff;
    --font-body: 'Exo 2', sans-serif;
    --font-display: 'Orbitron', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-artistic: 'Aldrich', sans-serif;
    /* NEW FONT */
}

/* Base and scrollbar styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

/* --- Animated Backgrounds --- */
.aurora-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 10% 20%, rgba(0, 242, 255, 0.1), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(208, 0, 255, 0.1), transparent 40%);
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* --- Header & Navigation (NEW STYLES) --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 30px;
    background: rgba(2, 4, 10, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

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

.project-logo {
    height: 40px;
}

.project-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.nav-links a:hover {
    background-color: var(--border-color);
    color: var(--heading-color);
}

.nav-links a i {
    font-size: 1.1rem;
}

/* --- Hero Section (NEW TITLE STYLE) --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-headline {
    font-family: var(--font-artistic);
    font-size: clamp(2.8rem, 8vw, 6rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
    text-transform: uppercase;
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 20px rgba(0, 242, 255, 0.5);
}

.hero-headline span {
    display: block;
    opacity: 0;
    transform: translateY(50px);
    animation: floatUp 0.8s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-headline span:nth-child(2) {
    animation-delay: 0.1s;
}

.hero-headline span:nth-child(3) {
    animation-delay: 0.2s;
}

.hero-headline span:nth-child(4) {
    animation-delay: 0.3s;
}

@keyframes floatUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subheadline {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 3.5rem;
    max-width: 700px;
}

.scroll-down-button {
    position: relative;
    width: 28px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    display: block;
    margin: auto;
}

.scroll-down-button span {
    position: absolute;
    top: 30%;
    left: 50%;
    width: 2px;
    height: 10px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
    animation: scroll-anim 2s infinite;
}

@keyframes scroll-anim {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }

    40% {
        opacity: 1;
    }

    80% {
        transform: translate(-50%, 20px);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* --- NEW Data Comparison Section --- */
#comparison {
    padding-top: 0;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.comparison-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.column-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.column-header img {
    height: 40px;
}

.column-header i {
    font-size: 2.5rem;
    color: var(--text-color);
}

.column-header h3 {
    font-family: var(--font-display);
    margin: 0;
}

.stat-card {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 10px;
}

.stat-bar {
    height: 6px;
    border-radius: 3px;
}

.yaoverse-bar {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

.traditional-bar {
    background-color: #444;
}

/* --- General Content Sections --- */
.content-section {
    padding: 120px 20px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

/* --- Architecture & Components Section --- */
.component-directory {
    display: flex;
    gap: 30px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.component-list {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.component-tab {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.component-tab i {
    margin-right: 10px;
    color: var(--primary-color);
}

.component-tab:hover {
    background: var(--border-color);
    color: var(--heading-color);
}

.component-tab.active {
    background: var(--primary-color);
    color: var(--background-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.component-tab.active i {
    color: var(--background-color);
}

.component-details {
    flex-grow: 1;
    text-align: left;
}

.detail-content {
    display: none;
    animation: fadeIn 0.5s;
}

.detail-content.active {
    display: block;
}

.detail-role {
    font-family: var(--font-mono);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.detail-content h3 {
    font-family: var(--font-display);
}

.component-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 300;
}

.detail-content ul {
    list-style: none;
    margin-top: 1.5rem;
}

.detail-content ul li {
    margin-bottom: 0.5rem;
}

.detail-content ul li i {
    color: var(--secondary-color);
    margin-right: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Tech Stack Section --- */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: left;
}

.stack-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    transition: transform 0.3s, border-color 0.3s;
}

.stack-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.stack-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* --- Innovation Section --- */
.innovation-content {
    display: flex;
    gap: 40px;
    text-align: left;
    align-items: center;
}

.innovation-text {
    flex: 1.2;
}

.innovation-diagram {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cache-level {
    background: var(--surface-color);
    border-left: 3px solid;
    border-radius: 6px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.cache-level:hover {
    transform: translateX(10px);
}

.cache-level.l1 {
    border-color: var(--primary-color);
}

.cache-level.l2 {
    border-color: var(--secondary-color);
}

.cache-level.l3 {
    border-color: #ff6600;
}

.level-title {
    font-weight: bold;
}

.level-spec {
    font-family: var(--font-mono);
    background: var(--background-color);
    padding: 5px 10px;
    border-radius: 4px;
}

/* --- Footer (NEW DESIGN) --- */
.main-footer {
    background-color: #010409;
    padding: 40px 20px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-logos .logo-container {
    margin: 0;
}

.eggybyte-text-logo {
    max-width: 200px;
    height: auto;
    opacity: 0.8;
}

.footer-tagline {
    font-size: 0.9rem;
    max-width: 400px;
    color: var(--text-color);
    margin: 0 auto 30px auto;
}

.footer-bottom {
    font-size: 0.9rem;
    color: #8b949e;
}

/* --- Mobile Navigation (Fullscreen) --- */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s;
}

.nav-open .hamburger-menu span {
    background-color: white;
}

.nav-open .hamburger-menu span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-open .hamburger-menu span:nth-child(2) {
    opacity: 0;
}

.nav-open .hamburger-menu span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 4, 10, 0.95);
    backdrop-filter: blur(15px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

.nav-open .mobile-nav {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav a {
    color: white;
    font-family: var(--font-display);
    font-size: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s 0.2s, transform 0.3s 0.2s;
}

.nav-open .mobile-nav a {
    opacity: 1;
    transform: translateY(0);
}

.nav-open .mobile-nav a:nth-child(2) {
    transition-delay: 0.3s;
}

.nav-open .mobile-nav a:nth-child(3) {
    transition-delay: 0.4s;
}

.nav-open .mobile-nav a:nth-child(4) {
    transition-delay: 0.5s;
}

.nav-open .mobile-nav a:nth-child(5) {
    transition-delay: 0.6s;
}

/* --- Animations & Responsiveness --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .innovation-content {
        flex-direction: column-reverse;
    }

    .component-directory {
        flex-direction: column;
    }

    .component-list {
        flex-direction: row;
        flex-wrap: wrap;
        flex: 1 1 auto;
    }

    .component-tab {
        flex-grow: 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

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