/* ========================================================================== 
    1. GLOBAL SETUP & TOKENS
    ========================================================================== */

/* Import Fabric icons */
/* Your use of the content in the files referenced here is subject to the terms of the license at https://aka.ms/fabric-assets-license */
@import "../assets/fonts/fabric-icons/css/fabric-icons.css";
@import "../assets/fonts/fabric-icons/css/fabric-icons-inline.css";

/* Design tokens (colors, gradients, radii, blur, timing) */
:root {
    /* Core Color & Gradient Palette */
    --gradient-color-1: #0894FF;
    --gradient-color-2: #C959DD;
    --gradient-color-3: #FF2E54;
    --gradient-color-4: #FF9004;

    --gradient-color-1-rgb: 8, 148, 255;
    --gradient-color-2-rgb: 201, 89, 221;
    --gradient-color-3-rgb: 255, 46, 84;
    --gradient-color-4-rgb: 255, 144, 4;

    --gradient-angle: 90deg;

    /* Pre-built gradient tokens for reuse */
    --gradient-border: linear-gradient(var(--gradient-angle), var(--gradient-color-1), var(--gradient-color-2), var(--gradient-color-3), var(--gradient-color-4));
    /* Unified 4-color gradient for all colored elements */
    --btn-gradient-primary: linear-gradient(var(--gradient-angle),
        rgba(var(--gradient-color-1-rgb), 0.98) 0%,
        rgba(var(--gradient-color-2-rgb), 0.98) 33%,
        rgba(var(--gradient-color-3-rgb), 0.98) 66%,
        rgba(var(--gradient-color-4-rgb), 0.98) 100%
    );
    --btn-gradient-secondary: linear-gradient(var(--gradient-angle),
        rgba(var(--gradient-color-1-rgb), 0.98) 0%,
        rgba(var(--gradient-color-2-rgb), 0.98) 33%,
        rgba(var(--gradient-color-3-rgb), 0.98) 66%,
        rgba(var(--gradient-color-4-rgb), 0.98) 100%
    );
    --tag-gradient-hover: linear-gradient(100deg,
        rgba(var(--gradient-color-1-rgb), 0.42) 0%,
        rgba(var(--gradient-color-2-rgb), 0.42) 33%,
        rgba(var(--gradient-color-3-rgb), 0.42) 66%,
        rgba(var(--gradient-color-4-rgb), 0.42) 100%
    );
    --icon-gradient-hover: linear-gradient(120deg,
        var(--gradient-color-1),
        var(--gradient-color-2),
        var(--gradient-color-3),
        var(--gradient-color-4)
    );

    /* Sizing & Spacing */
    --radius-card: 24px;
    --radius-btn: 50px;
    --blur-strong: 20px;
    --btn-padding-y: 1rem;
    --btn-padding-x: 2.5rem;
    --tag-padding-y: 0.45rem;
    --tag-padding-x: 1rem;
    --icon-btn-size: 48px;

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark theme (default) */
[data-theme="dark"] {
    --bg-primary: #0D0D0D;
    --bg-secondary: #1A1A1A;
    --text-primary: #F0F0F0;
    --text-secondary: #A0A0A0;
    --glass-bg: rgba(25, 25, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --icon-bg: rgba(255, 255, 255, 0.05);
}

/* Light theme */
[data-theme="light"] {
    --bg-primary: #F7F9FC;
    --bg-secondary: #FFFFFF;
    --text-primary: #14162B;
    --text-secondary: #616279;
    --glass-bg: rgba(255, 255, 255, 0.66);
    --glass-border: rgba(20, 22, 43, 0.12);
    --shadow-color: rgba(20, 22, 43, 0.12);
    --icon-bg: rgba(20, 22, 43, 0.06);
}

/* Global reset & base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: background-color var(--transition-fast), color var(--transition-fast);
    overflow-x: hidden;
}

.wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================================================== 
    2. HEADER & NAVIGATION
    ========================================================================== */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: color-mix(in oklab, var(--bg-primary) 75%, transparent);
    -webkit-backdrop-filter: blur(var(--blur-strong));
    backdrop-filter: blur(var(--blur-strong));
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-slow);
}

#main-header.scrolled {
    padding: 1rem 0;
    background: color-mix(in oklab, var(--bg-primary) 92%, transparent);
}

#main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
}

.logo:hover {
    background: linear-gradient(
        90deg,
        var(--gradient-color-1),
        var(--gradient-color-2),
        var(--gradient-color-3),
        var(--gradient-color-4),
        var(--gradient-color-1)
    );
    background-size: 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-pan 3s linear infinite;
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-border);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Fabric icons */
.ms-Icon {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-family: "FabricMDL2Icons";
    font-style: normal;
    font-weight: 400;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    width: 24px;
    height: 24px;
    transition: transform var(--transition-fast);
}

#theme-toggle:hover {
    transform: scale(1.1);
}

#theme-toggle .sun, #theme-toggle .moon { display: none; }
[data-theme="dark"] #theme-toggle .sun { display: block; }
[data-theme="light"] #theme-toggle .moon { display: block; }

/* ==========================================================================
    3. HERO SECTION (Home)
    ========================================================================== */
#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.video-background {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.video-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.65),
        rgba(0,0,0,0.4) 50%,
        rgba(0,0,0,0.65)
    );
    z-index: 1;
}
.video-background video {
    width: 100%; height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 1rem;
}

.hero-intro {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    color: #FFF;
    line-height: 1.1;
    display: block; /* Fix layout shift */
    text-align: center;
    height: 13rem; /* Fixed height to prevent shaking */
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
}

#typed-text {
    background: var(--gradient-border);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--text-secondary);
    animation: blink 1s infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}
@keyframes gradient-pan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.cta-group { display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

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

.social-links a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--icon-btn-size);
    height: var(--icon-btn-size);
    border-radius: 50%;
    background: var(--icon-bg);
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    flex-shrink: 0;
    z-index: 1;
}

.social-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--icon-gradient-hover);
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: -1;
}

.social-links a:hover {
    transform: scale(1.1);
    color: #fff;
    border-color: transparent;
    background: transparent;
    box-shadow: 0 8px 24px rgba(var(--gradient-color-2-rgb), 0.3), 0 2px 8px rgba(0,0,0,0.2);
}

.social-links a:hover::before {
    background-size: 200% 200%;
    animation: gradient-pan 3s linear infinite;
    opacity: 1;
}
.social-links a:hover i,
.social-links a:hover svg { 
    color: #fff !important; 
    fill: #fff !important; 
    z-index: 2; 
}

.social-links svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    z-index: 1;
}

/* Scroll down indicator */
.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
}
.scroll-down::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 20px;
    background: #FFF;
    animation: scroll-indicator 2.5s infinite ease-in-out;
}
@keyframes scroll-indicator {
    0% { transform: translateY(0); }
    50% { transform: translateY(30px); }
    100% { transform: translateY(0); }
}

/* ==========================================================================
    4. UNIFIED COMPONENT STYLES
    ========================================================================== */

/* --- Base Card Style --- */
.glass-card, .dashboard-card, .project-card, .skill-category {
    position: relative;
    background: var(--glass-bg);
    border-radius: var(--radius-card);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(var(--blur-strong));
    backdrop-filter: blur(var(--blur-strong));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Gradient border effect */
.glass-card::before, .dashboard-card::before, .project-card::before, .skill-category::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px; /* border width */
    background: var(--gradient-border);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.glass-card:hover::before, .dashboard-card:hover::before, .project-card:hover::before, .skill-category:hover::before {
    opacity: 1;
}

/* --- Unified Button System --- */
.btn, .cta-button, .card-button {
    display: inline-block;
    padding: var(--btn-padding-y) var(--btn-padding-x);
    background: var(--btn-gradient-primary);
    color: #FFF;
    text-decoration: none;
    font-weight: 700;
    border-radius: var(--radius-btn);
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
    border: none;
    margin-top: 1.5rem;
    z-index: 1;
}

.btn:hover, .cta-button:hover, .card-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px -5px rgba(var(--gradient-color-2-rgb), 0.5), 0 0 20px rgba(var(--gradient-color-1-rgb), 0.3);
}

/* Secondary Button (Outline) */
.cta-button.secondary {
    background: transparent;
    color: #FFF; /* Fallback */
    margin-left: 1rem;
}

/* Gradient Text for Secondary Button */
.cta-button.secondary span {
    background: var(--gradient-border);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    position: relative;
    z-index: 2;
    transition: -webkit-text-fill-color 0.3s ease;
}

/* Gradient Border for Secondary Button */
.cta-button.secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-btn);
    padding: 2px;
    background: var(--gradient-border);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 1;
}

/* Hover Fill for Secondary Button */
.cta-button.secondary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-border);
    opacity: 0;
    z-index: 0;
    transition: opacity 0.3s ease;
}

.cta-button.secondary:hover span {
    -webkit-text-fill-color: #FFF;
}

.cta-button.secondary:hover::after {
    opacity: 1;
}

.btn.outline, .cta-button.outline, .card-button.outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn.outline:hover, .cta-button.outline:hover, .card-button.outline:hover {
    color: #fff;
    border-color: transparent;
    background: var(--btn-gradient-primary);
}
.btn:focus-visible, .cta-button:focus-visible, .card-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--gradient-color-2-rgb), 0.3);
}

/* --- Unified Tag Style --- */
.skills-tags span, .project-tags span, .tag {
    background: var(--icon-bg);
    color: var(--text-secondary);
    padding: var(--tag-padding-y) var(--tag-padding-x);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
    z-index: 1; /* Ensure text stays on top */
}
.skills-tags span::before, .project-tags span::before, .tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--tag-gradient-hover);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1; /* Behind text */
}
/* Sheen effect removed to prevent "changing color" distraction and improve readability */
.skills-tags span::after, .project-tags span::after, .tag::after {
  display: none;
}

.skills-tags span:hover, .project-tags span:hover, .tag:hover {
    color: #ffffff !important; /* Force white text */
    transform: translateY(-2px);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5); /* Improve contrast */
}

/* The gradient background is now visible on hover */
.skills-tags span:hover::before, .project-tags span:hover::before, .tag:hover::before {
    opacity: 1;
}

/* --- Varied Tag Hover Colors --- */
/* Explicitly define styles for each variant to ensure shadow matches background */

/* Variant 1 (Blue) */
.skills-tags span:nth-child(4n+1):hover, .project-tags span:nth-child(4n+1):hover, .tag:nth-child(4n+1):hover {
    border-color: rgba(var(--gradient-color-1-rgb), 0.6);
    box-shadow: 0 4px 20px rgba(var(--gradient-color-1-rgb), 0.4);
}
.skills-tags span:nth-child(4n+1):hover::before, .project-tags span:nth-child(4n+1):hover::before, .tag:nth-child(4n+1):hover::before {
    background: linear-gradient(135deg, rgba(var(--gradient-color-1-rgb), 0.6), rgba(var(--gradient-color-1-rgb), 0.9));
}

/* Variant 2 (Purple) */
.skills-tags span:nth-child(4n+2):hover, .project-tags span:nth-child(4n+2):hover, .tag:nth-child(4n+2):hover {
    border-color: rgba(var(--gradient-color-2-rgb), 0.6);
    box-shadow: 0 4px 20px rgba(var(--gradient-color-2-rgb), 0.4);
}
.skills-tags span:nth-child(4n+2):hover::before, .project-tags span:nth-child(4n+2):hover::before, .tag:nth-child(4n+2):hover::before {
    background: linear-gradient(135deg, rgba(var(--gradient-color-2-rgb), 0.6), rgba(var(--gradient-color-2-rgb), 0.9));
}

/* Variant 3 (Pink) */
.skills-tags span:nth-child(4n+3):hover, .project-tags span:nth-child(4n+3):hover, .tag:nth-child(4n+3):hover {
    border-color: rgba(var(--gradient-color-3-rgb), 0.6);
    box-shadow: 0 4px 20px rgba(var(--gradient-color-3-rgb), 0.4);
}
.skills-tags span:nth-child(4n+3):hover::before, .project-tags span:nth-child(4n+3):hover::before, .tag:nth-child(4n+3):hover::before {
    background: linear-gradient(135deg, rgba(var(--gradient-color-3-rgb), 0.6), rgba(var(--gradient-color-3-rgb), 0.9));
}

/* Variant 4 (Orange) */
.skills-tags span:nth-child(4n+4):hover, .project-tags span:nth-child(4n+4):hover, .tag:nth-child(4n+4):hover {
    border-color: rgba(var(--gradient-color-4-rgb), 0.6);
    box-shadow: 0 4px 20px rgba(var(--gradient-color-4-rgb), 0.4);
}
.skills-tags span:nth-child(4n+4):hover::before, .project-tags span:nth-child(4n+4):hover::before, .tag:nth-child(4n+4):hover::before {
    background: linear-gradient(135deg, rgba(var(--gradient-color-4-rgb), 0.6), rgba(var(--gradient-color-4-rgb), 0.9));
}

/* ==========================================================================
    5. SECTION-SPECIFIC STYLES
    ========================================================================== */

/* --- About Section (Home) --- */
#about {
    padding: 6rem 0;
}
.glass-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem;
    text-align: center;
    overflow: hidden; /* Ensure glow stays inside */
}
.card-content {
    position: relative;
    z-index: 2;
}
.card-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1rem;
}
.card-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Enhanced About Text */
.about-text p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}
.about-text p:last-child {
    margin-bottom: 2rem;
}
.about-text strong {
    background: var(--text-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    display: inline-block; /* Fix for some browsers clipping text */
}

.card-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, 
        rgba(var(--gradient-color-1-rgb), 0.15) 0%, 
        rgba(var(--gradient-color-2-rgb), 0.1) 30%, 
        rgba(var(--gradient-color-3-rgb), 0.05) 60%, 
        transparent 80%);
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 50%;
    z-index: 1;
    mix-blend-mode: screen;
    filter: blur(40px);
}
.glass-card:hover .card-glow {
    opacity: 1;
}

/* --- Skills Section (Home) --- */
#skills {
    padding: 6rem 0;
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.skill-category {
    padding: 2rem;
    text-align: center;
}
.skill-category h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}
/* Alternating Hover Colors for Skill Categories */
.skill-category:nth-child(4n+1):hover::before { background: var(--gradient-color-1); }
.skill-category:nth-child(4n+2):hover::before { background: var(--gradient-color-2); }
.skill-category:nth-child(4n+3):hover::before { background: var(--gradient-color-3); }
.skill-category:nth-child(4n+4):hover::before { background: var(--gradient-color-4); }

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* --- Projects Section --- */
#projects, #featured-projects {
    padding: 6rem 0;
}
.section-title, .page-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
}
.projects-grid, #featured-projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: stretch;
}
.project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.project-card-inner {
    background: transparent; /* Inner div is for content, not styling */
    border: none;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-slow);
    padding: 1.5rem;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 10px 30px var(--shadow-color),
        0 0 0 1px rgba(255,255,255,0.05) inset,
        0 12px 28px rgba(var(--gradient-color-1-rgb), 0.12),
        0 18px 40px rgba(var(--gradient-color-2-rgb), 0.12),
    0 24px 56px rgba(var(--gradient-color-3-rgb), 0.12),
    0 32px 72px rgba(var(--gradient-color-4-rgb), 0.12);
}
.project-image {
    width: calc(100% + 3rem); /* Bleed image to edges */
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-slow);
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.project-card:hover .project-image {
    transform: scale(1.05);
}
.project-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.project-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.project-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.project-links {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: auto; /* Pushes links to the bottom */
}
.project-icon-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: var(--icon-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.project-icon-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--icon-gradient-hover);
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: -1;
}
.project-icon-link:hover {
    color: #fff;
    border-color: transparent;
    background: transparent;
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(var(--gradient-color-3-rgb), 0.28), 0 2px 8px rgba(0,0,0,0.2);
}
.project-icon-link:hover::before {
    background-size: 200% 200%;
    animation: gradient-pan 3s linear infinite;
    opacity: 1;
}
.project-icon-link:hover i,
.project-icon-link:hover svg { 
    color: #fff !important; 
    fill: #fff !important; 
    z-index: 2; 
}
.project-icon-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    z-index: 1;
}
.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ==========================================================================
    6. ABOUT PAGE SPECIFIC STYLES
    ========================================================================== */
.main-content-padding {
    padding-top: 140px;
    margin: 0 auto;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}
.dashboard-card {
    padding: 0;
    margin-bottom: 2rem;
}
.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    font-family: var(--font-display);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.card-body {
    padding: 2rem;
}
.profile-section {
    text-align: center;
    margin-bottom: 1.5rem;
}
.profile-picture {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    padding: 4px;
    background: var(--gradient-border);
}
.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bg-secondary);
}
.profile-placeholder {
    display: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-secondary);
}
.profile-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.timeline-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
    padding-bottom: 2rem;
}
.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 2px;
    height: calc(100% - 20px);
    background: var(--glass-border);
}
.timeline-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 1;
    background: #FFF;
}
.timeline-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.timeline-content h3 { 
    font-size: 1.1rem; 
}
.timeline-content p { 
    color: var(--text-secondary); 
    margin-top: 0.2rem; 
}
.date-range { 
    font-size: 0.9rem; 
    color: var(--text-secondary);
}
.status-badge-1 {
    background: rgba(var(--gradient-color-1-rgb), 0.2);
    color: var(--gradient-color-1);
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-badge-2 {
    background: rgba(var(--gradient-color-2-rgb), 0.2);
    color: var(--gradient-color-2);
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-badge-3 {
    background: rgba(var(--gradient-color-3-rgb), 0.2);
    color: var(--gradient-color-3);
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-badge-4 {
    background: rgba(var(--gradient-color-4-rgb), 0.2);
    color: var(--gradient-color-4);
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Grade Styling */
.status-badge .grade-highlight {
    /* color: var(--text-primary); */
    font-weight: 700;
    font-size: 1.1em;
}

.status-badge .grade-total {
    opacity: 0.5;
    font-weight: 400;
    font-size: 0.85em;
    margin-left: 2px;
}

.credential-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}
.credential-link:hover {
    color: var(--gradient-color-1);
}

/* Credential Dropdown for multiple certificates */
.credential-dropdown {
    margin-top: 0.5rem;
}

.credential-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.credential-toggle .ms-Icon {
    font-size: 0.75em;
    display: inline-block;
    transition: transform 0.2s ease;
}

.credential-toggle.expanded .ms-Icon {
    transform: rotate(180deg) !important;
}

.credential-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--gradient-color-1);
    animation: slideDown 0.3s ease-out;
}

.credential-list[hidden] {
    display: none !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.credential-link-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.credential-link-item:hover {
    color: var(--gradient-color-1);
    background: rgba(var(--gradient-color-1-rgb, 0, 188, 212), 0.1);
}

.credential-link-item .ms-Icon {
    font-size: 0.8em;
    opacity: 0.7;
}

.credential-link-item:hover .ms-Icon {
    opacity: 1;
}

.skills-subsection {
    margin-bottom: 2rem;
}
.skills-subsection:last-child {
    margin-bottom: 0;
}
.skills-subsection h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.skills-grid-about {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.skill-category-about h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

/* ==========================================================================
    7. UTILITIES & FOOTER
    ========================================================================== */
.scroll-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    text-decoration: none;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-fast);
    -webkit-backdrop-filter: blur(var(--blur-strong));
    backdrop-filter: blur(var(--blur-strong));
}
.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-to-top:hover {
    background: var(--icon-gradient-hover);
    background-size: 200% 200%;
    animation: gradient-pan 3s linear infinite;
    color: #fff;
    border-color: transparent;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px var(--shadow-color);
}

#main-footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
}
#main-footer p {
    text-align: center;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* ========================================================================== 
   8. PRELOADER
   ========================================================================== */
body.is-loading { overflow: hidden; }
#preloader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: color-mix(in oklab, var(--bg-primary) 85%, transparent);
    -webkit-backdrop-filter: blur(var(--blur-strong));
    backdrop-filter: blur(var(--blur-strong));
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
#preloader.hide { opacity: 0; visibility: hidden; }
.preloader-core { position: relative; width: 96px; height: 96px; }
.preloader-ring {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        var(--gradient-color-1) 15%,
        var(--gradient-color-2) 35%,
        var(--gradient-color-3) 60%,
        var(--gradient-color-4) 85%,
        transparent 100%
    );
    -webkit-mask: radial-gradient(transparent 38px, #fff 39px);
    mask: radial-gradient(transparent 38px, #fff 39px);
    animation: spin 1.6s linear infinite;
}
.preloader-glow {
    position: absolute; inset: 10px; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--gradient-color-2-rgb), 0.25), transparent 60%);
    filter: blur(8px);
}
.preloader-text {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--text-secondary);
    letter-spacing: 0.08em;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
    9. ACCESSIBILITY & RESPONSIVE DESIGN
    ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .wrapper {
        padding: 0 1.5rem;
    }
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: color-mix(in oklab, var(--bg-primary) 94%, transparent);
        -webkit-backdrop-filter: blur(var(--blur-strong));
        backdrop-filter: blur(var(--blur-strong));
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: left var(--transition-slow);
        z-index: 999;
    }
    .nav-links.active {
        left: 0;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .glass-card {
        padding: 2.5rem;
    }
    .card-body, .card-header {
        padding: 1.5rem;
    }
    .projects-grid, #featured-projects-container {
        grid-template-columns: 1fr;
    }
    .section-title, .page-title {
        font-size: 2rem;
    }
    .hero-content h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }
    /* Reorder dashboard columns for mobile */
    .dashboard-main-col {
        order: 2;
    }
    .dashboard-side-col {
        order: 1;
    }
}

@media (max-width: 480px) {
    .wrapper {
        padding: 0 1rem;
    }
    .glass-card {
        padding: 2rem 1.5rem;
    }
    .social-links {
        gap: 1rem;
    }
    .social-links a {
        width: 44px;
        height: 44px;
    }
    .project-card-inner {
        padding: 1rem;
    }
    .project-image {
        width: calc(100% + 2rem);
        margin: -1rem -1rem 1rem -1rem;
    }
}

/* Enhance social icon hover animation and glow */
.social-links a::before { background-size: 200% 200%; }
.social-links a:hover { box-shadow: 0 8px 24px rgba(var(--gradient-color-2-rgb), 0.3), 0 2px 8px rgba(0,0,0,0.2); }
.social-links a:hover::before { animation: gradient-pan 3s linear infinite; }

/* Project icon link hover polish */
.project-icon-link::before { background-size: 200% 200%; }
.project-icon-link:hover { box-shadow: 0 8px 24px rgba(var(--gradient-color-3-rgb), 0.28), 0 2px 8px rgba(0,0,0,0.2); }
.project-icon-link:hover::before { animation: gradient-pan 3s linear infinite; }

/* Tag sheen and animated gradient */
.skills-tags span::before, .project-tags span::before, .tag::before { background-size: 200% 200%; }
.skills-tags span::after, .project-tags span::after, .tag::after {
  content: '';
  position: absolute;
  top: 0; left: -30%;
  width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  opacity: 0; transition: opacity 0.2s ease; z-index: 1;
}
.skills-tags span:hover, .project-tags span:hover, .tag:hover { 
    border-color: rgba(var(--gradient-color-1-rgb), 0.4); 
    box-shadow: 0 6px 16px rgba(var(--gradient-color-1-rgb), 0.18); 
    animation: tag-color-cycle 3s linear infinite;
}
.skills-tags span:hover::before, .project-tags span:hover::before, .tag:hover::before { animation: gradient-pan 3s linear infinite; }
.skills-tags span:hover::after, .project-tags span:hover::after, .tag:hover::after { opacity: 1; animation: sheen 1.2s ease forwards; }

/* Button styles are now unified, removing these overrides. */

/* Keyframes used above */
@keyframes tag-color-cycle {
    0% { border-color: rgba(var(--gradient-color-1-rgb), 0.4); box-shadow: 0 6px 16px rgba(var(--gradient-color-1-rgb), 0.18); }
    25% { border-color: rgba(var(--gradient-color-2-rgb), 0.4); box-shadow: 0 6px 16px rgba(var(--gradient-color-2-rgb), 0.18); }
    50% { border-color: rgba(var(--gradient-color-3-rgb), 0.4); box-shadow: 0 6px 16px rgba(var(--gradient-color-3-rgb), 0.18); }
    75% { border-color: rgba(var(--gradient-color-4-rgb), 0.4); box-shadow: 0 6px 16px rgba(var(--gradient-color-4-rgb), 0.18); }
    100% { border-color: rgba(var(--gradient-color-1-rgb), 0.4); box-shadow: 0 6px 16px rgba(var(--gradient-color-1-rgb), 0.18); }
}
/* ========================================================================== 
   AWARDS LIST STYLES
   ========================================================================== */
.awards-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.awards-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, background 0.2s ease;
}

.awards-list li:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.award-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    /* Optional: if you want a gold gradient or color */
    /* background: linear-gradient(45deg, #FFD700, #FFA500); */
    /* -webkit-background-clip: text; */
    /* -webkit-text-fill-color: transparent; */
}

.award-content {
    display: flex;
    flex-direction: column;
}

.award-content strong {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.award-issuer {
    font-size: 0.85rem;
    color: var(--text-secondary);
}


/* ========================================================================== 
   UPDATES FOR CV CONTENT
   ========================================================================== */



/* Thesis Highlight */
.thesis-highlight {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(var(--gradient-color-1-rgb), 0.1);
    border-left: 3px solid var(--gradient-color-1);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.thesis-highlight i {
    color: var(--gradient-color-1);
    margin-top: 0.2rem;
}

/* LinkedIn Section Button */
.section-footer-btn {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.section-footer-btn .cta-button.small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Volunteering Section */
.volunteering-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.volunteering-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.volunteering-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.volunteering-item .cause {
    font-size: 0.9rem;
    color: var(--gradient-color-2);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Skills Cloud Update */
.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}


/* ========================================================================== 
   UPDATED CV SECTIONS STYLES
   ========================================================================== */

/* Header Row for Title + Link */
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.card-header-row .card-header {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.icon-link {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.icon-link:hover {
    color: #fff;
    background: var(--btn-gradient-primary);
    transform: scale(1.1);
}

/* Grade Styling */
.grade-value {
    font-weight: 700;
}

.grade-scale {
    opacity: 0.5;
    font-weight: 400;
    font-size: 0.85em;
}

/* Thesis Highlight */
.thesis-highlight {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(var(--gradient-color-1-rgb), 0.1);
    border-left: 3px solid var(--gradient-color-1);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.thesis-highlight i {
    color: var(--gradient-color-1);
    margin-top: 0.2rem;
    font-size: 1.1rem;
}


/* ========================================================================== 
   LINKEDIN BADGE STYLE
   ========================================================================== */
.linkedin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: .5rem;
    margin-right: 1.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: rgba(107, 107, 107, 0.1); /* LinkedIn Blue tint */
    border: 1px solid rgba(173, 173, 173, 0.3);
    color: #e1e1e1;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.linkedin-badge i {
    color: #7e7e7e; /* LinkedIn Brand Color */
    font-size: 1rem;
}

.linkedin-badge:hover {
    background: rgba(179, 179, 179, 0.2);
    border-color: #7e7e7e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(179, 179, 179, 0.2);
    color: #fff;
}

.linkedin-badge:hover i {
    color: #fff;
}

