/* ==========================================================================
   CSS Variables & Global Styles
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-dark: #0a0a0f;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(20, 20, 30, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-main: #f0f0f5;
    --text-muted: #a0a0b0;
    --accent-1: #6a11cb; /* Purple */
    --accent-2: #2575fc; /* Blue */
    --accent-3: #00d2ff; /* Light Blue */
    --accent-glow: rgba(37, 117, 252, 0.4);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-slow: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    /* Phones render the fixed 1280px desktop layout (see the viewport meta):
       stop mobile browsers from enlarging text so it matches the PC exactly. */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;   /* fallback for older Android browsers */
    overflow-x: clip;     /* modern: clips decorative blobs without a scroll container */
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;   /* fallback for older Android browsers */
    overflow-x: clip;
    position: relative;
    max-width: 100%;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin: 0;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================================================
   Background Blobs (Animated)
   ========================================================================== */
.blob-bg {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: drift 20s infinite alternate linear;
}

.blob-1 {
    width: min(400px, 60vw);
    height: min(400px, 60vw);
    background: var(--accent-1);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: min(500px, 70vw);
    height: min(500px, 70vw);
    background: var(--accent-2);
    top: 40%;
    right: -200px;
    animation-delay: -5s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
.accent { color: var(--accent-2); }
.gradient-text {
    color: var(--accent-2);
    display: inline-block;
}
.highlight { color: var(--accent-2); font-weight: 500; }
.section-padding { padding: clamp(56px, 9vw, 100px) 5%; max-width: 1200px; margin: 0 auto; }

.glass-panel {
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition-fast);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-glow);
    transform: translateY(-5px);
}

.section-header { text-align: center; margin-bottom: clamp(2.25rem, 5vw, 4rem); }
.section-header h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); display: flex; align-items: center; justify-content: center; gap: 15px; flex-wrap: wrap; }
.section-header .line {
    width: 60px; height: 4px; background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
    margin: 15px auto 0; border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 12px 28px;
    border-radius: 30px; font-weight: 500; font-family: var(--font-heading);
    cursor: pointer; transition: var(--transition-fast);
}
.btn-primary {
    background: var(--accent-2);
    color: white; border: none; box-shadow: 0 5px 15px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 8px 25px var(--accent-glow); transform: scale(1.05); }
.btn-outline { background: transparent; color: var(--text-main); border: 1px solid var(--accent-2); }
.btn-outline:hover { background: rgba(37, 117, 252, 0.1); }

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000; padding: 20px 0;
    transition: var(--transition-slow); background: transparent;
}
.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    padding: 15px 0; border-bottom: 1px solid var(--border-glass);
}
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 5%; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: clamp(1.5rem, 4vw, 1.8rem); font-family: var(--font-heading); font-weight: 800; letter-spacing: -1px; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-item { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.nav-item:hover, .nav-item.active { color: var(--text-main); }
.btn-nav { border: 1px solid var(--border-glass); padding: 8px 18px; border-radius: 20px; }
.btn-nav:hover { background: var(--bg-surface); }
.menu-toggle { display: none; background: none; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    /* Full screen height on a PC, but never taller than 900px: on a phone showing the
       desktop layout the screen is very tall and 100vh alone leaves big empty gaps */
    min-height: min(100vh, 900px); display: flex; align-items: center; justify-content: space-between;
    gap: clamp(24px, 5vw, 60px);
    padding-top: 80px; position: relative;
}
.hero-content { max-width: 600px; min-width: 0; z-index: 10; }
.hero-badge {
    display: inline-block; padding: 8px 16px; background: var(--bg-surface);
    border: 1px solid var(--border-glass); border-radius: 20px; font-size: 0.85rem; margin-bottom: 20px;
}
.hero-title { font-size: clamp(2rem, 8vw, 4rem); line-height: 1.1; margin-bottom: 15px; }
.hero-subtitle { font-size: clamp(1.15rem, 4vw, 1.8rem); font-weight: 500; margin-bottom: 25px; }
.hero-intro { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 20px; }
.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 30px; }

/* Interactive Hero Timeline Cards */
.hero-timeline-section {
    margin-top: 30px;
    margin-bottom: 30px;
}
.timeline-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 20px;
}
.timeline-stream {
    position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent-2), var(--accent-3), transparent);
    opacity: 0.8;
}
.glow-dot {
    position: absolute; left: -4px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--accent-3);
    box-shadow: 0 0 15px 2px var(--accent-3);
    animation: flowDown 3s infinite linear;
}
@keyframes flowDown {
    0% { top: 0; opacity: 0; transform: scale(0.8); }
    15% { opacity: 1; transform: scale(1.2); }
    85% { opacity: 1; transform: scale(1.2); }
    100% { top: 100%; opacity: 0; transform: scale(0.8); }
}

.timeline-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(10, 10, 15, 0.7);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 210, 255, 0.5); /* Neon glow outline */
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3), inset 0 0 10px rgba(0, 210, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    transition: all 0.3s ease;
    max-width: 100%;
}
.timeline-card:hover {
    background: rgba(20, 20, 30, 0.8);
    border-color: rgba(0, 210, 255, 0.9);
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.5), inset 0 0 15px rgba(0, 210, 255, 0.2);
    transform: translateX(5px);
}
.timeline-card-logo {
    background: rgba(255, 255, 255, 0.98);
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    width: 90px;
    height: 60px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    overflow: hidden;
}
.timeline-card-logo img {
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.timeline-card-link {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
    font-size: 0.8rem; font-family: monospace; color: var(--accent-2); text-decoration: none;
}
.timeline-card-link:hover { text-decoration: underline; }
.timeline-card-link i { font-size: 0.7rem; }
.live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
    box-shadow: 0 0 8px #22c55e; animation: pulse-green 2.5s infinite;
}
.timeline-icon-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--accent-3);
    font-size: 24px;
}
.timeline-card-content {
    flex-grow: 1;
    min-width: 0;
}
.timeline-card-title {
    font-size: clamp(0.98rem, 2.5vw, 1.05rem);
    color: var(--accent-3);
    margin-bottom: 5px;
    font-weight: 600;
}
.timeline-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}


/* Hero Visual Animation */
.hero-visual {
    position: relative; width: min(450px, 100%); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.image-wrapper {
    width: min(350px, 78vw); aspect-ratio: 7 / 9; border-radius: 20px; overflow: hidden;
    padding: 10px; background: linear-gradient(135deg, rgba(106,17,203,0.3), rgba(37,117,252,0.3));
    z-index: 5;
}
.profile-photo {
    width: 100%; height: 100%; object-fit: cover; border-radius: 12px; filter: contrast(1.1);
}

.glass-card {
    position: absolute; background: rgba(255, 255, 255, 0.05); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1); padding: 15px 25px; border-radius: 12px;
    display: flex; align-items: center; gap: 15px; font-weight: 600; box-shadow: 0 10px 25px rgba(0,0,0,0.5); z-index: 10;
}
.glass-card i { font-size: 1.5rem; }
.float-anim { top: 15%; left: -20%; animation: float 6s infinite ease-in-out; }
.float-anim-delayed { bottom: 15%; right: -15%; animation: float 6s infinite ease-in-out 3s; }

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

/* ==========================================================================
   Timeline / Parcours Section
   ========================================================================== */
.timeline-container { display: flex; flex-direction: column; gap: 30px; position: relative; padding-left: 20px; }
.timeline-container::before {
    content: ''; position: absolute; left: 40px; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(to bottom, var(--accent-1), var(--accent-2)); opacity: 0.3;
}
.timeline-step { display: flex; flex-direction: column; position: relative; padding: 30px 30px 30px 60px; }
.step-number {
    position: absolute; left: 10px; top: 30px; width: 40px; height: 40px;
    background: var(--bg-dark); border: 2px solid var(--accent-1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: bold; font-size: 1.2rem; z-index: 2;
}
.accent-bg { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: white; border: none; }
.timeline-step h3 { margin-bottom: 15px; color: var(--accent-2); font-size: 1.4rem; }
.timeline-step p { color: var(--text-muted); font-size: 1.05rem; margin: 0; }
.highlight-border { border: 1px solid var(--accent-2); box-shadow: 0 0 20px rgba(37, 117, 252, 0.15); }

/* ==========================================================================
   4 Pillars / Profil Polyvalent
   ========================================================================== */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 -20px; /* Offset parent padding if necessary */
}

.carousel-btn {
    position: absolute;
    z-index: 10;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--accent-1);
    color: var(--accent-2);
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: var(--transition-fast);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: var(--accent-1);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.left-btn { left: 0px; }
.right-btn { right: 0px; }

.pillar-grid { 
    display: flex; 
    gap: 30px; 
    overflow-x: auto; 
    scroll-behavior: smooth; 
    scroll-snap-type: x mandatory;
    padding: 20px 40px; /* Padding for horizontal scroll and shadow space */
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none; /* Hide scrollbar Edge */
}

.pillar-grid::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

.pillar-card {
    flex: 0 0 min(350px, 85vw);
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}
.pillar-image { height: 200px; width: 100%; overflow: hidden; }
.pillar-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; filter: brightness(0.85); }
.pillar-card:hover .pillar-image img { transform: scale(1.1); filter: brightness(1); }
.pillar-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.pillar-content h3 { font-size: clamp(1.2rem, 3vw, 1.35rem); margin-bottom: 12px; color: var(--text-main); }
.pillar-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.section-tagline { max-width: 640px; margin: 18px auto 0; color: var(--text-muted); font-size: 0.98rem; font-style: italic; }
.pillar-note { margin-top: 14px; font-size: 0.8rem; color: var(--text-muted); }
.pillar-checkmarks {
    font-size: 0.85rem;
    color: var(--accent-2);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pillar-checkmarks i { color: var(--accent-2); margin-right: 4px; }
.skill-list-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.skill-list-inline li {
    background: rgba(255, 255, 255, 0.1); font-size: 0.8rem; padding: 4px 10px; border-radius: 12px; color: var(--text-muted);
}
.highlight-box {
    position: relative; overflow: hidden; border: 1px solid rgba(37, 117, 252, 0.4);
}
.highlight-box::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, rgba(37, 117, 252, 0.1), transparent 30%); animation: rotate 10s linear infinite; z-index: 0;
}
.highlight-box > * { position: relative; z-index: 1; }

@keyframes rotate { 100% { transform: rotate(360deg); } }

/* ==========================================================================
   Projects Section
   ========================================================================== */
/* Featured projects: demo video playing behind the card content */
.featured-projects { display: grid; gap: 30px; margin: 0 auto 50px; max-width: 1100px; }
.featured-card {
    position: relative; overflow: hidden; isolation: isolate;
    padding: 0; min-height: 460px; display: flex; align-items: flex-end;
    border: 1px solid rgba(37, 117, 252, 0.4);
}
.featured-media { position: absolute; inset: 0; z-index: -1; }
.featured-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-media::after {
    content: ''; position: absolute; inset: 0;
    /* Dark only behind the text column; the right side shows the demo clearly */
    background: linear-gradient(90deg, rgba(10, 10, 15, 0.97) 0%, rgba(10, 10, 15, 0.93) 54%, rgba(10, 10, 15, 0.2) 74%, rgba(10, 10, 15, 0) 100%);
}
.featured-content { position: relative; padding: clamp(1.5rem, 4vw, 2.75rem); max-width: 600px; }
.featured-content h3 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 12px 0 10px; color: var(--text-main); }
.featured-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.project-badge {
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff;
}
.project-badge.badge-muted { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.featured-tagline { color: var(--text-main); opacity: 0.9; font-size: 1rem; margin-bottom: 18px; }
.featured-highlights { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.featured-highlights li { font-size: 0.92rem; color: var(--text-muted); display: flex; gap: 10px; align-items: baseline; }
.featured-highlights i { color: var(--accent-3); font-size: 0.8rem; }
.featured-content .skill-list-inline { margin-bottom: 16px; }
.featured-content .project-private { margin: 0; }
@media (max-width: 768px) {
    /* Phones: the demo sits above the text instead of behind it */
    .featured-card { min-height: 0; flex-direction: column; align-items: stretch; }
    .featured-media { position: relative; inset: auto; z-index: 0; aspect-ratio: 20 / 9; }
    .featured-media::after { background: linear-gradient(0deg, rgba(10, 10, 15, 0.6) 0%, transparent 35%); }
}

.qa-suite-card .qa-badge { align-self: flex-start; width: fit-content; margin-bottom: 14px; color: var(--accent-3); }
.qa-suite-card .project-highlights { margin-bottom: 16px; }

.projects-empty { max-width: 520px; margin: 20px auto 0; text-align: center; color: var(--text-muted); }
.projects-empty i { color: var(--accent-3); margin-right: 8px; }
.projects-empty[hidden], #projects .carousel-container[hidden] { display: none; }

.project-filters { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn {
    background: var(--bg-surface); border: 1px solid var(--border-glass); color: var(--text-muted);
    padding: 11px 20px; min-height: 44px; border-radius: 20px; cursor: pointer; font-size: 0.95rem; transition: var(--transition-fast);
}
.filter-btn:hover, .filter-btn.active { background: var(--accent-2); color: white; border-color: var(--accent-2); box-shadow: 0 4px 15px rgba(37, 117, 252, 0.5); }
.projects-grid { 
    display: flex; gap: 30px; overflow-x: auto; 
    scroll-behavior: smooth; scroll-snap-type: x mandatory; 
    padding: 20px 40px; scrollbar-width: none; -ms-overflow-style: none; 
}
.projects-grid::-webkit-scrollbar { display: none; }
.project-card {
    display: flex; flex-direction: column;
    flex: 0 0 min(350px, 85vw); scroll-snap-align: center;
}
.project-card h3 { font-size: clamp(1.15rem, 3vw, 1.3rem); margin-bottom: 8px; color: var(--text-main); }
.project-tech { font-size: 0.85rem; color: var(--accent-2); font-family: monospace; margin-bottom: 15px; }
a.project-card { text-decoration: none; color: inherit; cursor: pointer; }
/* Demo video strip at the top of a carousel card, edge to edge */
.project-card.has-media { overflow: hidden; }
.project-card-media {
    margin: -2rem -2rem 1.25rem; aspect-ratio: 16 / 9; overflow: hidden;
    border-bottom: 1px solid var(--border-glass); background: var(--bg-surface);
}
.project-card-media video { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.project-highlights { margin: 10px 0 0; padding-left: 18px; font-size: 0.9rem; color: var(--text-muted); }
.project-highlights li { margin-bottom: 4px; }
.project-private { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }
.project-card p { font-size: 0.95rem; color: var(--text-muted); }

/* Tech Table Styles */
.table-container { margin-top: 10px; overflow-x: auto; border-radius: 8px; border: 1px solid var(--border-glass); background: rgba(0,0,0,0.15); }
.tech-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; text-align: left; }
.tech-table th { background: rgba(255,255,255,0.05); color: var(--text-main); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--border-glass); }
.tech-table td { padding: 8px 12px; border-bottom: 1px dashed rgba(255,255,255,0.05); color: var(--text-muted); }
.tech-table tr:last-child td { border-bottom: none; }
.tech-table td:nth-child(2) { color: var(--text-main); font-weight: 500; }

.project-card-footer {
    margin-top: auto;
    padding-top: 20px;
}

.btn-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: var(--accent-2);
    border-radius: 20px;
    color: white;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--accent-glow);
    width: fit-content;
}

.project-card:hover .btn-project {
    transform: translateX(5px);
    box-shadow: 0 6px 20px var(--accent-glow);
    filter: brightness(1.1);
}


/* ==========================================================================
   Masonry Gallery (Hobbies)
   ========================================================================== */
.masonry-gallery {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); grid-auto-rows: 200px; gap: 20px;
    grid-auto-flow: dense; margin-top: 30px;
}
.gallery-item {
    overflow: hidden; border-radius: 15px; padding: 0;
    position: relative; display: flex; align-items: center; justify-content: center;
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; filter: brightness(0.9);
}
.gallery-item:hover img { transform: scale(1.05); filter: brightness(1.1); }
.glass-panel.wide { grid-column: span 2; }
.glass-panel.tall { grid-row: span 2; }

/* ==========================================================================
   Contact Section & Footer
   ========================================================================== */
/* Reduced padding so contact section fits in one viewport */
#contact.section-padding { padding-top: 35px; padding-bottom: 35px; }

.contact-card { max-width: 700px; margin: 0 auto; text-align: left; padding: 15px 22px; }
#contact .section-header { margin-bottom: 0; }
#contact .section-header h2 { font-size: clamp(1.5rem, 4vw, 1.8rem); }
#contact .section-header .line { margin: 6px 0; }

/* Status Badge */
.status-badge {
    display: inline-flex; align-items: center; gap: 8px; font-family: monospace;
    font-size: 0.85rem; color: var(--accent-2); background: rgba(37, 117, 252, 0.1);
    padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(37, 117, 252, 0.3);
    margin-bottom: 25px;
}
.status-dot {
    width: 8px; height: 8px; background: #22c55e; border-radius: 50%;
    box-shadow: 0 0 8px #22c55e; animation: pulse-green 2.5s infinite;
}
@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 8px #22c55e, 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { transform: scale(1); box-shadow: 0 0 8px #22c55e, 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 8px #22c55e, 0 0 0 0 rgba(34, 197, 94, 0); }
}

.contact-header { margin-bottom: 10px; text-align: left; }
.contact-header .line { margin: 10px 0; }
.contact-tagline { color: var(--text-muted); font-size: 0.9rem; margin-top: 5px; margin-bottom: 0; }

/* Code Snippet & Typing Effects */
.contact-code-snippet {
    background: #0f111a; border-radius: 12px; padding: 8px 12px; border: 1px solid rgba(255,255,255,0.1);
    margin: 8px 0 3px 0; font-family: monospace; font-size: 0.82rem; line-height: 1.5;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5); overflow-x: auto;
}
.type-line { overflow: hidden; white-space: nowrap; width: 0; }
.reveal.active .type-line { animation: typing-line 1s steps(40, end) forwards; }
.reveal.active .delay-1 { animation-delay: 0.5s; }
.reveal.active .delay-2 { animation-delay: 1.5s; }
.reveal.active .delay-3 { animation-delay: 2.5s; }
.reveal.active .delay-4 { animation-delay: 3.5s; }
.reveal.active .delay-5 { animation-delay: 4.5s; }
.reveal.active .delay-6 { animation-delay: 5.5s; }

@keyframes typing-line { from { width: 0; } to { width: 100%; } }

.cursor { animation: blink 1s step-end infinite; color: var(--accent-1); font-weight: bold; padding-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

.easter-egg {
    font-family: monospace; font-size: 0.75rem; color: rgba(255,255,255,0.3);
    margin-bottom: 8px; margin-left: 10px; font-style: italic;
}

.contact-code-snippet pre { margin: 0; }
.contact-code-snippet .comment { color: #6c757d; font-style: italic; }
.contact-code-snippet .keyword { color: #c678dd; }
.contact-code-snippet .variable { color: #e5c07b; }
.contact-code-snippet .class { color: #61afef; }
.contact-code-snippet .property { color: #e06c75; }
.contact-code-snippet .string { color: #98c379; }

/* Contact Actions */
.contact-actions { display: flex; flex-direction: column; gap: 8px; }
.action-btn {
    display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--bg-surface);
    padding: 11px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); transition: var(--transition-fast);
    font-weight: 500; color: var(--text-main); font-size: 0.95rem; position: relative; overflow: hidden;
    text-decoration: none;
}
.action-btn i { font-size: 1.1rem; color: var(--accent-2); }
.action-btn:hover { background: rgba(255, 255, 255, 0.05); transform: translateY(-2px); border-color: var(--accent-2); box-shadow: 0 4px 15px rgba(37, 117, 252, 0.3); }

/* Ping Animation for Email Button */
.email-btn { background: linear-gradient(135deg, rgba(106, 17, 203, 0.1) 0%, rgba(37, 117, 252, 0.1) 100%); }
.email-btn:hover { background: #0f111a; border-color: #98c379; color: #98c379; font-family: monospace; justify-content: flex-start; padding-left: 25px;}
.email-btn .btn-hover { display: none; }
.email-btn:hover .btn-default { display: none; }
.email-btn:hover .btn-hover { display: block; animation: typing 1s steps(20, end); }

@keyframes typing { from { width: 0; white-space: nowrap; overflow: hidden; } to { width: 100%; } }

footer {
    border-top: 1px solid var(--border-glass);
    padding: 40px 5% 30px;
    text-align: center;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}


/* --- Binary Signature Section --- */
.binary-signature-section {
    position: relative;
    margin-bottom: 24px;
}
.binary-canvas {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 100%;
    opacity: 0.12;
    pointer-events: none;
}
.footer-quote-wrapper {
    position: relative;
    z-index: 2;
}
.signature {
    font-size: clamp(1rem, 3vw, 1.15rem);
    font-style: italic;
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-bottom: 14px;
    line-height: 1.7;
}
/* Highlighted technical words */
.mono-tech {
    font-family: 'Courier New', monospace;
    font-style: normal;
    font-weight: 700;
    color: var(--accent-2);
    font-size: 0.95em;
    letter-spacing: 0.5px;
}
/* Pulsing quotes */
.pulse-quotes {
    display: inline-block;
    animation: quote-breathe 3s ease-in-out infinite;
}
@keyframes quote-breathe {
    0%, 100% { opacity: 1; text-shadow: 0 0 6px var(--accent-2); }
    50%       { opacity: 0.5; text-shadow: none; }
}
/* Binary Name */
.binary-name {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-main);
    cursor: pointer;
    display: inline-block;
    transition: color 0.15s ease;
    margin: 0;
    user-select: none;
}
.binary-name:hover { color: var(--accent-2); }
.binary-name .scramble-char {
    display: inline-block;
    color: var(--accent-1);
    font-family: monospace;
    font-size: 0.9em;
}

/* --- Footer Terminal --- */
.footer-terminal {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(15, 17, 26, 0.85);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.88rem;
    color: #98c379;
    margin-bottom: 20px;
    cursor: text;
    min-width: min(360px, 100%);
    max-width: min(500px, 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    outline: none;
    transition: border-color 0.2s ease;
}
.footer-terminal:focus,
.footer-terminal:hover {
    border-color: var(--accent-2);
    box-shadow: 0 4px 25px rgba(37, 117, 252, 0.25);
}
.terminal-line { display: flex; align-items: center; gap: 0; }
.terminal-ps1 { color: var(--accent-2); font-weight: bold; }
.terminal-typed { color: #e5c07b; }
.terminal-cursor {
    color: var(--accent-2);
    animation: terminal-blink 0.8s step-end infinite;
    font-size: 0.9em;
    margin-left: 1px;
    display: inline-block;
}
@keyframes terminal-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}
.terminal-response {
    margin-top: 6px;
    color: #98c379;
    font-size: 0.85rem;
    display: none;
    text-align: left;
    white-space: pre;
    line-height: 1.6;
    max-width: 100%;
    overflow-x: auto;
}

/* --- Copyright --- */
.copyright {
    color: rgba(255,255,255,0.55);
    font-size: 0.82rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.3px;
}
.copyright .mono-tech { color: rgba(255,255,255,0.5); }

/* ==========================================================================
   Hobbies Filtering Elements
   ========================================================================== */
.hobbies-sidebar {
    position: sticky;
    top: 120px; /* Sticks precisely below the navbar when scrolling the gallery */
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 200px;
}
.hobby-filter-btn {
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #999;
    transition: var(--transition-fast);
    position: relative;
    padding: 5px 0;
}
.hobby-filter-btn:hover, .hobby-filter-btn.active {
    color: #111;
}
.hobby-filter-btn.active::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-1);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-1);
}

/* ==========================================================================
   Animation Utilities
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Media Queries
   ========================================================================== */
/* --- Structural breakpoint: stack hero & hobbies layout --- */
@media (max-width: 992px) {
    .hobbies-main-layout { flex-direction: column; }
    .hobbies-sidebar {
        position: relative;
        top: 0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        margin-bottom: 30px;
    }
    .hobby-filter-btn.active::before { display: none; }
    .hero { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: clamp(32px, 6vw, 50px); padding-top: 120px; }
    .hero-content { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .glass-card { display: none; }
    .hero-visual { margin: 0 auto; }
    .masonry-gallery { grid-auto-rows: 150px; }
    .glass-panel.wide { grid-column: span 1; }
    .glass-panel.tall { grid-row: span 1; }
}

/* --- Structural breakpoint: burger nav & stacked timeline cards --- */
@media (max-width: 768px) {
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--bg-glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); flex-direction: column;
        padding: 20px 0; border-bottom: 1px solid var(--border-glass);
    }
    .nav-links.show { display: flex; }
    .nav-item { padding: 10px 0; }
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    .timeline-container::before { left: 20px; }
    .timeline-step { padding-left: 50px; }
    .step-number { left: 0; width: 35px; height: 35px; font-size: 1rem; top: 32px; }

    .timeline-card { flex-direction: column; text-align: center; gap: 10px; }
    .timeline-card-logo { width: 70px; height: 50px; margin: 0 auto; }
    .timeline-stack { padding-left: 15px; }

    .pillar-grid, .projects-grid { padding: 20px 5%; }

    .binary-canvas { width: 100%; }
    .footer-terminal { font-size: 0.75rem; padding: 10px; }

    .section-header h2 { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .contact-card { padding: 15px; }
    .action-btn { font-size: 0.85rem; padding: 10px; }
}

/* ==========================================================================
   Performance: lighten heavy blurred blobs on small screens (GPU-friendly)
   ========================================================================== */
@media (max-width: 768px) {
    .blob-bg { filter: blur(60px); opacity: 0.3; }
}

/* ==========================================================================
   Accessibility: respect the user's reduced-motion preference.
   Neutralises the perpetual background animations (visually identical for
   everyone who has NOT opted in) while keeping the layout intact.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Access request dialog (private repositories)
   ========================================================================== */
.btn-request { background: rgba(255, 255, 255, 0.08); color: var(--text-main); }
.btn-request i { margin-right: 6px; color: var(--accent-3); }
.access-dialog {
    width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
    padding: 0; border: 1px solid var(--border-glass); border-radius: 20px;
    background: #12131c; color: var(--text-main);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.access-dialog::backdrop { background: rgba(5, 5, 10, 0.7); backdrop-filter: blur(4px); }
.access-form { position: relative; padding: clamp(1.25rem, 4vw, 2rem); display: flex; flex-direction: column; gap: 6px; }
.access-form h3 { font-size: 1.3rem; margin: 0 0 4px; }
.access-form h3 i { color: var(--accent-3); margin-right: 8px; }
.access-intro { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 10px; }
.access-form label { font-size: 0.85rem; font-weight: 500; margin-top: 6px; }
.access-form .optional { color: var(--text-muted); font-weight: 400; }
.access-form input, .access-form textarea {
    width: 100%; padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.05); color: var(--text-main); border: 1px solid var(--border-glass);
}
.access-form textarea { resize: vertical; }
.access-form input:focus, .access-form textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-glow); }
.access-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.access-status { min-height: 1.2em; font-size: 0.88rem; margin: 6px 0 0; color: var(--text-muted); }
.access-status.is-success { color: #4ade80; }
.access-status.is-error { color: #f87171; }
.access-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 8px; }
.access-actions .btn { border: none; cursor: pointer; }
.access-actions .btn:disabled { opacity: 0.6; cursor: default; }
.access-have { font-size: 0.85rem; color: var(--accent-3); text-decoration: none; }
.access-have:hover { text-decoration: underline; }
.access-have i { font-size: 0.75rem; margin-left: 4px; }
.access-privacy { font-size: 0.75rem; color: var(--text-muted); margin-top: 10px; }
.access-close {
    position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
    border: none; background: rgba(255, 255, 255, 0.06); color: var(--text-main); font-size: 1.3rem; cursor: pointer;
}
.access-close:hover { background: rgba(255, 255, 255, 0.12); }

/* Phones and tablets held upright show the desktop layout scaled down: their
   layout viewport is very tall, so a full-height hero would leave huge gaps. */
@media (orientation: portrait) and (min-width: 1000px) {
    .hero { min-height: auto; padding-top: 150px; padding-bottom: 80px; }
}

/* Dates on the hero timeline cards (most recent first) */
.timeline-card-date {
    display: inline-block; margin-bottom: 4px;
    font-size: 0.72rem; font-family: monospace; letter-spacing: 0.04em;
    color: var(--text-muted); text-transform: uppercase;
}
