/* --- CSS Variables & Theme (Ambient Mesh Nebula) --- */
:root {
    --bg-dark: #000000;
    /* Pure deep black abyss */
    --text-main: #f5f5f7;
    /* Soft white */
    --text-muted: rgba(255, 255, 255, 0.5);

    --nebula-core: rgba(142, 45, 226, 0.45);
    /* Deep vibrant violet */
    --nebula-glow: rgba(0, 210, 255, 0.4);
    /* Ethereal cyan */
    --nebula-edge: rgba(10, 50, 120, 0.3);
    /* Deep mystery blue */

    --accent: #00d2ff;

    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;

    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.04);
}

/* --- Global Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;

    /* Apply the real nebula photo globally with a heavy dark overlay to preserve minimalism */
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.95) 100%), url('https://files.manuscdn.com/user_upload_by_module/session_file/309914913067794821/mnbZRPGkEQHCxwDQ.jpg');
    background-size: cover;
    background-position: center 20%;
    background-attachment: fixed;
}

/* --- Real Photographic Nebula Background --- */
.hero {
    position: relative;
    z-index: 1;
    /* Keep content above background */
    min-height: 45vh;
    /* Reduced from 100vh for a tighter layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Shift from center to professional left-alignment */
    text-align: left;
    padding: 6rem 5% 0;
    /* Tighter margins for left alignment */
    background: transparent;
    /* Background handles globally via body */
}

/* Force Left Alignment for VC Grid */
.hero-content {
    width: 100%;
    max-width: 900px;
    text-align: left;
    margin: 0;
}

.hero-content .main-title,
.hero-content .slogan,
.hero-content .secondary-slogan,
.hero-content .hero-about p {
    text-align: left;
}

/* --- Single Screen Layout Modifiers --- */
.layout-single {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.layout-single .hero {
    flex: 1 1 auto;
    min-height: 0;
    padding-top: 6rem;
    /* Space for navbar */
    padding-bottom: 0;
}

.layout-single .footer {
    flex: 0 0 auto;
    padding: 0 5% 4rem 5%;
    /* Align with hero content using same 5% padding */
    background: transparent;
}

.layout-single .footer-bottom {
    margin-top: 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    /* Compressed from 3rem */
    text-align: center;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    font-weight: 300;
    color: var(--text-muted);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
    /* Makes it visible on dark/light backgrounds */
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-body);
    /* Elegant sans-serif matching the image */
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 5px;
    /* Wide luxurious tracking */
    color: #fff;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    margin-bottom: 3px;
    /* Slightly lift it to align with the text optical center */
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-weight: 300;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.7;
}

.btn-pitch {
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
}

.btn-pitch:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
}

.main-title {
    font-size: clamp(3rem, 8vw, 6.5rem);
    /* Massive, confident size */
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    /* Tight tracking for Serif headers */
    text-transform: none;
    /* Keep Title Case */
    font-weight: 500;
}

.slogan {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 2.5rem;
    letter-spacing: 0;
    font-weight: 400;
}

.secondary-slogan {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.hero-about {
    max-width: 550px;
    margin: 0;
    /* Left align */
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
    opacity: 0;
    /* for reveal animation */
    animation: fadeUp 1s ease 1s forwards;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.hero-subtext {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
    animation: bounce 2s infinite;
}

.scroll-indicator p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mouse {
    width: 20px;
    height: 30px;
    border: 2px solid var(--text-muted);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 2px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* --- Thesis Section --- */
.thesis-section {
    padding: 10rem 0;
}

.thesis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    /* Compressed from 3rem 2rem */
    border-radius: 12px;
    transition: transform 0.4s ease, background 0.4s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
}

.glass-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

/* --- Focus Areas Section --- */
.focus-section {
    padding: 5rem 0 10rem 0;
}

.focus-list {
    max-width: 800px;
    margin: 0 auto;
}

.focus-item {
    display: flex;
    gap: 3rem;
    padding: 3rem 0;
    border-bottom: 1px solid var(--glass-border);
    align-items: flex-start;
}

.focus-item:last-child {
    border-bottom: none;
}

.focus-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-style: italic;
    color: var(--accent);
    opacity: 0.5;
    line-height: 1;
}

.focus-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* --- Thoughts (Blog) Section --- */
.thoughts-section {
    padding: 2rem 0;
    /* Compressed from 5rem */
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* slightly smaller minmax */
    gap: 1.2rem;
    /* Compressed from 2rem */
}

.blog-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-main);
    cursor: pointer;
    min-height: 160px;
    /* Compressed from 200px */
}

.blog-card h3 {
    font-size: 1.4rem;
    line-height: 1.4;
}

.read-more {
    margin-top: 1.5rem;
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.blog-card:hover .read-more {
    opacity: 1;
}

/* --- Footer --- */
.footer {
    padding: 3rem 0 2rem 0;
    /* Compressed from 8rem to 4rem */
    text-align: left;
    background: transparent;
}

.footer p {
    max-width: 500px;
    margin: 0 auto 1.5rem auto;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 3rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.contact-links {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
    margin-top: 2rem;
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 3rem;
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.footer-bottom {
    margin-top: 3rem;
    /* Compressed from 6rem */
    font-size: 0.8rem;
    opacity: 0.5;
}

/* --- Animations --- */
.target-reveal,
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.scroll-reveal.active,
.target-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay hero elements slightly */
.hero .main-title {
    transition-delay: 0.2s;
}

.hero .slogan {
    transition-delay: 0.4s;
}

.hero .hero-subtext {
    transition-delay: 0.6s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Simplification for mobile */
    }

    .focus-item {
        flex-direction: column;
        gap: 1rem;
    }
}

/* -------------------------------------------------------- GALAXY MODE OVERRIDES & UI -------------------------------------------------------- */
body.galaxy-mode {
    overflow: hidden;
    background-color: #050510;
    /* Apply the new high-res nebula photo globally with a heavy dark overlay to preserve minimalism */
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(5, 5, 16, 1) 100%), url('https://files.manuscdn.com/user_upload_by_module/session_file/309914913067794821/mnbZRPGkEQHCxwDQ.jpg');
    background-size: cover;
    background-position: center;
}

#galaxy-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Lowest layer */
}

/* Floating Navigation */
/* Floating Navigation */
.floating-nav {
    position: fixed;
    /* Switch to fixed so it stays atop */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    /* Higher than footer and hero */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    /* Add shadow to prevent text bleed */
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 1.5rem 5%;
    /* Align with container */
}

/* Hero Floating Title */
.hero-floating {
    position: absolute;
    top: 25%;
    /* Moved significantly higher so it clears the core of the galaxy */
    left: 5%;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to canvas */
    transition: opacity 0.5s ease;
}

.hero-floating .main-title {
    font-size: clamp(3.5rem, 6vw, 5rem);
    /* Scalable elegant typography */
    margin-bottom: 5px;
    letter-spacing: -1px;
}

.hero-floating .slogan {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    max-width: 600px;
    opacity: 0.8;
}

/* Floating Footer */
.footer-floating {
    position: fixed;
    /* Fixed to bottom, preventing overlap with top absolute elements */
    bottom: 2rem;
    left: 5%;
    z-index: 40;
    pointer-events: auto;
    /* Allow clicking the buttons */
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-floating .contact-links {
    margin-top: 0;
    display: flex;
    gap: 1rem;
}

.footer-floating .btn-primary,
.footer-floating .btn-secondary {
    padding: 0.8rem 2rem;
    font-size: 0.8rem;
    border-radius: 4px;
    /* Slightly squarer for professional VC look */
}

.footer-floating p {
    font-size: 0.8rem;
    opacity: 0.5;
    margin: 0;
    letter-spacing: 1px;
}

/* Info Card (Glassmorphism) */
#star-info-card {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    width: 450px;
    padding: 3rem 2.5rem;
    background: rgba(5, 5, 8, 0.6);
    /* Deeper, more elegant dark bg */
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Thinner, subtler border */
    border-radius: 8px;
    /* Sharper corners for a professional feel */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 30;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#star-info-card.hidden {
    opacity: 0;
    transform: translateY(-45%) scale(0.98);
    /* Smoother fade out */
    pointer-events: none;
}

.card-content {
    position: relative;
    z-index: 2;
}

#star-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #ffffff;
    letter-spacing: -0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

#star-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

#close-card-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 3;
}

#close-card-btn:hover {
    color: #ffffff;
    transform: rotate(90deg);
}

/* Central loading screen */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050510;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(168, 178, 255, 0.1);
    border-top: 2px solid var(--accent-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 25px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsiveness */
@media (max-width: 768px) {
    .hero-floating {
        left: 5%;
        top: 20%;
        transform: none;
    }

    .hero-floating .main-title {
        font-size: 3rem;
    }

    #star-info-card {
        right: 5%;
        left: 5%;
        width: 90%;
        top: auto;
        bottom: 5%;
        transform: none;
    }

    #star-info-card.hidden {
        transform: translateY(20px) scale(0.95);
    }
}