:root {
    /* Color Palette */
    --bg-color: #0d1117;
    --surface-color: rgba(22, 27, 34, 0.7);
    --surface-border: rgba(48, 54, 61, 0.6);
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    
    /* Tech/Professional Accents */
    --accent-cyan: #00e5ff;
    --accent-blue: #2979ff;
    --accent-purple: #d500f9;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Transition & Animation */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Premium Global Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    background: var(--bg-color);
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: rgba(41, 121, 255, 0.2);
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.5);
}

/* Background Animated Elements */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    /* Subtle glowing orbs + premium dark glass grid overlay */
    background: 
        radial-gradient(circle at 15% 50%, rgba(41, 121, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 229, 255, 0.05) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
    background-position: center center;
    animation: pan-grid 60s linear infinite;
}

@keyframes pan-grid {
    0% { background-position: center center, center center, 0 0, 0 0; }
    100% { background-position: center center, center center, 0 500px, 500px 0; }
}

/* Standard Typography */
h1, h2, h3, h4 {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================
   Layout Containers
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Hero Header */
.hero-header {
    text-align: center;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.badge {
    background: rgba(41, 121, 255, 0.1);
    border: 1px solid var(--accent-blue);
    color: var(--accent-cyan);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: glow-pulse 2s infinite alternate;
}

@keyframes glow-pulse {
    0% { box-shadow: 0 0 5px rgba(41, 121, 255, 0.2); }
    100% { box-shadow: 0 0 15px rgba(0, 229, 255, 0.6); }
}

.reveal-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 0 10px;
    text-shadow: 0 4px 30px rgba(255, 255, 255, 0.15);
}

.first-name {
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #e0e5ec 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.last-name {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: clamp(3rem, 6vw, 4.5rem);
    color: #ffffff;
    text-transform: uppercase;
    margin-top: -5px;
}

.reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    animation: reveal-block 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    animation-delay: 0.2s;
}

@keyframes reveal-block {
    0% { transform: scaleX(1); transform-origin: 100% 50%; }
    100% { transform: scaleX(0); transform-origin: 100% 50%; }
}

.subtitle-pro {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    opacity: 0;
    transform: translateY(15px);
    animation: fade-up 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.8s forwards;
    letter-spacing: 1.5px;
}

@keyframes fade-up {
    to { opacity: 1; transform: translateY(0); }
}

/* Content Grid Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    flex-grow: 1;
    margin-bottom: var(--spacing-xl);
}

@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* =========================================
   Modern Profile Section (Typography Focus)
   ========================================= */
.profile-content-modern {
    padding: var(--spacing-md) 0;
    max-width: 90%;
}

.profile-heading {
    font-size: 1.2rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.profile-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}

.profile-content-modern:hover .profile-heading::after {
    width: 100%;
}

.profile-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.profile-text .lead-text {
    font-size: 1.4rem;
    color: #ffffff;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2rem;
    border-left: 3px solid rgba(0, 229, 255, 0.4);
    padding-left: 1.5rem;
}

.focus-badge-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 2rem;
}

.focus-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-blue);
    margin-right: 0.5rem;
}

.focus-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.focus-pill:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--accent-cyan);
    color: #fff;
    transform: translateY(-2px);
}

/* Tech Branding & Logo Animation */
.branding-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.custom-logo-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    perspective: 1000px;
    animation: gentle-float 8s ease-in-out infinite;
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.main-logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.4));
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
    transform-style: preserve-3d;
}

.custom-logo-container:hover .main-logo-img {
    transform: scale(1.05) rotateX(10deg) rotateY(-10deg);
    filter: drop-shadow(-15px 20px 25px rgba(0, 229, 255, 0.6));
}

/* Bottom Navigation */
.bottom-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: auto;
}

@media (max-width: 768px) {
    .bottom-nav {
        grid-template-columns: 1fr;
    }
}

.nav-card {
    position: relative;
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), background-color var(--transition-smooth);
    cursor: pointer;
}

.nav-card:hover {
    border-color: var(--accent-cyan);
    background: rgba(30, 40, 50, 0.8);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.card-border {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.nav-card:hover .card-border {
    border-color: rgba(0, 255, 204, 0.5);
    box-shadow: inset 0 0 20px rgba(0, 255, 204, 0.1);
}

.hover-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 255, 204, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
}

.nav-card:hover .hover-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all var(--transition-fast);
}

.nav-card:hover .icon-wrapper {
    background: rgba(0, 255, 204, 0.1);
    border-color: rgba(0, 255, 204, 0.3);
    color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.2);
}

.nav-card h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.nav-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* =========================================
   Animations
   ========================================= */

/* Upgraded Global Header Styles for Sub-Pages */
.glitch-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    background: linear-gradient(135deg, #ffffff 0%, #e0e5ec 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 30px rgba(0, 229, 255, 0.15);
}

/* Page Transition / Intersection Observer Animations */
.animate-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Cinematic Page Transition Overlay - Shutter Effect */
.page-transition {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.page-transition::before, .page-transition::after {
    content: '';
    position: relative;
    width: 100%;
    height: 50vh;
    background: #05080f; /* Deep studio black */
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.page-transition::before {
    transform-origin: top;
    transform: scaleY(1);
}

.page-transition::after {
    transform-origin: bottom;
    transform: scaleY(1);
    border-top: 1px solid rgba(0, 229, 255, 0.3);
    box-shadow: 0 -10px 30px rgba(0, 229, 255, 0.1);
}

body.loaded .page-transition::before,
body.loaded .page-transition::after {
    transform: scaleY(0);
}

body.page-leaving .page-transition::before,
body.page-leaving .page-transition::after {
    transform: scaleY(1);
}

/* =========================================
   Global Sub-Page Overrides (Glass Theme)
   ========================================= */

/* Instantly upgrades all inline-styled cards across the 12 sub-pages */
.cert-card, .cert-card-full {
    background: linear-gradient(135deg, rgba(30, 40, 50, 0.4) 0%, rgba(15, 20, 25, 0.6) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease !important;
}

.cert-card:hover, .cert-card-full:hover {
    box-shadow: 0 30px 60px rgba(0, 229, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(0, 229, 255, 0.5) !important;
}

.cert-icon {
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.4) !important;
}

/* =========================================
   Responsive Media Queries
   ========================================= */

@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .profile-content-modern {
        max-width: 100%;
    }
    
    .focus-badge-container {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: var(--spacing-md);
    }
    
    h1.reveal-text {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }
    
    .first-name {
        font-size: 1em;
    }
    
    .last-name {
        font-size: 1.2em;
    }
    
    .subtitle-pro {
        font-size: 0.9rem;
    }
    
    .custom-logo-container {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 1;
    }
    
    .bottom-nav {
        grid-template-columns: 1fr;
    }

    .glitch-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
}

@media (max-width: 480px) {
    .container {
        padding: var(--spacing-sm);
    }

    .custom-logo-container {
        max-width: 250px;
    }
    
    .cert-card, .cert-card-full {
        padding: var(--spacing-md) !important;
    }
}
