/* =====================================================
   MOUAD BOUAICHA - PORTFOLIO STYLES
   Ultra-Interactive 3D Portfolio
   ===================================================== */

/* =====================================================
   CSS VARIABLES & ROOT SETTINGS
   ===================================================== */
:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;

    /* Accent Colors */
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --accent-dark: #0891b2;

    /* Gradient Colors */
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #f472b6 0%, #6366f1 50%, #06b6d4 100%);
    --gradient-3: linear-gradient(45deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);

    /* Background Colors */
    --bg-dark: #0a0a0f;
    --bg-darker: #050507;
    --bg-card: rgba(255, 255, 255, 0.03);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Spacing */
    --section-padding: 100px 0;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   CUSTOM CURSOR (Disabled for simplicity)
   ===================================================== */
.cursor,
.cursor-follower,
.cursor-particles {
    display: none;
}

/* =====================================================
   LOADER
   ===================================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10002;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loader-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

/* =====================================================
   NAVIGATION
   ===================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 15px 50px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
    position: relative;
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 5px 0;
    transition: color var(--transition-fast);
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    width: 30px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-normal);
}

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

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

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

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: right var(--transition-slow);
    z-index: 999;
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav-links {
    text-align: center;
}

.mobile-nav-links li {
    margin: 30px 0;
}

.mobile-nav-links a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#three-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 20px;
}

.hero-title .greeting {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.hero-title .name {
    display: block;
    font-size: 4.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 20px;
    min-height: 50px;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-description .highlight {
    color: var(--primary-light);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

.btn-cv {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    backdrop-filter: blur(10px);
}

.btn-cv:hover {
    background: rgba(6, 182, 212, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

/* Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

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

.stat-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-plus {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 3;
    animation: float 3s ease-in-out infinite;
}

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

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

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

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

.scroll-indicator span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* =====================================================
   SECTIONS COMMON STYLES
   ===================================================== */
.section {
    padding: var(--section-padding);
    position: relative;
    z-index: 5;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 5;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

/* =====================================================
   ABOUT SECTION
   ===================================================== */
.about {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.about-card {
    padding: 40px;
}

.about-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

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

.about-card strong {
    color: var(--primary-light);
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-secondary);
}

.info-item i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    color: var(--primary);
}

/* Skills Card */
.skills-card {
    padding: 40px;
}

.skills-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.skills-category {
    margin-bottom: 25px;
}

.skills-category h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.skills-category h4 i {
    color: var(--primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.skill-tag i {
    font-size: 1.05rem;
    line-height: 1;
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Skill Bars */
.skill-bars {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.skill-bar-item {
    margin-bottom: 20px;
}

.skill-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-bar-header span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skill-percentage {
    color: var(--primary) !important;
    font-weight: 600;
}

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

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

/* =====================================================
   EXPERIENCE SECTION
   ===================================================== */
.experience {
    background: var(--bg-darker);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.experience-card {
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.experience-card:hover {
    transform: translateY(-5px);
}

.exp-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.exp-icon {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.exp-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.exp-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.exp-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.exp-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.exp-company {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--primary-light);
    margin-bottom: 15px;
}

.exp-company i {
    font-size: 0.85rem;
}

.exp-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.exp-achievement {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(34, 197, 94, 0.1);
    border-left: 3px solid #22c55e;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem;
    color: #22c55e;
    margin-bottom: 15px;
}

.exp-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exp-tech span {
    padding: 5px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.exp-tech span:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

/* =====================================================
   EDUCATION SECTION
   ===================================================== */
.education {
    background: var(--bg-dark);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.education-card {
    padding: 30px;
    display: flex;
    gap: 25px;
    align-items: flex-start;
    border-left: 4px solid var(--accent);
    transition: all var(--transition-normal);
}

.education-card:hover {
    transform: translateY(-5px);
    border-left-color: var(--primary);
}

.edu-icon {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.edu-content {
    flex: 1;
}

.edu-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
}

.edu-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.edu-school {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--primary-light);
    margin-bottom: 12px;
    font-weight: 500;
}

.edu-school i {
    font-size: 0.9rem;
}

.edu-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* =====================================================
   PROJECTS SECTION
   ===================================================== */
.projects {
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.carousel-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.carousel-scene {
    display: block;
}

.carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-card {
    width: 100%;
    transition: all 0.3s ease;
}

.card-inner {
    width: 100%;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card-inner:hover {
    transform: scale(1.02);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-tech {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.card-tech span {
    padding: 5px 10px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 15px;
    font-size: 0.75rem;
    color: var(--primary-light);
}

.card-links {
    display: flex;
    gap: 15px;
}

.card-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.card-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.card-badge {
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #22c55e;
    font-weight: 600;
}

.card-confidential {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ef4444;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* =====================================================
   PROJECT CARD BACKGROUNDS
   ===================================================== */
/* Background zoom via ::before so it never tiles */
#proj-doc-agent .card-inner::before,
#proj-fitness   .card-inner::before,
#proj-insurance .card-inner::before,
#proj-video     .card-inner::before,
#proj-fishing   .card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    z-index: 0;
    border-radius: inherit;
}

#proj-doc-agent .card-inner::before {
    background-image:
        linear-gradient(rgba(8,10,20,0.68), rgba(8,10,20,0.84)),
        url('images/bg-doc-agent.png');
}

#proj-fitness .card-inner::before {
    background-image:
        linear-gradient(rgba(8,10,20,0.68), rgba(8,10,20,0.84)),
        url('images/bg-fitness.png');
}

#proj-insurance .card-inner::before {
    background-image:
        linear-gradient(rgba(8,10,20,0.68), rgba(8,10,20,0.84)),
        url('images/bg-insurance.png');
}

#proj-video .card-inner::before {
    background-image:
        linear-gradient(rgba(8,10,20,0.68), rgba(8,10,20,0.84)),
        url('images/bg-video.png');
}

#proj-fishing .card-inner::before {
    background-image:
        linear-gradient(rgba(8,10,20,0.68), rgba(8,10,20,0.84)),
        url('images/bg-fishing.png');
}

/* Zoom the pseudo-element, not the background-size */
#proj-doc-agent .card-inner:hover::before,
#proj-fitness   .card-inner:hover::before,
#proj-insurance .card-inner:hover::before,
#proj-video     .card-inner:hover::before,
#proj-fishing   .card-inner:hover::before {
    transform: scale(1.08);
}

/* Keep all card content above the ::before layer */
#proj-doc-agent .card-inner > *,
#proj-fitness   .card-inner > *,
#proj-insurance .card-inner > *,
#proj-video     .card-inner > *,
#proj-fishing   .card-inner > * {
    position: relative;
    z-index: 1;
}

/* Project logo icons — white background to fuse with white-bg logos */
.card-icon-proj {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

.card-icon-proj img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    border-radius: 50%;
}

/* =====================================================
   EXPERIENCE CARD BACKGROUNDS
   ===================================================== */
#exp-imt::before,
#exp-orange::before,
#exp-gin::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    z-index: 0;
    border-radius: inherit;
}

#exp-imt::before {
    background-image:
        linear-gradient(rgba(8,10,20,0.50), rgba(8,10,20,0.65)),
        url('images/bg-exp-imt.png');
}

#exp-orange::before {
    background-image:
        linear-gradient(rgba(8,10,20,0.50), rgba(8,10,20,0.65)),
        url('images/bg-exp-orange.png');
}

#exp-gin::before {
    background-image:
        linear-gradient(rgba(8,10,20,0.50), rgba(8,10,20,0.65)),
        url('images/bg-exp-gin.png');
}

/* Zoom on hover */
#exp-imt:hover::before,
#exp-orange:hover::before,
#exp-gin:hover::before {
    transform: scale(1.08);
}

/* Keep card content above the ::before layer */
#exp-imt > *,
#exp-orange > *,
#exp-gin > * {
    position: relative;
    z-index: 1;
}

/* NEW badge — inline pill next to project title */
.badge-new {
    position: absolute !important;
    top: 16px;
    right: 16px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 13px;
    border-radius: 20px;
    background: linear-gradient(90deg, #b8860b, #ffd700, #fffacd, #ffd700, #b8860b);
    background-size: 250% auto;
    color: #3d2000;
    box-shadow: 0 2px 14px rgba(255,215,0,0.5);
    animation: gold-shine 2.5s linear infinite;
}

@keyframes gold-shine {
    0%   { background-position: 0% center; }
    100% { background-position: 250% center; }
}

/* Carousel Controls - Hidden for grid layout */
.carousel-controls {
    display: none;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

.carousel-indicators {
    display: flex;
    gap: 10px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    background: var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.carousel-indicator.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* Certifications */
.certifications {
    margin-top: 80px;
    text-align: center;
}

.cert-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.cert-item {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.cert-icon-wrap {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: var(--gradient-1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
}

.cert-icon-stanford {
    background: linear-gradient(135deg, #8b1a1a, #c0392b);
}

.cert-icon-harvard {
    background: linear-gradient(135deg, #1a1a6e, #2563eb);
}

.cert-icon-edge {
    background: linear-gradient(135deg, #065f46, #10b981);
}

.cert-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
    min-width: 0;
}

.cert-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.cert-issuer {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.cert-item:hover {
    transform: translateY(-4px);
    border-left-color: var(--accent);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

/* =====================================================
   CONTACT SECTION
   ===================================================== */
.contact {
    background: var(--bg-dark);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-card {
    padding: 40px;
}

.contact-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.contact-card > p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.contact-item:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(10px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1.2rem;
}

.contact-text {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-value {
    font-size: 1rem;
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-5px);
}

/* Contact Form */
.contact-form {
    padding: 40px;
    position: relative;
    z-index: 10;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-fast);
    outline: none;
    resize: none;
    position: relative;
    z-index: 5;
    cursor: text;
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all var(--transition-fast);
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -10px;
    font-size: 0.8rem;
    color: var(--primary);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width var(--transition-normal);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

.submit-btn {
    width: 100%;
    justify-content: center;
    position: relative;
}

.submit-btn .btn-text,
.submit-btn .btn-icon {
    transition: all var(--transition-fast);
}

.submit-btn .btn-loading,
.submit-btn .btn-success {
    position: absolute;
    opacity: 0;
    visibility: hidden;
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-icon {
    opacity: 0;
    visibility: hidden;
}

.submit-btn.loading .btn-loading {
    opacity: 1;
    visibility: visible;
}

.submit-btn.success .btn-text,
.submit-btn.success .btn-icon {
    opacity: 0;
    visibility: hidden;
}

.submit-btn.success .btn-success {
    opacity: 1;
    visibility: visible;
}

.submit-btn.success {
    background: #22c55e;
}

/* Form Status Message */
.form-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: center;
    transition: all var(--transition-fast);
}

.form-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.form-status:empty {
    display: none;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--bg-darker);
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =====================================================
   RESPONSIVE STYLES
   ===================================================== */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .experience-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title .name {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .experience-grid {
        grid-template-columns: 1fr;
    }

    .education-grid {
        grid-template-columns: 1fr;
    }

    .education-card {
        flex-direction: column;
        text-align: center;
    }

    .edu-school {
        justify-content: center;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .carousel-scene {
        height: 420px;
    }

    .carousel,
    .carousel-card {
        width: 280px;
    }

    /* Hide custom cursor on mobile */
    .cursor,
    .cursor-follower {
        display: none;
    }

    body {
        cursor: auto;
    }
}

@media (max-width: 480px) {
    .about-photo img {
        width: 140px;
        height: 140px;
    }

    .hero-title .greeting {
        font-size: 1.2rem;
    }

    .hero-title .name {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .glass-card {
        padding: 20px !important;
    }
}

/* =====================================================
   ANIMATION UTILITIES
   ===================================================== */
[data-aos] {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Gradient Animation */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradient 5s ease infinite;
}

/* =====================================================
   NAV RIGHT GROUP
   ===================================================== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* =====================================================
   THEME TOGGLE
   ===================================================== */
.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all var(--transition-normal);
}

.theme-toggle:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    transform: rotate(30deg);
}

.theme-toggle .fa-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .fa-sun {
    display: inline-block;
    color: #f59e0b;
}

/* =====================================================
   PROFILE PHOTO
   ===================================================== */
.about-photo {
    text-align: center;
    margin-bottom: 30px;
}

.about-photo img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    transition: all var(--transition-normal);
}

.about-photo img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

/* =====================================================
   LOGO IMAGES IN CARDS
   ===================================================== */
.exp-icon img,
.edu-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

/* =====================================================
   PROJECT CARD LOGOS
   ===================================================== */
.card-icon-logo {
    background: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

/* =====================================================
   SCROLL INDICATOR FIX
   ===================================================== */
.scroll-indicator {
    transition: opacity 0.4s ease;
}

.scroll-indicator.hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* =====================================================
   LIGHT THEME
   ===================================================== */
[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-darker: #e2e8f0;
    --bg-card: rgba(0, 0, 0, 0.03);
    --text-primary: #1e293b;
    --text-secondary: rgba(30, 41, 59, 0.7);
    --text-muted: rgba(30, 41, 59, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(248, 250, 252, 0.9);
}

[data-theme="light"] .mobile-menu {
    background: rgba(248, 250, 252, 0.98);
}

[data-theme="light"] .loader {
    background: var(--bg-darker);
}

[data-theme="light"] .about {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

[data-theme="light"] .experience {
    background: var(--bg-darker);
}

[data-theme="light"] .projects {
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

[data-theme="light"] .skill-tag {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .exp-tech span {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .card-tech span {
    background: rgba(99, 102, 241, 0.1);
}

[data-theme="light"] ::selection {
    color: #ffffff;
}

[data-theme="light"] .footer {
    background: var(--bg-darker);
}

[data-theme="light"] .hero-title .name,
[data-theme="light"] .section-title,
[data-theme="light"] .stat-number,
[data-theme="light"] .stat-plus,
[data-theme="light"] .logo-text {
    -webkit-text-fill-color: transparent;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =====================================================
   COMPETITIONS
   ===================================================== */
/* Filter tabs */
.comp-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 48px;
}

.comp-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px;
    border-radius: 30px;
    border: 1px solid rgba(99,102,241,0.25);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.comp-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99,102,241,0.06);
}

.comp-filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

/* Type badge (In-Person / Online) */
.comp-type-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.3px;
}

.comp-type-attended {
    background: rgba(16,185,129,0.12);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.25);
}

.comp-type-online {
    background: rgba(6,182,212,0.12);
    color: var(--accent);
    border: 1px solid rgba(6,182,212,0.25);
}

/* Online competition result badge */
.comp-result-online {
    background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(99,102,241,0.10));
    color: var(--accent);
    border-color: rgba(6,182,212,0.3);
}

/* Hidden entry during filter */
.comp-entry.comp-hidden {
    display: none;
}

.comp-divider.comp-hidden {
    display: none;
}

.comp-list {
    max-width: 900px;
    margin: 0 auto;
}

.comp-entry {
    position: relative;
    padding: 44px 44px 44px 64px;
    overflow: hidden;
    transition: background 0.3s ease;
    border-radius: 4px;
}

.comp-entry:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* Giant watermark rank number */
.comp-rank-bg {
    position: absolute;
    top: 50%;
    right: 32px;
    transform: translateY(-50%);
    font-size: 9rem;
    font-weight: 900;
    line-height: 1;
    color: var(--primary);
    opacity: 0.04;
    letter-spacing: -4px;
    pointer-events: none;
    user-select: none;
    font-family: 'Arial', sans-serif;
}

/* Left accent bar */
.comp-accent {
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease, opacity 0.3s ease;
    opacity: 0.6;
}

.comp-entry:hover .comp-accent {
    width: 5px;
    opacity: 1;
}

.comp-content {
    position: relative;
    z-index: 1;
}

.comp-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.comp-title-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comp-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.comp-organizer {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comp-organizer i {
    color: var(--primary);
    font-size: 0.75rem;
}

.comp-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.comp-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.comp-result {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(234,179,8,0.12));
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.3);
    white-space: nowrap;
}

.comp-result-silver {
    background: linear-gradient(135deg, rgba(148,163,184,0.18), rgba(203,213,225,0.12));
    color: #94a3b8;
    border-color: rgba(148,163,184,0.3);
}

.comp-result-dgse {
    background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(6,182,212,0.12));
    color: var(--accent);
    border-color: rgba(6,182,212,0.3);
}

.comp-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 18px 0;
    max-width: 680px;
}

.comp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.comp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comp-tags span {
    font-size: 0.73rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    letter-spacing: 0.3px;
}

.comp-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
    transition: opacity 0.2s ease, gap 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.comp-link:hover {
    opacity: 1;
    gap: 9px;
}

.comp-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.2), transparent);
    margin: 0 44px;
}

/* Light theme adjustments */
[data-theme="light"] .comp-entry:hover {
    background: rgba(99, 102, 241, 0.04);
}

[data-theme="light"] .comp-rank-bg {
    opacity: 0.03;
}

[data-theme="light"] .comp-tags span {
    background: rgba(99, 102, 241, 0.08);
}

@media (max-width: 768px) {
    .comp-entry {
        padding: 32px 24px 32px 40px;
    }

    .comp-top {
        flex-direction: column;
        gap: 12px;
    }

    .comp-badges {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .comp-rank-bg {
        font-size: 6rem;
        right: 16px;
    }

    .comp-divider {
        margin: 0 24px;
    }
}

/* =====================================================
   TERMINAL
   ===================================================== */
.terminal-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--glass-bg);
    border: 1px solid rgba(99, 102, 241, 0.4);
    backdrop-filter: blur(14px);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    z-index: 500;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.terminal-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.terminal-btn i {
    color: var(--primary-light);
    font-size: 0.9rem;
}

.terminal-btn.is-open {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    color: var(--text-primary);
}

.terminal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.terminal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.terminal-window {
    width: min(740px, 92vw);
    height: min(500px, 82vh);
    background: #0d1117;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.terminal-overlay.active .terminal-window {
    transform: translateY(0) scale(1);
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    background: #161b22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    user-select: none;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.t-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    cursor: pointer;
    transition: filter 0.15s;
}

.t-dot:hover { filter: brightness(1.3); }
.t-dot-red    { background: #ff5f57; }
.t-dot-yellow { background: #febc2e; }
.t-dot-green  { background: #28c840; }

.terminal-title {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding: 14px 20px 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.87rem;
    line-height: 1.75;
    color: #c9d1d9;
}

.terminal-output::-webkit-scrollbar { width: 4px; }
.terminal-output::-webkit-scrollbar-track { background: transparent; }
.terminal-output::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.35);
    border-radius: 4px;
}

.t-line { display: block; min-height: 1em; }

/* Terminal text colours */
.tc-green  { color: #3fb950; }
.tc-cyan   { color: #06b6d4; }
.tc-yellow { color: #e3b341; }
.tc-red    { color: #f85149; }
.tc-purple { color: #a5b4fc; }
.tc-muted  { color: rgba(255, 255, 255, 0.3); }
.tc-bold   { font-weight: 700; }
.tc-link   { color: #6366f1; cursor: pointer; text-decoration: underline; }
.tc-link:hover { color: #818cf8; }

.terminal-input-row {
    display: flex;
    align-items: center;
    padding: 10px 20px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #0d1117;
}

.t-prompt {
    font-family: 'Courier New', monospace;
    font-size: 0.87rem;
    color: #3fb950;
    white-space: nowrap;
    flex-shrink: 0;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Courier New', monospace;
    font-size: 0.87rem;
    color: #c9d1d9;
    caret-color: #3fb950;
}

@media (max-width: 480px) {
    .terminal-window {
        height: 85vh;
        border-radius: 10px 10px 0 0;
    }
    .terminal-overlay {
        align-items: flex-end;
    }
}
