/* ============================================
   ALESSANDRO LINGUA - PORTFOLIO CSS
   Modern Dark Theme with Cyan/Blue Accents
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --text-primary: #e8e8ed;
    --text-secondary: #8888a0;
    --text-muted: #55556a;
    --accent-primary: #00d4ff;
    --accent-secondary: #7b61ff;
    --accent-gradient: linear-gradient(135deg, #00d4ff, #7b61ff);
    --accent-gradient-hover: linear-gradient(135deg, #7b61ff, #00d4ff);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(0, 212, 255, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ---- NAVBAR ---- */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar-custom.scrolled {
    padding: 0.6rem 0;
    background: rgba(10, 10, 15, 0.95);
}

.navbar-custom .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.nav-logo:hover {
    color: var(--accent-primary);
}

.nav-logo .logo-bracket {
    color: var(--accent-primary);
    font-size: 1.4rem;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
    padding: 0.3rem 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
}

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

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

.nav-cta {
    background: var(--accent-gradient) !important;
    color: var(--bg-primary) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: var(--transition) !important;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* ---- NAVBAR PLAYER ---- */
.navbar-player {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-left: 1rem;
    flex-shrink: 0;
}

.np-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 4px;
    line-height: 1;
}

.np-btn:hover {
    color: var(--accent-primary);
}

.np-btn.playing {
    color: var(--accent-primary);
}

#npPlay .np-icon-pause { display: none; }
#npPlay.playing .np-icon-play { display: none; }
#npPlay.playing .np-icon-pause { display: block; }

.np-info {
    display: flex;
    flex-direction: column;
    margin-left: 0.35rem;
    min-width: 70px;
    max-width: 110px;
    overflow: hidden;
}

.np-title {
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.np-artist {
    color: var(--text-muted);
    font-size: 0.62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Mobile menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .navbar-player {
        display: none;
    }
    .nav-toggle {
        display: flex;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        border-left: 1px solid var(--border-color);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .nav-links.open {
        right: 0;
    }
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 998;
    }
    .nav-overlay.open {
        opacity: 1;
        visibility: visible;
    }
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 97, 255, 0.06) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

/* Grid pattern overlay */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero h1 .gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: var(--accent-gradient);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
    color: var(--bg-primary);
}

.btn-secondary-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

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

.hero-tech {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 4rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.hero-tech span {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.hero-tech span:hover {
    color: var(--accent-primary);
    border-color: var(--border-glow);
    background: rgba(0, 212, 255, 0.05);
}

.scroll-indicator {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

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

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

.scroll-indicator .scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--accent-gradient);
    animation: scrollDown 2s ease-in-out infinite;
}

/* ---- SECTION BASE ---- */
.section {
    padding: 6rem 2rem;
    position: relative;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- ABOUT SECTION ---- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.about-text h3 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

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

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.stat-item:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.3rem;
}

.about-visual {
    display: flex;
    justify-content: center;
}

.code-window {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-card);
}

.code-window-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #28c840; }

.code-window-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.code-window-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.9;
}

.code-window-body .code-keyword { color: #c792ea; }
.code-window-body .code-function { color: #82aaff; }
.code-window-body .code-string { color: #c3e88d; }
.code-window-body .code-comment { color: var(--text-muted); font-style: italic; }
.code-window-body .code-variable { color: #f78c6c; }
.code-window-body .code-bracket { color: var(--text-secondary); }
.code-window-body .code-property { color: #89ddff; }

/* ---- SKILLS SECTION ---- */
.skills-section {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

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

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.skill-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

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

.skill-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.08);
    border-radius: var(--radius-md);
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
}

.skill-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

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

.skill-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: var(--transition);
}

.skill-tag:hover {
    color: var(--accent-primary);
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.05);
}

/* ---- PROJECTS SECTION ---- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 400px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}

.project-image {
    position: relative;
    padding: 1.5rem 1.5rem 0;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 1.5rem 1.5rem 0;
    background: rgba(10, 10, 15, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

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

.project-overlay a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: var(--accent-gradient);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.project-overlay a:hover {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

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

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

.project-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-primary);
    padding: 0.2rem 0.6rem;
    background: rgba(0, 212, 255, 0.08);
    border-radius: 50px;
}

/* ---- CONTACT SECTION / PAGE ---- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-info h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--accent-primary);
    border-color: var(--border-glow);
    transform: translateX(4px);
}

.contact-link-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.08);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.btn-submit {
    width: 100%;
    padding: 0.9rem 2rem;
    background: var(--accent-gradient);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

/* ---- FOOTER ---- */
.footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

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

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

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

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

@keyframes scrollDown {
    0% { top: -100%; }
    100% { top: 200%; }
}

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

@keyframes blink {
    0%, 50% { border-color: var(--accent-primary); }
    51%, 100% { border-color: transparent; }
}

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- PROJECT PAGES MAIN WRAPPER ---- */
.project-main {
    padding-top: 6rem;
    padding-bottom: 4rem;
}

/* ---- PAGE HEADER (for sub-pages) ---- */
.page-header {
    padding: 8rem 2rem 3rem;
    text-align: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ---- UTILITY ---- */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ---- LANGUAGE SWITCHER ---- */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .lang-switcher {
        margin: 0;
        align-self: center;
    }
}

/* ============================================
   MOBILE RESPONSIVE — ADDITIONAL FIXES
   ============================================ */

@media (max-width: 768px) {
    /* Navbar container padding */
    .navbar-custom .nav-container {
        padding: 0 1.2rem;
    }

    /* Section vertical spacing */
    .section {
        padding: 4rem 1.5rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    /* Hero */
    .hero {
        padding: 6rem 1.5rem 3rem;
    }

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

    .hero-tech {
        gap: 0.6rem;
        margin-top: 2.5rem;
    }

    /* About stats gap */
    .about-stats {
        gap: 1rem;
    }

    /* Contact form padding */
    .contact-form-card {
        padding: 1.5rem;
    }

    /* Page header */
    .page-header {
        padding: 6rem 1.5rem 2rem;
    }

    /* Footer center when stacked */
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Project overlay always visible on touch devices */
    .project-overlay {
        opacity: 1;
        background: rgba(10, 10, 15, 0.55);
    }

    /* Disable transform hover effects on touch */
    .project-card:hover {
        transform: none;
    }

    .skill-card:hover {
        transform: none;
    }

    .stat-item:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    /* Sections */
    .section {
        padding: 3rem 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    /* Hero */
    .hero {
        padding: 5.5rem 1rem 2.5rem;
    }

    .hero-badge {
        font-size: 0.72rem;
        padding: 0.35rem 0.8rem;
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btn-primary-custom,
    .btn-secondary-custom {
        justify-content: center;
        padding: 0.85rem 1.5rem;
    }

    .hero-tech {
        gap: 0.4rem;
        margin-top: 2rem;
    }

    .hero-tech span {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    /* About stats: 2+1 layout on small screens */
    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .about-stats .stat-item:last-child {
        grid-column: 1 / -1;
    }

    /* Projects grid: force single column */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Contact form */
    .contact-form-card {
        padding: 1.2rem;
    }

    /* Page header */
    .page-header {
        padding: 5.5rem 1rem 1.5rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem;
    }

    .footer-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}
