/* ============================================
   CSS VARIABLES & THEME CONFIGURATION
============================================ */
:root {
    /* Colors - Dark Mode */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #0f0f0f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #00ff41;
    --accent-secondary: #00cc33;
    --accent-glow: rgba(0, 255, 65, 0.3);
    --danger: #ff0055;
    --warning: #ffaa00;
    --success: #00ff41;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00ff41 0%, #00cc33 100%);
    --gradient-dark: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    
    /* Typography */
    --font-primary: 'Inter', 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading: 'Manrope', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-code: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 20px var(--accent-glow);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-Index */
    --z-navbar: 1000;
    --z-sidebar: 900;
    --z-modal: 1100;
    --z-loading: 9999;
}

/* Light Mode Variables */
.light-mode {
    /* Base Colors - Platinum & Slate Theme */
    --bg-primary: #f2f5f8;       /* Cool platinum background */
    --bg-secondary: #ffffff;      /* Pure white for sections */
    --bg-tertiary: #e2e8f0;       /* Light border/divider color */
    
    /* Typography - High Contrast Slate */
    --text-primary: #0f172a;      /* Slate 900 - Sharp main text */
    --text-secondary: #475569;    /* Slate 600 - Readable secondary */
    
    /* Accents - Electric Blue */
    --accent-primary: #2563eb;    /* Vivid Blue */
    --accent-secondary: #1d4ed8;  /* Darker Blue */
    --accent-active: #1e40af;     /* Deep Blue */
    --accent-glow: rgba(37, 99, 235, 0.25);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    --gradient-dark: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    
    /* Semantic */
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    
    /* Shadows */
    --shadow-glow: 0 4px 20px rgba(37, 99, 235, 0.2);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.1);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
}

/* ============================================
   RESET & BASE STYLES
============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal);
    font-weight: 500;
    zoom: 0.9;
}

::selection {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

/* ============================================
   ACCESSIBILITY
============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100000;
    font-weight: 700;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ============================================
   LOADING SCREEN
============================================ */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    text-align: center;
}

.cyber-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.loading-text {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-primary);
    text-shadow: 0 0 20px var(--accent-glow);
    animation: pulse 2s infinite;
}

.loading-bar {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: var(--gradient-primary);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   SCROLL PROGRESS BAR
============================================ */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-primary);
    z-index: calc(var(--z-navbar) + 1);
    transition: width 0.1s ease;
}

/* ============================================
   NAVIGATION
============================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 0;
    z-index: var(--z-navbar);
    transition: all var(--transition-normal);
}

#navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-bracket {
    color: var(--accent-primary);
    font-size: 1.8rem;
}

.light-mode .logo-bracket {
    color: #26E3E0;
}

.logo-text {
    color: #ffffff;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color var(--transition-fast);
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

.light-mode .nav-link:hover,
.light-mode .nav-link.active {
    color: #26E3E0;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.light-mode .nav-link:hover::after,
.light-mode .nav-link.active::after {
    background: #26E3E0;
}

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

.icon-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.light-mode .icon-btn {
    background: #ffffff;
    border: 1px solid var(--bg-tertiary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.light-mode .icon-btn:hover {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.mobile-only {
    display: none;
}

/* ============================================
   PARTICLES BACKGROUND
============================================ */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0.5;
}

/* ============================================
   SOCIAL SIDEBAR
============================================ */
.social-sidebar {
    position: fixed;
    left: 2rem;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    z-index: var(--z-sidebar);
}

.social-link {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.social-link:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

.social-line {
    width: 2px;
    height: 100px;
    background: var(--text-secondary);
}

/* ============================================
   CONTAINER & SECTIONS
============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.dark-section {
    background: var(--bg-secondary);
}

.light-mode .section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(255,255,255,0.9) 100%);
}

.light-mode .dark-section {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    color: var(--accent-primary);
    font-family: var(--font-code);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

/* ============================================
   HERO SECTION
============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.glitch-wrapper {
    margin-bottom: 2rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.glitch {
    position: relative;
    text-shadow: 
        0.05em 0 0 rgba(255, 0, 0, 0.75),
        -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
        0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    animation: glitch 500ms infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-top 300ms infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.glitch::after {
    animation: glitch-bottom 1.5s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    95% { transform: translate(-2px, 2px); }
}

@keyframes glitch-top {
    0%, 90%, 100% { transform: translate(0); }
    95% { transform: translate(2px, -2px); }
}

@keyframes glitch-bottom {
    0%, 90%, 100% { transform: translate(0); }
    95% { transform: translate(-2px, 2px); }
}

.typing-container {
    height: 60px;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--accent-primary);
    font-weight: 500;
}

.typing-text {
    font-family: var(--font-code);
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-3px);
}

.light-mode .btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.light-mode .btn-primary:hover {
    box-shadow: var(--shadow-lg);
}

.light-mode .btn-secondary {
    background: #ffffff;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.light-mode .btn-secondary:hover {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.stats-row {
    display: flex;
    gap: 4rem;
    justify-content: center;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--accent-primary);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(15px); }
}

/* ============================================
   GLASS CARD COMPONENT
============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

/* Light Mode Card Styling */
.light-mode .glass-card {
    background: #ffffff;
    backdrop-filter: blur(10px);
    border: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-md);
}

.light-mode .glass-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   ABOUT SECTION
============================================ */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.about-card {
    text-align: center;
}

.card-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.bio-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-top: 4rem;
}

.bio-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.bio-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: justify;
}

.education-timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.education-timeline h4,
.specializations h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 0.5rem;
}

.timeline-content h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.specializations {
    display: flex;
    flex-direction: column;
    margin-top: 3rem;
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.expertise-tags .tag {
    background: rgba(0, 123, 255, 0.12);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.expertise-tags .tag:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.light-mode .expertise-tags .tag {
    background: #ffffff;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.light-mode .expertise-tags .tag:hover {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.timeline-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.timeline-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-date {
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.bio-image {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.profile-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent-primary);
    filter: grayscale(20%) brightness(90%);
    transition: all var(--transition-normal);
}

.profile-img:hover {
    filter: grayscale(0%) brightness(100%);
    box-shadow: var(--shadow-glow);
}

.profile-border {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    opacity: 0.3;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   SKILLS SECTION
============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.light-mode .skill-category {
    background: #ffffff;
    border: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-md);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-category h3 i {
    color: var(--accent-primary);
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.light-mode .skill-bar {
    background: rgba(0, 0, 0, 0.08);
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 1s ease;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-badge {
    background: rgba(0, 123, 255, 0.12);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tech-badge:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.light-mode .tech-badge {
    background: #ffffff;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.light-mode .tech-badge:hover {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

/* ============================================
   CERTIFICATIONS SECTION
============================================ */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.cert-card {
    text-align: center;
}

.cert-logo {
    height: 80px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0.9);
    transition: filter var(--transition-fast);
}

.light-mode .cert-logo img {
    filter: brightness(0.8) contrast(1.2);
}

.light-mode .cert-logo {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.cert-card:hover .cert-logo img {
    filter: brightness(1);
}

.cert-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cert-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.cert-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.cert-link:hover {
    gap: 0.75rem;
}

.cert-logo.tryhackme-badge {
    height: auto;
    min-height: 280px;
    background: transparent;
    padding: 0;
}

.cert-logo.tryhackme-badge iframe {
    border-radius: var(--radius-md);
}

/* TryHackMe Badge Section - Visibility Control */
.tryhackme-badge-section {
    margin: 1rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    line-height: 0;
    width: 100%;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
    overflow: hidden;
}

/* Show badge (default) */
.tryhackme-badge-section.show {
    opacity: 1;
    max-height: 200px;
}

/* Hide badge - Change class from 'show' to 'hidden' in index.html */
.tryhackme-badge-section.hidden {
    opacity: 0;
    max-height: 0;
    margin: 0;
    pointer-events: none;
}

.tryhackme-badge-section iframe {
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: hidden;
    margin: 0 auto;
    padding: 0;
}

.light-mode .tryhackme-badge-section iframe {
    box-shadow: none;
    background: transparent;
}

/* ============================================
   PROJECTS SECTION
============================================ */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.light-mode .filter-btn {
    background: #ffffff;
    border: 1px solid var(--bg-tertiary);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.light-mode .filter-btn:hover,
.light-mode .filter-btn.active {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.light-mode .project-card {
    background: #ffffff;
    border: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-md);
}

.light-mode .project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 60px;
    height: 60px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 1.5rem;
    transition: all var(--transition-fast);
}

.project-link:hover {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: rgba(0, 123, 255, 0.12);
    color: var(--accent-primary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

.light-mode .tag {
    background: #e0f2fe;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-tech span {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.light-mode .project-tech span {
    background: #f1f5f9;
    border: 1px solid var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   CONTACT SECTION
============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.contact-text a,
.contact-text p {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-text a:hover {
    color: var(--accent-primary);
}

.social-links-contact {
    display: flex;
    gap: 1rem;
}

.social-links-contact a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.social-links-contact a:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}

.light-mode .social-links-contact a {
    background: #ffffff;
    border: 1px solid var(--bg-tertiary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.light-mode .social-links-contact a:hover {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.contact-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.light-mode .contact-form {
    background: #ffffff;
    border: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-md);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.light-mode .form-group input,
.light-mode .form-group textarea {
    background: #f8f9fa !important;
    border: 1px solid rgba(0, 123, 255, 0.2) !important;
    color: var(--text-primary) !important;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

.light-mode .form-group input:focus,
.light-mode .form-group textarea:focus {
    background: #ffffff !important;
    border-color: #26E3E0 !important;
    box-shadow: 0 0 0 3px rgba(38, 227, 224, 0.1) !important;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.85rem;
    color: var(--accent-primary);
    background: var(--bg-primary);
    padding: 0 0.5rem;
}

.light-mode .form-group input:focus + label,
.light-mode .form-group textarea:focus + label,
.light-mode .form-group input:not(:placeholder-shown) + label,
.light-mode .form-group textarea:not(:placeholder-shown) + label {
    color: #26E3E0;
    background: var(--bg-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Validation Styles */
.form-group input.error,
.form-group textarea.error {
    border-color: var(--danger) !important;
}

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
    min-height: 1.2rem;
}

.form-messages {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
}

.form-messages.success {
    background: rgba(44, 160, 44, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.form-messages.error {
    background: rgba(255, 0, 85, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.light-mode .form-messages.success {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
    color: #2e7d32;
}

.light-mode .form-messages.error {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
    color: #c62828;
}

.spinner {
    margin-left: 0.5rem;
}

#submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================
   FOOTER
============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom i {
    color: var(--danger);
}

/* ============================================
   BACK TO TOP BUTTON
============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: var(--bg-primary);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 1024px) {
    .bio-section,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .social-sidebar {
        display: none;
    }
    
    .stats-row {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transition: left var(--transition-normal);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .mobile-only {
        display: flex;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-grid,
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 2rem;
    }
}


/* Footer Profile Customization */
.footer-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.footer-profile-info h3 {
    font-size: 1.25rem !important; /* Override generic h3 */
    margin: 0 !important;
    line-height: 1.2;
}

.footer-role {
    font-size: 0.85rem;
    color: var(--accent-primary) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0.25rem 0 0 0 !important;
}

.footer-quote {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-secondary);
    border-left: 2px solid var(--accent-primary);
    padding-left: 1rem;
    margin-top: 1rem;
}

.footer-quote i {
    color: var(--accent-primary);
    margin-right: 0.5rem;
    font-size: 0.8rem;
    vertical-align: top;
    opacity: 0.7;
}
