/* ═══════════════════════════════════════════════════════════════
   SALIM OMRANI - PORTFOLIO
   Design: Soft & Luminous
   Typography: DM Sans (Display) + Fira Code (Code)
   ═══════════════════════════════════════════════════════════════ */

/* ═══ Fonts loaded via HTML for performance ═══ */

/* ═══ CSS Variables ═══ */
:root {
    /* Colors - Light Theme Default (Soft & Warm) */
    --bg-primary: #fdfbf7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f2ed;
    --bg-card: #ffffff;

    --text-primary: #2d2a26;
    --text-secondary: #5c574f;
    --text-muted: #706b63;

    --accent: #e07a5f;
    --accent-soft: #f4a582;
    --accent-dim: rgba(224, 122, 95, 0.12);
    --accent-glow: rgba(224, 122, 95, 0.25);

    --border: rgba(45, 42, 38, 0.08);
    --border-hover: rgba(45, 42, 38, 0.15);

    /* Typography */
    --font-display: 'DM Sans', sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Spacing */
    --section-gap: 120px;
    --container-max: 1100px;

    /* Effects */
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow-soft: 0 4px 20px rgba(45, 42, 38, 0.06);
    --shadow-medium: 0 8px 40px rgba(45, 42, 38, 0.08);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a1917;
    --bg-secondary: #242320;
    --bg-tertiary: #2d2b28;
    --bg-card: #242320;

    --text-primary: #f5f2ed;
    --text-secondary: #b8b3aa;
    --text-muted: #9a958c;

    --accent: #f4a582;
    --accent-soft: #e07a5f;
    --accent-dim: rgba(244, 165, 130, 0.15);
    --accent-glow: rgba(244, 165, 130, 0.3);

    --border: rgba(245, 242, 237, 0.08);
    --border-hover: rgba(245, 242, 237, 0.15);

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.3);
}

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

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

body {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: white;
}

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

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

/* ═══ Grain (subtle) ═══ */
.grain {
    display: none;
}

/* ═══ Navigation ═══ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(26, 25, 23, 0.9);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    text-decoration: none;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
}

.nav-menu {
    display: flex;
    gap: 4px;
    list-style: none;
}

.nav-menu a {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-primary);
    background: var(--accent-dim);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--accent-dim);
    color: var(--accent);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .sun-icon { display: block; }
.theme-toggle .moon-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle .moon-icon { display: block; }

.lang-toggle {
    height: 42px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: var(--transition);
}

.lang-toggle:hover {
    background: var(--accent-dim);
    color: var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

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

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

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

.hero-grid {
    display: none;
}

.hero-gradient {
    position: absolute;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    filter: blur(80px);
    opacity: 0.6;
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
}

.hero-content {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 12px;
    background: var(--accent-dim);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 28px;
}

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

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

.hero-title {
    font-size: clamp(2.8rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.title-line {
    display: block;
}

.title-outline {
    color: var(--accent);
}

.hero-role {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.role-label {
    font-weight: 600;
    color: var(--text-primary);
}

.role-divider {
    color: var(--text-muted);
}

.role-tech {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 440px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-tagline em {
    color: var(--text-primary);
    font-style: normal;
    font-weight: 600;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 36px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-plus {
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover svg {
    transform: translateX(3px);
}

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

.btn-ghost:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.code-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.window-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.window-dots span:nth-child(1) { background: #ff6b6b; }
.window-dots span:nth-child(2) { background: #ffd93d; }
.window-dots span:nth-child(3) { background: #6bcb77; }

.window-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-content {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.9;
}

.code-content code {
    color: var(--text-secondary);
}

.code-keyword { color: #d4879c; }
.code-type { color: #7eb8da; }
.code-prop { color: var(--text-primary); }
.code-string { color: #98c379; }
.code-number { color: var(--accent); }
.code-boolean { color: #7eb8da; }

/* Floating Badges */
.floating-badge {
    position: absolute;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    animation: float 5s ease-in-out infinite;
    box-shadow: var(--shadow-soft);
}

.badge-java {
    top: -10px;
    right: 30px;
    animation-delay: 0s;
}

.badge-angular {
    bottom: 70px;
    right: -20px;
    animation-delay: 1.5s;
}

.badge-cloud {
    bottom: 10px;
    left: -10px;
    animation-delay: 3s;
}

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

/* Scroll Cue */
.scroll-cue {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

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

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollLine 2.5s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    50.1% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

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

.section-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 50px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
}

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

/* ═══ About Section ═══ */
.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 60px;
    align-items: start;
}

.intro-large {
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.intro-large strong {
    color: var(--accent);
    font-weight: 600;
}

.intro-body {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.detail-card:hover {
    border-color: var(--accent);
    transform: translateX(6px);
}

.detail-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border-radius: 10px;
    color: var(--accent);
    flex-shrink: 0;
}

.detail-icon svg {
    width: 20px;
    height: 20px;
}

.detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: block;
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ═══ Skills Section ═══ */
.section-skills {
    background: var(--bg-tertiary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.skill-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.skill-icon {
    font-size: 1.3rem;
}

.skill-card h3 {
    font-size: 1rem;
    font-weight: 700;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 7px 13px;
    background: var(--bg-tertiary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tag-primary {
    background: var(--accent-dim);
    color: var(--accent);
}

.skill-card:hover .tag-primary {
    background: var(--accent);
    color: white;
}

/* ═══ Experience Section ═══ */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.exp-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 32px;
    padding: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.exp-card:hover {
    border-color: var(--accent);
    transform: translateX(6px);
    box-shadow: var(--shadow-medium);
}

.exp-period {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.exp-year {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.02em;
}

.exp-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Sector specific colors & animations */
[data-sector="construction"] { --sector-color: #e07a5f; --sector-glow: rgba(224, 122, 95, 0.4); }
[data-sector="energy"] { --sector-color: #f9a825; --sector-glow: rgba(249, 168, 37, 0.4); }
[data-sector="finance"] { --sector-color: #1565c0; --sector-glow: rgba(21, 101, 192, 0.4); }
[data-sector="automotive"] { --sector-color: #7cb342; --sector-glow: rgba(124, 179, 66, 0.4); }

/* Animated border gradient */
.exp-card {
    position: relative;
    overflow: hidden;
}

.exp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--sector-color), transparent);
    transition: left 0.6s ease;
}

.exp-card:hover::before {
    left: 100%;
}

/* Year color changes to sector color on hover */
.exp-card:hover .exp-year {
    color: var(--sector-color);
}

/* Glow effect on hover */
.exp-card:hover {
    box-shadow:
        var(--shadow-medium),
        0 0 30px var(--sector-glow);
    border-color: var(--sector-color);
}

/* Company name underline animation */
.exp-company {
    position: relative;
    display: inline-block;
}

.exp-company::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sector-color);
    transition: width 0.4s ease;
}

.exp-card:hover .exp-company::after {
    width: 100%;
}

/* Staggered card animations on scroll */
.exp-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.exp-card:nth-child(1) { transition-delay: 0.1s; }
.exp-card:nth-child(2) { transition-delay: 0.2s; }
.exp-card:nth-child(3) { transition-delay: 0.3s; }
.exp-card:nth-child(4) { transition-delay: 0.4s; }

.exp-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 3D tilt effect on hover */
.exp-card.visible {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.exp-card.visible:hover {
    transform: translateX(6px) rotateY(-2deg) rotateX(1deg);
}

/* Tech stack tags animate on hover */
.exp-stack span {
    transition: all 0.3s ease;
}

.exp-card:hover .exp-stack span {
    background: var(--sector-color);
    color: white;
    transform: translateY(-2px);
}

.exp-card:hover .exp-stack span:nth-child(odd) {
    transition-delay: 0.05s;
}

.exp-card:hover .exp-stack span:nth-child(even) {
    transition-delay: 0.1s;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 10px;
}

.exp-company {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.exp-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.exp-role {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.exp-project {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 14px;
}

.exp-achievements {
    list-style: none;
    margin-bottom: 16px;
}

.exp-achievements li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.exp-achievements li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.exp-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.exp-stack span {
    padding: 5px 11px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ═══ Projects Section ═══ */
.section-projects {
    background: var(--bg-tertiary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.project-card.project-featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
}

.project-image {
    padding: 36px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-visual {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
}

.visual-icon {
    font-size: 2.5rem;
}

.project-featured .project-visual {
    width: 130px;
    height: 130px;
}

.project-featured .visual-icon {
    font-size: 3.5rem;
}

.project-info {
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.project-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.project-features {
    list-style: none;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-features li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.project-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.project-stack span {
    padding: 5px 10px;
    background: var(--accent-dim);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
}

.project-links {
    display: flex;
    gap: 10px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.project-link:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.project-link svg {
    width: 14px;
    height: 14px;
    transition: var(--transition);
}

.project-link:hover svg {
    transform: translate(2px, -2px);
}

/* ═══ Contact Section ═══ */
.contact-content {
    max-width: 500px;
}

.contact-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--accent);
}

.contact-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ═══ Scroll Reveal Animations ═══ */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Scale fade animation */
.scale-fade {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-fade.visible {
    opacity: 1;
    transform: scale(1);
}

/* Slide in from left */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide in from right */
.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ═══ Enhanced Hover Animations ═══ */

/* Nav link underline animation */
.nav-menu a {
    position: relative;
    overflow: hidden;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Button ripple effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Skill card glow on hover */
.skill-card {
    position: relative;
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

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

/* Tag pop animation */
.tag {
    transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease;
}

.skill-card:hover .tag {
    animation: tagPop 0.4s ease forwards;
}

.skill-card:hover .tag:nth-child(1) { animation-delay: 0s; }
.skill-card:hover .tag:nth-child(2) { animation-delay: 0.05s; }
.skill-card:hover .tag:nth-child(3) { animation-delay: 0.1s; }
.skill-card:hover .tag:nth-child(4) { animation-delay: 0.15s; }
.skill-card:hover .tag:nth-child(5) { animation-delay: 0.2s; }
.skill-card:hover .tag:nth-child(6) { animation-delay: 0.25s; }
.skill-card:hover .tag:nth-child(7) { animation-delay: 0.3s; }
.skill-card:hover .tag:nth-child(8) { animation-delay: 0.35s; }

@keyframes tagPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* Project card shine effect */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 60%
    );
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.project-card:hover::after {
    transform: translateX(100%) rotate(45deg);
}

/* Detail card icon bounce */
.detail-card:hover .detail-icon {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-6px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-3px); }
}

/* Contact link arrow animation */
.contact-link {
    position: relative;
}

.contact-link svg {
    transition: transform 0.3s ease;
}

.contact-link:hover svg {
    transform: translateX(4px);
}

/* Hero title letter animation */
.hero-title .title-line {
    display: inline-block;
    overflow: hidden;
}

.hero-title .title-outline {
    background: linear-gradient(90deg, var(--accent), var(--accent-soft), var(--accent));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Stat counter animation */
.stat-value {
    display: inline-block;
    transition: transform 0.3s ease;
}

.hero-stats:hover .stat-value {
    animation: statPulse 0.6s ease;
}

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

/* Section number glow */
.section-number {
    position: relative;
    transition: text-shadow 0.3s ease;
}

.section-header:hover .section-number {
    text-shadow: 0 0 20px var(--accent-glow);
}

/* Theme toggle spin */
.theme-toggle svg {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover svg {
    transform: rotate(180deg);
}

/* Lang toggle flip */
.lang-toggle {
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.lang-toggle:hover {
    transform: scale(1.05);
}

/* Code window typing cursor */
.code-content::after {
    content: '|';
    color: var(--accent);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Floating badge enhanced float */
.floating-badge {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.floating-badge:hover {
    box-shadow: var(--shadow-medium), 0 0 20px var(--accent-glow);
    transform: translateY(-12px) scale(1.05);
}

/* Window dots pulse on hover */
.code-window:hover .window-dots span {
    animation: dotPulse 1.5s ease infinite;
}

.code-window:hover .window-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.code-window:hover .window-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Footer subtle animation */
.footer-copy, .footer-location {
    transition: color 0.3s ease;
}

.footer:hover .footer-copy {
    color: var(--accent);
}

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

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

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

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .hero-visual {
        max-width: 450px;
        margin: 0 auto;
    }

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

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

    .project-card.project-featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    :root {
        --section-gap: 80px;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

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

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 0 60px;
    }

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

    .stat-divider {
        display: none;
    }

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

    .btn {
        width: 100%;
        justify-content: center;
    }

    .floating-badge {
        display: none;
    }

    .exp-card {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 22px;
    }

    .exp-period {
        flex-direction: row;
        align-items: baseline;
        gap: 12px;
    }

    .exp-year {
        font-size: 1.4rem;
    }

    .section-header {
        flex-direction: column;
        gap: 6px;
    }

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