:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary: #1e293b;
    --accent: #10b981;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul { list-style: none; }

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

.section-padding { padding: 5rem 0; }
.text-center { text-align: center; }

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 1000;
    transition: width 0.08s linear;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-dark);
}

.badge-accent {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-outline {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 50;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i { color: var(--primary); }

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

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 2px;
}

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

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 1px;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 18px rgba(14, 165, 233, 0.45);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.55);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--secondary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover { border-color: var(--text-muted); }

/* Alert Banner */
.alert-banner {
    background: linear-gradient(90deg, var(--primary) 0%, #3b82f6 100%);
    color: white;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 4.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

/* Hero Background Wrapper */
.hero-bg {
    background:
        radial-gradient(ellipse 70% 60% at 75% 25%, rgba(14, 165, 233, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 50% 70% at 20% 75%, rgba(16, 185, 129, 0.05) 0%, transparent 65%),
        var(--bg-light);
    position: relative;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(14, 165, 233, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-content h1 span { color: var(--primary); }

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-badge { margin-bottom: 1rem; }

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Floating Tech Badges */
.float-badge {
    position: absolute;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--secondary);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 5;
    white-space: nowrap;
    animation: floatAnim 4s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.float-badge:hover,
.float-badge:focus-visible {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    outline: none;
}

.float-badge i { color: var(--primary); }
.float-badge:nth-child(1) { animation-delay: 0s;   top: 10%;    left: 0;    } /* Python      — gauche haut    */
.float-badge:nth-child(2) { animation-delay: 1s;   top: 6%;     right: 0;   } /* React       — droite haut    */
.float-badge:nth-child(3) { animation-delay: 2s;   bottom: 12%; left: 0;    } /* Cybersec    — gauche bas     */
.float-badge:nth-child(4) { animation-delay: 0.5s; bottom: 6%;  right: 0;   } /* Git         — droite bas     */
.float-badge:nth-child(5) { animation-delay: 0.8s; top: 48%;    left: -3%;  } /* TypeScript  — gauche milieu  */
.float-badge:nth-child(6) { animation-delay: 1.8s; top: 48%;    right: -3%; } /* SQL         — droite milieu  */
.float-badge:nth-child(7) { animation-delay: 1.3s; top: 0%;     left: 28%;  } /* Firebase    — haut centre    */
.float-badge:nth-child(8) { animation-delay: 2.5s; bottom: 0%;  right: 20%; } /* C/SDL2      — bas centre     */
.float-badge:nth-child(9) { animation-delay: 1.6s; top: 27%;    right: -2%; } /* Data        — droite 1/4 haut*/

@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-9px); }
}

.hero-shape {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(16, 185, 129, 0.2));
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-avatar-placeholder {
    width: 250px;
    height: 250px;
    background-color: var(--bg-white);
    border-radius: 50%;
    box-shadow: 0 0 0 8px white, 0 8px 40px rgba(14, 165, 233, 0.3), var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary);
    border: 8px solid white;
    z-index: 2;
    overflow: hidden;
}

.hero-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes morph {
    0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    margin-top: 1.25rem;
}

/* About & Stats Section */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card:focus-visible {
    outline: none;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(14, 165, 233, 0.3);
}

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    font-family: 'Poppins', sans-serif;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Experience & Education Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    opacity: 0.4;
}

.timeline-item {
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 4px solid var(--bg-light);
    box-shadow: 0 0 0 2px var(--primary), 0 0 12px rgba(14, 165, 233, 0.4);
}

.timeline-item.edu .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(16, 185, 129, 0.4);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
    display: block;
}

.timeline-item.edu .timeline-date { color: var(--accent); }

.timeline-content {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.timeline-content:hover { box-shadow: var(--shadow-md); }

.timeline-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.timeline-org {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

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

.project-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    padding-top: 1.75rem;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-color, var(--primary));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(14, 165, 233, 0.3);
}

/* Category colors */
.project-card.cat-systems  { --card-color: #f97316; }
.project-card.cat-systems  .project-icon { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.project-card.cat-security { --card-color: #ef4444; }
.project-card.cat-security .project-icon { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.project-card.cat-python   { --card-color: #f59e0b; }
.project-card.cat-python   .project-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.project-card.cat-game     { --card-color: #8b5cf6; }
.project-card.cat-game     .project-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.project-card.cat-green    { --card-color: var(--accent); }
.project-card.cat-green    .project-icon { background: rgba(16, 185, 129, 0.1); color: var(--accent); }

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-icon {
    width: 40px;
    height: 40px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.project-team-badge {
    font-size: 0.75rem;
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

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

.project-tags span {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--secondary);
    font-weight: 500;
}

.project-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.project-github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}

.project-github-link:hover { color: var(--secondary); }

.project-demo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-dark);
    transition: color 0.2s;
}

.project-demo-link:hover { color: var(--primary); }

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-group {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.skill-group:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.skill-group h3 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

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

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.35rem 0.75rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--secondary);
    transition: all 0.2s;
    cursor: default;
    text-decoration: none;
    display: inline-block;
}

a.skill-tag {
    cursor: pointer;
}

a.skill-tag:visited {
    color: var(--secondary);
}

.skill-tag:hover {
    background: rgba(14, 165, 233, 0.07);
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #0c4a6e 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    border-radius: var(--radius-lg);
    margin: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.contact-section::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.contact-section > * { position: relative; z-index: 1; }

.contact-section h2 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.contact-section p {
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.social-link {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* Scroll-to-top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 22px rgba(14, 165, 233, 0.55);
}

/* Card click hint */
.card-click-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s, transform 0.25s;
}

.project-card:hover .card-click-hint {
    opacity: 1;
    transform: translateY(0);
}

.card-click-hint .fa-computer-mouse {
    animation: mouseClick 1.6s ease-in-out infinite;
}

/* On touch devices there is no hover, so keep the hint always visible */
@media (hover: none) {
    .card-click-hint {
        opacity: 1;
        transform: translateY(0);
    }
    .card-click-hint .fa-computer-mouse {
        animation: none;
    }
}

@keyframes mouseClick {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-2px) scale(0.88); }
}

.project-card { cursor: pointer; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    max-width: 660px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 60px -10px rgb(0 0 0 / 0.45);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--border);
    color: var(--secondary);
    transform: rotate(90deg);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-right: 2.5rem;
}

.modal-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    color: var(--secondary);
}

.modal-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.modal-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.65rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--secondary);
    font-weight: 500;
}

.modal-divider {
    height: 1px;
    background: var(--border);
    margin: 1.25rem 0;
}

.modal-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.modal-highlights {
    list-style: none;
    margin-bottom: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-highlights li {
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    line-height: 1.55;
}

.modal-highlights li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 0.45em;
}

.modal-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.modal-link-github {
    background: var(--secondary);
    color: white;
}

.modal-link-github:hover {
    background: #0f172a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.2);
}

.modal-link-demo {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.modal-link-demo:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.45);
}

@media (max-width: 480px) {
    .modal { padding: 1.5rem; max-height: 92vh; }
    .modal-title { font-size: 1.2rem; }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero, .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .hero {
        text-align: center;
        padding: 4rem 0 3rem;
    }
    .hero-desc { margin: 0 auto 2rem; }
    .hero-buttons { justify-content: center; }

    /* On mobile the badges can't float around the avatar (no room), so they
       become a static, tappable chip row underneath it instead of vanishing. */
    .hero-visual {
        flex-direction: column-reverse;
        gap: 1.5rem;
    }
    .hero-badges {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
        max-width: 380px;
        margin: 0 auto;
    }
    .float-badge {
        position: static;
        animation: none;
    }
}

@media (max-width: 768px) {
    .section-padding { padding: 3rem 0; }

    .alert-banner {
        flex-direction: column;
        padding: 1rem;
        font-size: 0.85rem;
    }

    .hero { padding: 3rem 0 2rem; }

    .hero-shape {
        width: 280px;
        height: 280px;
    }

    .hero-avatar-placeholder {
        width: 200px;
        height: 200px;
        font-size: 4rem;
        border-width: 6px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn { width: 100%; }

    .projects-grid, .skills-container { grid-template-columns: 1fr; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease-in-out;
    }

    .nav-links.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

    .nav-links a {
        padding: 1rem 1.5rem;
        display: block;
        border-top: 1px solid var(--border);
    }

    .nav-links a.active::after { display: none; }

    .nav-toggle { display: block; }

    .stats-grid { gap: 0.75rem; }

    .stat-card { padding: 1.1rem 0.75rem; }

    .stat-icon-wrap {
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
        margin-bottom: 0.5rem;
    }

    .stat-num { font-size: 1rem; overflow-wrap: break-word; }

    .stat-label { font-size: 0.78rem; }

    .scroll-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .timeline-item { padding-left: 2.5rem; }
    .timeline::before { left: 15px; }
    .timeline-dot { left: 6px; width: 16px; height: 16px; }
    .contact-section { margin: 2rem 0.5rem; padding: 3rem 1rem; }
}
