/* ===================================
   THOMAS AURANGE - AAA PORTFOLIO
   Premium Android Developer Site
   =================================== */

/* --- CSS Variables --- */
:root {
    /* Colors */
    --bg-primary: #030712;
    --bg-secondary: #0a0f1e;
    --bg-tertiary: #111827;
    --bg-card: rgba(17, 24, 39, 0.6);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #06b6d4;
    --accent-success: #10b981;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 50%, rgba(6, 182, 212, 0.3) 100%);

    --border-subtle: rgba(148, 163, 184, 0.1);
    --border-light: rgba(148, 163, 184, 0.2);

    /* Spacing */
    --container-max: 1400px;
    --section-padding: clamp(40px, 6vw, 80px);

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --duration-fast: 200ms;
    --duration-normal: 400ms;
    --duration-slow: 800ms;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::selection {
    background: rgba(99, 102, 241, 0.4);
    color: var(--text-primary);
}

/* --- Cursor Glow Effect --- */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* --- Noise Overlay --- */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* --- Grid Background --- */
.grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* --- Floating Orbs --- */
.orbs-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-secondary);
    top: 50%;
    right: -150px;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-tertiary);
    bottom: -100px;
    left: 30%;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Links --- */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--duration-fast) ease;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.site-header.scrolled {
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    z-index: 101;
}
.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.logo:hover .logo-img {
    transform: scale(1.1);
}

.logo-icon {
    width: 36px;
    height: 36px;
    color: var(--accent-primary);
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.logo:hover .logo-icon {
    transform: rotate(10deg) scale(1.1);
}

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

.logo-dot {
    color: var(--accent-tertiary);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.nav-link {
    position: relative;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) ease;
    overflow: hidden;
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(100%);
    transition: all var(--duration-fast) var(--ease-out-expo);
}

.nav-link:hover {
    color: transparent;
    background: rgba(99, 102, 241, 0.1);
}

.nav-link:hover::before {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--duration-fast) var(--ease-out-expo);
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(3, 7, 18, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.mobile-nav-link {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--duration-fast) ease;
    transform: translateY(20px);
    opacity: 0;
}

.mobile-menu.active .mobile-nav-link {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-link:nth-child(1) { transition-delay: 100ms; }
.mobile-nav-link:nth-child(2) { transition-delay: 150ms; }
.mobile-nav-link:nth-child(3) { transition-delay: 200ms; }
.mobile-nav-link:nth-child(4) { transition-delay: 250ms; }

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

/* --- Language Switcher --- */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 16px;
}

.lang-switcher.mobile {
    margin-top: 32px;
    justify-content: center;
}

.lang-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) ease;
}

.lang-btn:hover {
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.1);
}

.lang-btn.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.15);
}

.lang-divider {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- Buttons --- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--duration-fast) var(--ease-out-expo);
}

.btn-icon {
    width: 18px;
    height: 18px;
    transition: transform var(--duration-fast) var(--ease-out-expo);
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--duration-fast) ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px rgba(99, 102, 241, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

.btn-full {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(6, 182, 212, 0.15) 0%, transparent 40%);
}

.hero-mesh {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-success);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Hero Title */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Tagline */
.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
}

.highlight {
    color: var(--text-primary);
    font-weight: 500;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 48px;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    padding: 24px 0;
    border-top: 1px solid var(--border-subtle);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 120px;
}

.stat-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    line-height: 1;
}

.stat-suffix {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-tertiary);
}

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

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border-light);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: opacity var(--duration-fast) ease;
    animation: fadeInUp 1s ease 1.5s both;
    z-index: 10;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-text {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--border-light);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    position: absolute;
    width: 3px;
    height: 10px;
    background: var(--accent-primary);
    left: -1px;
    border-radius: 2px;
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: 0; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 48px;
    height: 48px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    animation: float 6s ease-in-out infinite;
    animation-delay: var(--delay);
    opacity: 0.6;
}

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

/* --- Sections --- */
.section {
    position: relative;
    padding: var(--section-padding) 0;
}

.section-alt {
    background:
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
}

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

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* --- About Section --- */
.about-grid {
    display: block;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

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

.about-stack {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.about-cta {
    margin-top: 24px;
}

/* Code Window */
.code-window {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-subtle);
}

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

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-filename {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-content {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-keyword { color: #c792ea; }
.code-class { color: #ffcb6b; }
.code-type { color: #82aaff; }
.code-string { color: #c3e88d; }

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.skill-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity var(--duration-normal) ease;
}

.skill-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--duration-normal) ease;
    pointer-events: none;
}

.skill-card:hover .skill-glow {
    opacity: 1;
}

/* Featured skill card */
.skill-card.featured {
    position: relative;
    border-color: rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(17, 24, 39, 0.8) 100%);
}

.skill-card.featured::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0.3;
}

.skill-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    z-index: 2;
}

.skill-icon {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    margin-bottom: 20px;
    z-index: 1;
}

.skill-icon svg {
    width: 28px;
    height: 28px;
}

.skill-title {
    position: relative;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    z-index: 1;
}

.skill-list {
    list-style: none;
    position: relative;
    z-index: 1;
}

.skill-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 0;
}

.skill-bullet {
    width: 6px;
    height: 6px;
    background: var(--gradient-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Tech Marquee */
.tech-marquee {
    overflow: hidden;
    padding: 20px 0;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.marquee-content {
    display: flex;
    gap: 24px;
    padding: 0 12px;
}

.tech-item {
    padding: 10px 24px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    will-change: auto;
    transform: translateZ(0);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    grid-auto-rows: 1fr;
}

.projects-grid > .project-card {
    height: 100%;
}

.project-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.project-card.featured {
    border-color: rgba(99, 102, 241, 0.3);
}

.project-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 10;
}

.project-image {
    position: relative;
    height: 280px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 24px;
}

/* Phone Frame pour screenshots */
.project-phone-frame {
    position: relative;
    width: 140px;
    height: 280px;
    background: #1a1a2e;
    border-radius: 28px;
    padding: 8px;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.project-card:hover .project-phone-frame {
    transform: scale(1.05) translateY(-5px);
}

.project-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

/* Fallback si pas d'image */
.project-phone-frame:not(:has(img[src])) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-phone-frame img[src=""],
.project-phone-frame img:not([src]) {
    display: none;
}

.project-placeholder {
    width: 80px;
    height: 80px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    color: var(--accent-primary);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.project-card:hover .project-placeholder {
    transform: scale(1.1);
    background: rgba(99, 102, 241, 0.2);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 18, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--duration-fast) ease;
}

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

.project-view {
    padding: 12px 24px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    transform: translateY(10px);
    transition: transform var(--duration-fast) var(--ease-out-expo);
}

.project-card:hover .project-view {
    transform: translateY(0);
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 280px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.project-tag {
    padding: 4px 10px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-tertiary);
}

/* Badge Phonix Health - Bleu #0091FF */
.project-tag.tag-phonix {
    background: rgba(0, 145, 255, 0.15);
    border-color: rgba(0, 145, 255, 0.3);
    color: #0091FF;
}

/* Badge Prochainement - Orange/Ambre */
.project-tag.tag-soon {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

/* Link Phonix style */
.project-link.link-phonix {
    color: #0091FF;
}

.project-link.link-phonix:hover {
    color: #0091FF;
    background: rgba(0, 145, 255, 0.1);
}

/* Link Prochainement style */
.project-link.link-soon {
    color: var(--text-muted);
    cursor: default;
    opacity: 0.7;
}

.project-link.link-soon:hover {
    transform: none;
    color: var(--text-muted);
}

.project-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Logo iOS style */
.project-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tech span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 4px 0;
}

.project-tech span:not(:last-child)::after {
    content: '•';
    margin-left: 8px;
    color: var(--border-light);
}

/* Lien App Store / Play Store */
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    text-decoration: none;
    transition: all var(--duration-fast) ease;
    align-self: flex-start;
}

.project-link:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.project-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* --- Contact Section --- */
.contact-clean {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-clean .section-header {
    margin-bottom: 16px;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-icon-left {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 48px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--duration-fast) ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.footer-bottom small {
    color: var(--text-muted);
}

.footer-credit {
    color: var(--accent-primary) !important;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--ease-out-expo);
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="fade-right"] {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s var(--ease-out-expo);
}

[data-aos="fade-right"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

[data-aos="fade-left"] {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s var(--ease-out-expo);
}

[data-aos="fade-left"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .stat-divider {
        display: none;
    }

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

    .floating-icons {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* --- Project Detail Modal --- */
.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.project-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: calc(100% - 48px);
    max-width: 900px;
    max-height: calc(100vh - 80px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    z-index: 201;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out-expo);
    overflow: hidden;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.project-panel.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    transition: all var(--duration-fast) ease;
}

.panel-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.panel-close svg {
    width: 20px;
    height: 20px;
}

.panel-content {
    height: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 40px;
}

.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-right: 50px;
}

.panel-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.panel-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.panel-tags span,
.side-panel .panel-tags span {
    display: inline-block;
    padding: 4px 10px !important;
    background: rgba(6, 182, 212, 0.1) !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.75rem !important;
    font-weight: 500;
    color: var(--accent-tertiary) !important;
    line-height: 1.4;
    width: auto !important;
    height: auto !important;
}

.panel-screenshots {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 24px;
    margin-bottom: 32px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
}

/* Dynamic grid based on number of screenshots */
.panel-screenshots[data-count="1"] {
    justify-content: center;
}

.panel-screenshots[data-count="2"] {
    justify-content: center;
}

.panel-screenshots[data-count="3"] {
    justify-content: center;
}

.panel-screenshots[data-count="4"] {
    justify-content: center;
}

.panel-screenshots[data-count="5"],
.panel-screenshots[data-count="6"] {
    justify-content: center;
}

.panel-screenshot-item {
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid var(--border-subtle);
    transition: all var(--duration-fast) ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Phone frame styling */
.panel-screenshot-item::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    z-index: 2;
}

/* Dynamic sizing based on count */
.panel-screenshots[data-count="1"] .panel-screenshot-item {
    width: 200px;
    height: 400px;
}

.panel-screenshots[data-count="2"] .panel-screenshot-item {
    width: 180px;
    height: 360px;
}

.panel-screenshots[data-count="3"] .panel-screenshot-item {
    width: 160px;
    height: 320px;
}

.panel-screenshots[data-count="4"] .panel-screenshot-item {
    width: 150px;
    height: 300px;
}

.panel-screenshots[data-count="5"] .panel-screenshot-item,
.panel-screenshots[data-count="6"] .panel-screenshot-item {
    width: 130px;
    height: 260px;
}

/* For more than 6 screenshots */
.panel-screenshot-item {
    width: 130px;
    height: 260px;
}

.panel-screenshot-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}

.panel-screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Zoom indicator overlay */
.panel-screenshot-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--duration-fast) ease;
    border-radius: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-screenshot-item:hover::after {
    opacity: 1;
}

/* Zoom icon */
.panel-screenshot-item .zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--duration-fast) ease;
    z-index: 3;
    pointer-events: none;
}

.panel-screenshot-item .zoom-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.panel-screenshot-item:hover .zoom-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.panel-description,
.panel-features,
.panel-tech {
    margin-bottom: 28px;
}

.panel-description h4,
.panel-features h4,
.panel-tech h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.panel-description p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.panel-features ul {
    list-style: none;
}

.panel-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.panel-features li:last-child {
    border-bottom: none;
}

.panel-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gradient-primary);
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

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

.panel-tech-list span {
    padding: 8px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-primary);
}

.panel-links {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.panel-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    transition: all var(--duration-fast) ease;
}

.panel-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.panel-links a svg {
    width: 18px;
    height: 18px;
}

/* Make project cards clickable */
.project-card {
    cursor: pointer;
}

/* Body scroll lock when panel is open */
body.panel-open {
    overflow: hidden;
}

/* --- Image Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all var(--duration-fast) ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all var(--duration-fast) ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav svg {
    width: 28px;
    height: 28px;
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.lightbox.active .lightbox-content img {
    transform: scale(1);
}

/* Lightbox image transitions */
.lightbox-content img.transitioning {
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

.lightbox-content img.transition-next {
    transform: translateX(-30px) scale(0.95);
    opacity: 0;
}

.lightbox-content img.transition-prev {
    transform: translateX(30px) scale(0.95);
    opacity: 0;
}

.lightbox-content img.transition-next-in {
    transform: translateX(0) scale(1);
    opacity: 1;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.lightbox-content img.transition-prev-in {
    transform: translateX(0) scale(1);
    opacity: 1;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
}

/* Make screenshot items clickable */
.panel-screenshot-item {
    cursor: pointer;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .lightbox-nav svg {
        width: 22px;
        height: 22px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

    .contact-form-wrapper {
        padding: 24px;
    }

    .project-panel {
        width: calc(100% - 24px);
        max-width: 100%;
        max-height: calc(100vh - 40px);
        border-radius: var(--radius-lg);
    }

    .panel-content {
        padding: 24px 16px;
    }

    .panel-screenshots {
        padding: 16px;
        gap: 12px;
    }

    .panel-screenshots[data-count="1"] .panel-screenshot-item,
    .panel-screenshots[data-count="2"] .panel-screenshot-item,
    .panel-screenshots[data-count="3"] .panel-screenshot-item,
    .panel-screenshots[data-count="4"] .panel-screenshot-item,
    .panel-screenshots[data-count="5"] .panel-screenshot-item,
    .panel-screenshots[data-count="6"] .panel-screenshot-item,
    .panel-screenshot-item {
        width: 100px;
        height: 200px;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}