:root {
    --bg-color: #0d0d0d;
    --card-bg-color: rgba(26, 26, 26, 0.7);
    --text-color: #e0e0e0;
    --primary-accent: #00aaff;
    --secondary-accent: #888;
    --nav-height: 70px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { 
    scroll-behavior: smooth; 
    background-color: var(--bg-color);
    overflow-x: hidden;
}
body { 
    font-family: 'Poppins', sans-serif; 
    color: var(--text-color); 
    line-height: 1.8; 
}

/* --- Core Elements & Background --- */
.progress-bar { position: fixed; top: 0; left: 0; height: 4px; background: var(--primary-accent); width: 0%; z-index: 10001; transition: opacity 0.5s ease-in-out; }
#constellation-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.page-content { 
    position: relative; 
    z-index: 2;
    transition: filter 0.3s ease-in-out, opacity 0.5s ease-in-out;
    padding-top: var(--nav-height);
}
.page-content.blurred { filter: blur(5px); pointer-events: none; }
#transition-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: var(--bg-color); z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.4s ease-in-out; }
#transition-overlay.active { opacity: 1; pointer-events: all; }
.mobile-nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 998; opacity: 0; pointer-events: none; transition: opacity 0.3s ease-in-out; }
.mobile-nav-overlay.active { opacity: 1; pointer-events: auto; }

/* --- Nav Bar --- */
nav { 
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: var(--nav-height);
    display: flex;
    align-items: center;
    z-index: 1000; 
    background: rgba(13, 13, 13, 0.7); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    transition: opacity 0.5s ease-in-out;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1100px; margin: auto; padding: 0 2rem; }

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.9), /* Crisp White */
        0 0 8px rgba(173, 216, 230, 0.9), /* Light Blue */
        0 0 12px rgba(0, 170, 255, 0.7),   /* Primary Accent Blue */
        0 0 18px rgba(0, 170, 255, 0.5);   /* Faint Primary Accent Blue */
}

.nav-links { list-style: none; display: flex; gap: 2rem; position: relative; }

/* MODIFIED: Added base glow and updated transitions */
.nav-links a { 
    color: var(--text-color); 
    text-decoration: none; 
    font-size: 0.95rem; 
    font-weight: 400; 
    transition: color 0.3s ease, transform 0.2s ease, text-shadow 0.3s ease;
    padding-bottom: 8px;
    display: inline-block;
    text-shadow:
        0 0 2px rgba(255, 255, 255, 0.4),
        0 0 6px rgba(0, 170, 255, 0.3);
}

/* MODIFIED: Enhanced glow for hover and active states */
.nav-links a:hover,
.nav-links a.active { 
    transform: translateY(-3px);
    color: #fff;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.7),
        0 0 10px rgba(0, 170, 255, 0.6);
}

.active-indicator { position: absolute; bottom: 0; height: 3px; background-color: var(--primary-accent); border-radius: 2px; box-shadow: 0 0 10px var(--primary-accent), 0 0 20px var(--primary-accent); transition: left 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), width 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); }
.mobile-nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; z-index: 1003; }
.mobile-nav-toggle .fa-times { display: none; }
.mobile-nav-toggle.is-active .fa-bars { display: none; }
.mobile-nav-toggle.is-active .fa-times { display: block; color: #fff; }

/* --- Hero Section --- */
header#hero { height: 100vh; display: flex; justify-content: center; align-items: center; margin-top: calc(-1 * var(--nav-height)); }
.hero-content { text-align: center; }

.name-animation { 
    font-size: clamp(3rem, 10vw, 5rem); 
    font-weight: 700; 
    margin-bottom: 0.5rem; 
    background: linear-gradient(90deg, var(--primary-accent), #fff, var(--primary-accent)); 
    background-size: 200% auto; 
    color: #fff; 
    background-clip: text; 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    animation: shimmer 4s linear infinite; 
}
.tagline { font-size: clamp(1.1rem, 4vw, 1.5rem); font-weight: 400; color: var(--secondary-accent); cursor: pointer; user-select: none; }

@keyframes shimmer { to { background-position: -200% center; } }

.glowing-name {
    animation: pulse-glow-themed 3.5s ease-in-out infinite;
}

@keyframes pulse-glow-themed {
    0% {
        text-shadow:
            0 0 3px rgba(255, 255, 255, 0.7),
            0 0 8px rgba(0, 170, 255, 0.8),
            0 0 18px rgba(0, 170, 255, 0.3);
    }
    50% {
        text-shadow:
            0 0 4px rgba(255, 255, 255, 0.8),
            0 0 10px rgba(0, 170, 255, 0.9),
            0 0 20px rgba(0, 170, 255, 0.35),
            0 0 30px rgba(100, 200, 255, 0.15);
    }
    100% {
        text-shadow:
            0 0 3px rgba(255, 255, 255, 0.7),
            0 0 8px rgba(0, 170, 255, 0.8),
            0 0 18px rgba(0, 170, 255, 0.3);
    }
}

/* --- Content Layout --- */
main { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.content-section { padding: 4rem 0; display: flex; }

.card {
    position: relative;
    width: 100%;
    max-width: 75%;
    border-radius: 16px;
    background: transparent;
    z-index: 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    transform: translateZ(0);
}

@keyframes rotate-border {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.card::before {
    content: '';
    position: absolute;
    z-index: -2;
    left: 50%;
    top: 50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 180deg, var(--primary-accent), #555, #fff, #555, var(--primary-accent));
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.card::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 1px;
    border-radius: 15px;
    background-color: var(--bg-color);
    background-image: radial-gradient(ellipse at center, rgba(35, 40, 50, 0.7), rgba(13, 13, 13, 0.8));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@media (hover: hover) {
    .card:hover {
        border-color: transparent;
    }
    .card:hover::before {
        opacity: 1;
        animation: rotate-border 4s linear infinite;
    }
}

.card-content {
    position: relative;
    z-index: 1;
}

.align-left { justify-content: flex-start; }
.align-right { justify-content: flex-end; }
.align-center { justify-content: center; }
.title-container { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.title-icon { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.2); flex-shrink: 0; }
.section-title { font-size: 2rem; color: #fff; line-height: 1.3; }
.section-text { font-size: 1.05rem; font-weight: 300; }
.highlight { color: var(--primary-accent); font-weight: 600; }

.skills-container { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.skill-tag { 
    background: rgba(0, 170, 255, 0.1); 
    border: 1px solid rgba(0, 170, 255, 0.2); 
    color: var(--primary-accent); 
    padding: 0.5rem 1rem; 
    border-radius: 20px; 
    font-size: 0.9rem; 
    font-weight: 500;
    transition: box-shadow 0.3s ease;
}

.skill-tag:hover {
    box-shadow: 0 0 5px rgba(0, 170, 255, 0.24);
}

.contact-links { margin-top: 2rem; display: flex; justify-content: center; gap: 2rem; }
.contact-links a { color: var(--secondary-accent); font-size: 2rem; transition: color 0.3s ease, transform 0.3s ease; }
.contact-links a:hover { color: var(--primary-accent); transform: translateY(-5px); }
footer { 
    max-width: 1100px; 
    margin: auto; 
    padding: 3rem 2rem; 
    text-align: center; 
    color: var(--secondary-accent); 
    font-size: 0.9rem;
    transition: opacity 0.5s ease-in-out;
}

/* --- SPACE MODE STYLES --- */
.space-mode-button {
    background: var(--primary-accent);
    color: #0d0d0d;
    font-weight: 600;
    border-color: var(--primary-accent);
    cursor: pointer;
    border-style: solid;
}
.space-mode-button:hover {
    box-shadow: 0 0 15px var(--primary-accent);
}

.space-clock-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    background: rgba(255, 255, 255, 0.00475);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 2.5rem 9.0rem;
    text-align: center;
    color: #fff;
}

.space-clock-date, .space-clock-greeting {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.8;
}

.space-clock-time {
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 600;
    line-height: 1.1;
    margin: 0.5rem 0;
    letter-spacing: -0.05em;
}

body.space-mode-active nav,
body.space-mode-active .page-content,
body.space-mode-active .progress-bar {
    opacity: 0;
    pointer-events: none;
}

body.space-mode-active,
body.space-mode-active html {
    overflow: hidden;
}
body.space-mode-active::-webkit-scrollbar {
    display: none; /* For Webkit browsers */
}

body.space-mode-active .space-clock-container {
    opacity: 1;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 900px) {
    .card { max-width: 100% !important; }
    .align-left, .align-right, .align-center { justify-content: center; }
}
@media (max-width: 768px) {
    main, .nav-container { padding: 0 1rem; }
    nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(13, 13, 13, 0.95); }
    .card::after { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(26, 26, 26, 0.9); }
    .space-clock-container { padding: 2rem 4rem; }
    
    .card {
        padding: 2rem 1.5rem;
    }
    .card-content {
        padding: 0;
    }

    .nav-links { 
        z-index: 1002; 
        position: fixed; top: 0; right: 0; 
        height: 100%; width: 70%; max-width: 300px; 
        background: rgba(22, 22, 22, 0.98); 
        border-left: 1px solid rgba(255, 255, 255, 0.1); 
        flex-direction: column; align-items: center; justify-content: center; 
        gap: 3rem; 
        transform: translateX(100%); 
        transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1); 
    }
    .nav-links li { opacity: 0; }
    .nav-links.nav-open { transform: translateX(0); }
    .active-indicator { display: none; }
    .mobile-nav-toggle { display: block; }
    .content-section { padding: 3rem 0; }
    .section-title { font-size: 1.8rem; }
    .section-text { font-size: 1rem; }
    .contact-links a { font-size: 2.5rem; }
}
/* Custom Scrollbar Styling */
/* This targets the entire scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

/* This styles the 'track' or the background of the scrollbar */
::-webkit-scrollbar-track {
    background: #0a0a1a; /* This should match your site's main background */
}

/* This styles the draggable 'thumb' of the scrollbar */
::-webkit-scrollbar-thumb {
    background: #4a4a8a; /* A subtle color from your palette */
    border-radius: 5px;
}

/* This makes the thumb brighter when you hover over it */
::-webkit-scrollbar-thumb:hover {
    background: #6a6ad4; /* Your brighter accent color */
}