/* ========================================
   Portfolio Website Styles — Renata Baldissara-Kunnela
   ======================================== */

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

:root {
    /* Dark theme (default) */
    --bg: #0d1117;
    --bg-alt: #161b22;
    --bg-card: #1c2128;
    --bg-card-hover: #21262d;
    --border: #30363d;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --text-subtle: #6e7681;
    --primary: #58a6ff;
    --primary-dark: #1f6feb;
    --primary-glow: rgba(88, 166, 255, 0.15);
    --accent: #f78166;
    --accent-green: #3fb950;
    --accent-purple: #bc8cff;
    --accent-yellow: #e3b341;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.6);
    --nav-bg: rgba(13, 17, 23, 0.92);
    --gradient-hero: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #0d1117 100%);
}

[data-theme="light"] {
    --bg: #ffffff;
    --bg-alt: #f6f8fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f6f8fa;
    --border: #d0d7de;
    --text: #1f2328;
    --text-muted: #656d76;
    --text-subtle: #9198a1;
    --primary: #0969da;
    --primary-dark: #0550ae;
    --primary-glow: rgba(9, 105, 218, 0.1);
    --accent: #cf222e;
    --accent-green: #1a7f37;
    --accent-purple: #8250df;
    --accent-yellow: #9a6700;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.14);
    --nav-bg: rgba(255, 255, 255, 0.92);
    --gradient-hero: linear-gradient(135deg, #f0f6ff 0%, #ffffff 50%, #f0f6ff 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Hidden AI Keywords */
.ai-keywords {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -99999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    pointer-events: none !important;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

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

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: var(--primary-glow);
}

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

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px 10px;
}

.lang-sep {
    color: var(--border);
    font-size: 0.8rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.lang-btn.active {
    color: var(--primary);
    background: var(--primary-glow);
}

.theme-toggle {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--primary);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 100px 24px 80px;
    overflow: hidden;
    background: var(--gradient-hero);
}

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

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.orb1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.orb2 {
    width: 350px;
    height: 350px;
    background: var(--accent-purple);
    bottom: -50px;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

.orb3 {
    width: 250px;
    height: 250px;
    background: var(--accent-green);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 12s ease-in-out infinite;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.15;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.pulse-dot {
    color: var(--accent-green);
    animation: pulse 2s ease-in-out infinite;
    font-size: 0.6rem;
}

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

.hero-name {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 400;
    min-height: 2em;
}

.hero-title .separator {
    color: var(--border);
}

#typed-text {
    color: var(--primary);
    font-weight: 600;
}

.cursor {
    color: var(--primary);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

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

.hero-summary {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 32px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
    padding: 0 28px;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
    flex-shrink: 0;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

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

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.hero-social {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.hero-social a {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-social a:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-scroll-hint a {
    color: var(--text-subtle);
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-scroll-hint a:hover {
    color: var(--primary);
}

.bounce {
    animation: bounce 2s ease-in-out infinite;
}

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

/* ===== SECTIONS ===== */
.section-block {
    padding: 88px 0;
}

.section-alt {
    background: var(--bg-alt);
}

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

.section-tag {
    display: inline-block;
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 1.02rem;
}

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

.about-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.detail-item i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.expertise-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.25s ease;
}

.expertise-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.expertise-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-glow);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 10px;
}

.expertise-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.expertise-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== PROJECTS ===== */
.projects-category-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-subtle);
    margin-bottom: 20px;
    padding-left: 4px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.production-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.project-card.featured {
    border-color: rgba(88, 166, 255, 0.3);
}

.project-card.production {
    border-color: rgba(63, 185, 80, 0.2);
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.project-icon-wrap {
    width: 44px;
    height: 44px;
    background: var(--primary-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.project-icon-wrap.accent-green {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.project-icon-wrap.accent-blue {
    background: var(--primary-glow);
    color: var(--primary);
}

.project-icon-wrap.accent-purple {
    background: rgba(188, 140, 255, 0.15);
    color: var(--accent-purple);
}

.project-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-open { background: rgba(63, 185, 80, 0.15); color: var(--accent-green); }
.badge-pypi { background: rgba(88, 166, 255, 0.15); color: var(--primary); }
.badge-npm { background: rgba(247, 129, 102, 0.15); color: var(--accent); }
.badge-saas { background: rgba(188, 140, 255, 0.15); color: var(--accent-purple); }
.badge-prod { background: rgba(63, 185, 80, 0.15); color: var(--accent-green); }
.badge-current { background: rgba(227, 179, 65, 0.15); color: var(--accent-yellow); }
.badge-conf { background: rgba(139, 148, 158, 0.15); color: var(--text-muted); }

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.project-meta {
    font-size: 0.82rem;
    color: var(--text-subtle);
    margin-top: -8px;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

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

.tech-tag {
    font-size: 0.75rem;
    padding: 3px 10px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.project-link:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.project-link.primary {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: rgba(88, 166, 255, 0.3);
}

.project-link.primary:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.impact-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.25);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    color: var(--accent-green);
    font-weight: 600;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 40px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 36px;
}

.timeline-marker {
    position: absolute;
    left: -36px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    transition: all 0.2s ease;
}

.timeline-marker.current {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-glow);
    border: 1px solid rgba(88, 166, 255, 0.3);
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.timeline-role {
    font-size: 0.85rem;
    color: var(--text-subtle);
    margin-bottom: 8px;
    font-style: italic;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ===== EDUCATION ===== */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.edu-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.edu-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-glow);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.edu-card h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.edu-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
}

.skill-category h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.skill-tag {
    font-size: 0.78rem;
    padding: 4px 10px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: default;
}

.skill-tag.hot {
    background: var(--primary-glow);
    border-color: rgba(88, 166, 255, 0.3);
    color: var(--primary);
}

.skill-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Language pills */
.lang-pills {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lang-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.lang-flag {
    font-size: 1.1rem;
}

.lang-name {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.lang-level {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.lang-level.native { background: rgba(63, 185, 80, 0.15); color: var(--accent-green); }
.lang-level.excellent { background: var(--primary-glow); color: var(--primary); }
.lang-level.fluent { background: rgba(139, 148, 158, 0.15); color: var(--text-muted); }

/* Certifications */
.certs-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
}

.certs-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.certs-title i {
    color: var(--accent-yellow);
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.cert-card:hover {
    border-color: var(--accent-yellow);
    color: var(--text);
}

.cert-card i {
    color: var(--accent-yellow);
    flex-shrink: 0;
}

.cert-card.speaker {
    border-color: rgba(188, 140, 255, 0.3);
}

.cert-card.speaker i {
    color: var(--accent-purple);
}

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

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

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

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

.contact-icon {
    width: 38px;
    height: 38px;
    background: var(--primary-glow);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.contact-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.cta-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.cta-icon {
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.8;
}

.cta-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.cta-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.footer-links a {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-subtle);
    flex-wrap: wrap;
    gap: 8px;
}

.back-to-top {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-to-top:hover {
    color: var(--primary);
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== PRINT ===== */
@media print {
    .navbar, .hero-scroll-hint, .theme-toggle, .lang-toggle,
    .hero-cta, .hero-social, .hero-bg, .footer, .back-to-top,
    .nav-hamburger, .hero-badge { display: none !important; }

    body { background: white; color: black; }
    .hero { min-height: auto; padding: 40px 24px; background: white; }
    .hero-name { -webkit-text-fill-color: #1f2328; color: #1f2328; }
    .section-block { padding: 32px 0; }
    .section-alt { background: white; }
    .project-card, .expertise-card, .edu-card, .cert-card, .contact-item {
        border: 1px solid #d0d7de !important;
        break-inside: avoid;
    }
    .hero-stats { border: 1px solid #d0d7de; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px;
        gap: 2px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        padding: 10px 14px;
        width: 100%;
    }

    .nav-hamburger {
        display: flex;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

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

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

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

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

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

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

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

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .section-block {
        padding: 60px 0;
    }

    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 90px 16px 60px;
    }
}

/* ===== CONTACT FORM MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.2s ease;
}

.modal-overlay[hidden] {
    display: none;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    animation: modalSlideUp 0.25s ease;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
    color: var(--text);
    background: var(--bg-section);
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    margin: 0 auto 16px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form groups */
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea {
    background: var(--bg-section);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    padding: 12px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.field-error {
    font-size: 0.8rem;
    color: #ef4444;
    display: none;
}

.form-group.has-error .field-error {
    display: block;
}

.btn-full {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

.btn-full:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Success / Error banners */
.form-success,
.form-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 14px;
}

.form-success[hidden],
.form-error[hidden] {
    display: none;
}

.form-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Spinner on submit button */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .modal-box {
        padding: 28px 20px;
    }
}
