:root {
    --bg-dark: #1A1D23;
    --bg-card: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-cyan: #22d3ee;
    --accent-purple: #8b5cf6;
    --nav-height: 80px;
    --bg-noise-url: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* Light Mode Variables override */
body.light-mode {
    --bg-dark: #f0f4f8;
    /* Light Grayish Blue */
    --bg-card: rgba(255, 255, 255, 0.6);
    /* White glass */
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-primary: #1a202c;
    /* Dark Gray text */
    --text-secondary: #4a5568;
    --accent-cyan: #0284c7;
    /* Darker Cyan for visibility */
    --accent-purple: #7c3aed;
    /* Darker Purple */
}

/* Light Mode Overrides */
body.light-mode {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

body.light-mode .glass-nav {
    background: rgba(255, 255, 255, 0.9) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .logo,
body.light-mode .nav-links li a,
body.light-mode .active-lang,
body.light-mode .lang-btn,
body.light-mode .toggle-icon {
    color: #000000 !important;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4 {
    color: #1a202c !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

body.light-mode p,
body.light-mode .description,
body.light-mode .subtitle {
    color: #2d3748 !important;
}

body.light-mode .tag {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #1a202c !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #1a202c !important;
}

body.light-mode .card-thumbs .thumb {
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .card-thumbs .thumb.active {
    border-color: var(--accent-cyan);
}

body.light-mode .scroll-top-btn {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-mode .orbit-icon {
    background: #ffffff;
    border-color: var(--accent-cyan);
}

body.light-mode .orbit-icon i {
    color: var(--accent-cyan);
}

/* Custom Cursor Removed */

/* Noise Texture */
.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    /* Top layer but below cursor/modals */
    background-image: var(--bg-noise-url);
    pointer-events: none;
    opacity: 0.3;
    /* Subtle grain */
}

/* Focus Mode (Hides Distractions) */
body.focus-mode .bg-blobs,
body.focus-mode .bg-noise,
body.focus-mode .custom-cursor,
body.focus-mode .scroll-progress,
body.focus-mode .orbit-container,
body.focus-mode .hero-visual {
    display: none !important;
}

body.focus-mode * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Ensure cards are still visible if AOS usually hides them before an animation */
body.focus-mode [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Project Filter Buttons */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 24px;
    border-radius: 50px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-cyan);
    color: #fff;
    /* Always white text on active button */
    border-color: var(--accent-cyan);
}

/* Theme & Focus Toggles in Nav */
.nav-toggles {
    display: flex;
    gap: 10px;
    margin-left: 15px;
    align-items: center;
}

.toggle-icon {
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.toggle-icon:hover {
    color: var(--accent-cyan);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    /* Restored Dark BG */
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    z-index: 0;
    /* Create stacking context */
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    z-index: 9999;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* Animated Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* Behind content but on top of body bg */
    overflow: hidden;
    pointer-events: none;
}



/* Magnetic Button Base Styles */
.magnetic-btn {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    display: inline-flex;
    /* Ensure it stays inline-block but flexible */
}

/* Scroll To Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(26, 29, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-cyan);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    transform: translateY(20px);
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: blobFloat 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.accent-dot {
    color: var(--accent-cyan);
}

/* Glassmorphism Utility */
/* Glassmorphism Utility with Spotlight */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    /* For spotlight positioning */
    overflow: hidden;
    /* Contain the spotlight */
    transition: transform 0.3s, border-color 0.3s;
}

/* Spotlight Effect Layer */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 255, 255, 0.06),
            transparent 40%);
    z-index: 3;
    /* Above content? No, needs to be subtle. Let's try below content but above bg */
    pointer-events: none;
    /* Let clicks pass through */
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.3s;
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    /* Brighter border on hover */
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(26, 29, 35, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links li a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.nav-links li a:hover {
    color: var(--accent-cyan);
}

/* Language Switcher */
.lang-switch {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-btn {
    cursor: pointer;
    transition: color 0.3s;
}

.lang-btn:hover {
    color: var(--accent-cyan);
}

.active-lang {
    color: var(--text-primary);
    font-weight: 700;
}

/* CV Button (Icon Only) */
.btn-cv {
    color: var(--accent-cyan) !important;
    font-size: 1.2rem !important;
    transition: transform 0.3s;
}

.btn-cv:hover {
    transform: translateY(-2px);
}

/* CTA Button */
.btn-cta-small {
    padding: 8px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary) !important;
}

/* Modal Gallery */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: center;
    width: 100%;
}

.modal-gallery-img {
    width: 100%;
    max-width: 600px;
    /* Constrain width so it doesn't take full page */
    height: auto;
    max-height: 400px;
    /* Limit height */
    object-fit: contain;
    /* Ensure full image is visible */
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: #000;
    /* Dark frame background */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 10px;
    /* Frame padding */
}

.btn-cta-small:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan) !important;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
}

.hero-content {
    max-width: 600px;
}

.subtitle {
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.description {
    color: var(--text-secondary);
    margin: 1.5rem 0 2.5rem;
    font-size: 1.1rem;
}

h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    /* Added space to breathe */
}

.btn-primary {
    background: var(--accent-cyan);
    color: #0f172a;
    /* Dark text on bright button */
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(34, 211, 238, 0.3);
}

.btn-secondary {
    border: 1px solid var(--glass-border);
    padding: 14px 32px;
    border-radius: 8px;
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
}

/* Orbit Animation */
.profile-container {
    position: relative;
    width: 450px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid var(--accent-cyan);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.4);
    z-index: 10;
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.orbit-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 380px;
    height: 380px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    animation: rotateOrbit 20s linear infinite;
}

.orbit-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: #1e293b;
    border: 1px solid var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-cyan);
    font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

/* Positioning Icons on Orbit */
.icon-1 {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* JS */
.icon-2 {
    top: 20%;
    right: 10%;
    transform: translate(50%, -50%);
}

/* Python */
.icon-3 {
    bottom: 20%;
    right: 10%;
    transform: translate(50%, 50%);
}

/* Code */
.icon-4 {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
}

/* HTML */
.icon-5 {
    bottom: 20%;
    left: 10%;
    transform: translate(-50%, 50%);
}

/* CSS */
.icon-6 {
    top: 20%;
    left: 10%;
    transform: translate(-50%, -50%);
}

/* DB */
.icon-7 {
    top: 50%;
    right: -25px;
    transform: translate(0, -50%);
    /* React extra */
}

@keyframes rotateOrbit {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Counter-rotate icons so they stay upright */
.orbit-icon i {
    animation: counterRotate 20s linear infinite;
}

@keyframes counterRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

/* Timeline (About) */
.section-padding {
    /* Renamed from .timeline-section to match HTML */
    padding: 80px 10%;
    /* Matched to experience-section (was 100px) */
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    position: relative;
    display: block;
    /* changed from inline-block */
    text-align: center;
    /* Center the title */
}

/* Timeline (Left Aligned) */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0;
    /* Align left to match experience grid */
    padding-left: 20px;
    border-left: 2px solid var(--glass-border);
    /* Transform removed */
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    margin-left: 30px;
    /* Adjust spacing from line */
}

.timeline-dot {
    position: absolute;
    left: -41px;
    /* Align dot on the line */
    top: 5px;
    /* Align with title */
    width: 20px;
    height: 20px;
    background: var(--bg-dark);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.timeline-date {
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-style: italic;
}

/* Projets Grid */
.projects-section {
    padding: 100px 10%;
    background: rgba(0, 0, 0, 0.1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 0;
    overflow: hidden;
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-img {
    height: 200px;
    background: #2d2b42;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-placeholder {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.5;
}

/* Leadership Mini Section */
.leadership-mini {
    margin-top: 1rem;
    /* Moved UP from 3rem */
    padding: 0 2rem 2rem;
    /* Added bottom padding */
    max-width: 700px;
    /* slightly wider to match timeline */
    margin-left: 0;
    /* Align left with timeline */
    margin-right: auto;
    text-align: left;
    /* Text alignment left */
}

.leadership-mini h3 {
    margin-bottom: 1rem;
    color: var(--accent-purple);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.leadership-card {
    padding: 1.5rem;
    border-left: 3px solid #f59e0b;
    /* Amber/Gold */
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.05), rgba(30, 41, 59, 0.4));
    text-align: left;
}

.lead-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.lead-header h4 {
    font-size: 1.1rem;
    color: #fff;
    margin: 0;
}

.lead-date {
    font-size: 0.85rem;
    color: #94a3b8;
    font-family: monospace;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.tags {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    color: var(--accent-cyan);
}

.project-info h3 {
    margin-bottom: 0.5rem;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-link {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Refined Skills Section (Ghrawi Style) */
.skills-section {
    padding: 80px 10%;
}

.tech-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tech-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem !important;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease-out !important;
}

.tech-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.15);
}

.tech-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: 0.3s;
}

.tech-card span {
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.2;
    margin-top: 0.5rem;
}

/* Icon Colors */
/* Experience Section */
.experience-section {
    padding: 80px 10%;
    background: rgba(0, 0, 0, 0.2);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.experience-card {
    position: relative;
    border-top: 3px solid var(--accent-purple);
    /* Purple for Experience */
    transition: transform 0.3s;
}

.experience-card:hover {
    transform: translateY(-5px);
}

.exp-header {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.exp-header h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.exp-type {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-weight: 600;
    text-transform: uppercase;
}

.exp-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Icon Colors */
.icon-js {
    color: #f7df1e;
}

.icon-python {
    color: #3776ab;
}

.icon-cpp {
    color: #00599c;
}

.icon-react {
    color: #61dafb;
}

.icon-html {
    color: #e34f26;
}

.icon-sql {
    color: #00758f;
}

.icon-mongo {
    color: #47A248;
}

/* MongoDB Green */
.icon-vscode {
    color: #007acc;
}

/* VS Code Blue */
.icon-git {
    color: #f05032;
}

.icon-office {
    color: #217346;
}

.icon-adobe {
    color: #ff0000;
}

.icon-flask {
    color: #fff;
}

/* Compact Languages (Text Only) */
.languages-compact {
    padding: 1.5rem;
    text-align: center;
    border-left: 3px solid var(--accent-purple);
    display: inline-block;
    width: 100%;
}

.languages-compact h3 {
    margin-bottom: 1rem;
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

.lang-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.lang-text {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.lang-text::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: var(--accent-purple);
    bottom: -5px;
    left: 0;
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: right;
}

.lang-text:hover {
    color: #fff;
}

.lang-text:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Modal Styles (Fixing the 'X' Bug) */
.modal-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    background: #1e293b;
    border: 1px solid var(--accent-cyan);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Updated Skills & Languages */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.tech-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.lang-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
}

.lang-badge {
    background: rgba(34, 211, 238, 0.1);
    border-left: 3px solid var(--accent-cyan);
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 500;
}

/* Contact */
.contact-section {
    padding: 100px 10%;
    display: flex;
    justify-content: center;
}

.contact-card {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.contact-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Special Experience Card (Leadership) */
.special-card {
    border-left: 3px solid #f59e0b;
    /* Amber/Gold */
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.05), rgba(30, 41, 59, 0.6));
    position: relative;
    overflow: hidden;
}

.special-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(245, 158, 11, 0.1), transparent);
    background-size: 200% 200%;
    animation: shine 3s infinite;
    pointer-events: none;
}

.special-dot {
    border-color: #f59e0b !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5) !important;
    background: #f59e0b !important;
}

@keyframes shine {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

/* --- Uniform Projects Grid (Restored & Polished) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 5%;
}

.project-card {
    display: flex;
    flex-direction: column;
    /* Force vertical stacking */
    height: 100%;
    /* Uniform height */
    padding: 0;
    /* Remove padding from card, put it in info */
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Image Frame - Fixed Size */
.img-frame {
    width: 100%;
    height: 200px;
    /* FIXED HEIGHT */
    background: #000;
    position: relative;
    overflow: hidden;
}

.img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* FILL the frame, crop if necessary */
    transition: transform 0.5s ease;
}

.project-card:hover .img-frame img {
    transform: scale(1.05);
    /* Zoom effect on hover */
}

/* Thumbnails (for E-commerce) in grid */
.card-thumbs {
    display: flex;
    gap: 5px;
    padding: 5px 1.5rem 0;
}

.card-thumbs .thumb {
    width: 40px;
    height: 30px;
}

/* Project Info Area */
.project-info {
    flex: 1;
    /* Grow to fill remaining space */
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
    min-height: 3.5rem;
    /* Ensure 2 lines of title align nicely */
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    /* Pushes button to bottom */
}

/* Button Alignment */
.project-info button,
.project-info .btn-group {
    align-self: flex-start;
    margin-top: auto;
    /* Guarantee bottom alignment */
}

.project-visual,
.main-img-container,
.project-gallery {
    /* Cleanup old classes */
    display: none;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}

.contact-btn:hover {
    background: var(--accent-cyan);
    color: #000;
    border-color: var(--accent-cyan);
}

.terminal-box {
    background: #0f172a;
    border-radius: 8px;
    text-align: left;
    padding: 1rem;
    margin-top: 2rem;
    font-family: 'Courier New', monospace;
    border: 1px solid #334155;
}

.terminal-header {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #ef4444;
}

.yellow {
    background: #f59e0b;
}

.green {
    background: #10b981;
}

.prompt {
    color: var(--accent-cyan);
}

.response {
    color: var(--text-secondary);
    margin-top: 5px;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* --- 18. Animated Skill Cards --- */


.skill-visual {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent !important;
    /* Remove background to fix 'grey square'/boxy issues */
    border-radius: 50%;
}

.tech-card:hover .skill-visual {
    background: transparent !important;
}

body.light-mode .skill-visual {
    background: transparent !important;
}

.skill-visual i {
    font-size: 2rem;
    z-index: 2;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.tech-card:hover .skill-visual i {
    transform: scale(1.1);
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-linecap: round;
    filter: drop-shadow(0 0 5px var(--accent-cyan));
}

.progress-ring__circle-bg {
    stroke: transparent;
}

body.light-mode .progress-ring__circle-bg {
    stroke: transparent;
}

/* Specific icon colors */
.icon-js {
    color: #f7df1e !important;
}

.icon-python {
    color: #3776ab !important;
}

.icon-cpp {
    color: #00599c !important;
}

.icon-react {
    color: #61dafb !important;
}

.icon-sql {
    color: #4479a1 !important;
}

.icon-mongo {
    color: #47a248 !important;
}

.icon-html {
    color: #e34f26 !important;
}

.icon-git {
    color: #f05032 !important;
}

.icon-vscode {
    color: #007acc !important;
}

.icon-adobe {
    color: #ff0000 !important;
}

.icon-office {
    color: #d83b01 !important;
}

/* --- 19. Workflow Section Styles --- */
.workflow-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    position: relative;
}

.workflow-step {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    position: relative;
    transition: transform 0.3s ease;
}

.workflow-step:hover {
    transform: translateY(-5px);
}

.step-card {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    height: 100%;
    border-top: 2px solid var(--accent-cyan);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
    background: rgba(34, 211, 238, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
}

.workflow-step h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.workflow-step p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.workflow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
    opacity: 0.5;
}

@media (max-width: 850px) {
    .workflow-container {
        flex-direction: column;
        gap: 2rem;
    }

    .workflow-arrow {
        transform: rotate(90deg);
        margin: -1rem 0;
    }

    .workflow-step {
        width: 100%;
        max-width: 100%;
    }
}

/* --- 20. Hero Terminal (Idea 5) --- */
.hero-terminal {
    margin-top: 2.5rem;
    width: 100%;
    max-width: 500px;
    background: rgba(15, 23, 42, 0.8) !important;
    /* Darker background for contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Fira Code', 'Courier New', monospace;
    backdrop-filter: blur(10px);
}

.terminal-bar {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.term-dots {
    display: flex;
    gap: 6px;
    margin-right: 15px;
}

.term-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.term-dots .red {
    background: #ff5f56;
}

.term-dots .yellow {
    background: #ffbd2e;
}

.term-dots .green {
    background: #27c93f;
}

.term-title {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    flex: 1;
    text-align: center;
}

.terminal-content {
    padding: 1rem;
    min-height: 80px;
    /* Space for a few lines */
    color: #a5b0c5;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}

.code-text {
    color: var(--accent-cyan);
    font-weight: 500;
    white-space: pre-wrap;
    /* Keeps indentation */
}

.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--accent-cyan);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

/* --- 21. Hacker Mode (Konami Code Easter Egg - Idea 10) --- */
body.hacker-mode {
    --accent-cyan: #0f0;
    /* Matrix Green */
    background: #000;
}

body.hacker-mode nav.glass-nav,
body.hacker-mode .glass-card {
    background: rgba(0, 20, 0, 0.8);
    border-color: #0f0;
}

body.hacker-mode h1,
body.hacker-mode h2,
body.hacker-mode h3 {
    text-shadow: 0 0 5px #0f0;
    font-family: 'Courier New', monospace;
}

body.hacker-mode .blob {
    mix-blend-mode: color-dodge;
    background: #0f0;
}


/* --- 22. Code Spotlight Section --- */
.code-explorer-container {
    display: flex;
    height: 500px;
    max-width: 1000px;
    margin: 2rem auto;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.explorer-sidebar {
    width: 250px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.explorer-title {
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
}

.file-list {
    flex: 1;
}

.file-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-item i {
    width: 16px;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.file-item.active {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
}

.explorer-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.code-header {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-controls {
    display: flex;
    gap: 6px;
}

.code-content {
    flex: 1;
    padding: 1.5rem;
    overflow: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.code-content pre {
    margin: 0;
}

.code-content code {
    white-space: pre;
}

@media (max-width: 768px) {
    .code-explorer-container {
        flex-direction: column;
        height: auto;
    }

    .explorer-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .file-list {
        display: flex;
        overflow-x: auto;
    }

    .file-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .file-item.active {
        border-bottom: 3px solid var(--accent-cyan);
    }
}


/* --- Basic Syntax Highlighting for Showcase --- */
#showcase-code {
    color: #9cdcfe;
    /* Light blue */
}

/* Pseudo-highlighting using colors for common code patterns */
/* Since we can't easily parse real HL without a lib, we use CSS classes or keep it clean */
/* Let's at least color the keywords if we had spans, but since we use innerText it's harder. */
/* Alternative: Use a few common colors that look like a theme. */

.code-content pre {
    color: #d4d4d4;
}

#showcase-code {
    display: block;
    tab-size: 4;
}


/* --- Project Code Link Styling --- */
.project-code-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.project-code-link:hover {
    opacity: 1;
    transform: translateX(5px);
}