/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --secondary: #10B981;
    --secondary-dark: #059669;
    --accent: #F97316;
    --accent-dark: #EA580C;

    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Theme Variables */
    --bg-surface: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.95);

/* ===== Typography ===== */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --section-padding: 5rem 1.5rem;
    --container-max: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-surface: #1E293B;
    --bg-nav: rgba(15, 23, 42, 0.95);
    
    /* Invert Grays for general elements */
    --gray-50: #0F172A;
    --gray-100: #1E293B;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748B;
    --gray-500: #94A3B8;
    --gray-600: #CBD5E1;
    --gray-700: #E2E8F0;
    --gray-800: #F1F5F9;
    --gray-900: #FFFFFF;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--primary);
    animation: blink 1s step-end infinite;
    margin-left: 4px;
    vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

.theme-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem;
    transition: transform 0.3s;
    color: var(--gray-700);
}
.theme-btn:hover { transform: scale(1.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-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea {
    font-family: inherit;
    font-size: 1rem;
}

input:focus, textarea:focus, .thumb:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== Container ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--gray-900);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: all var(--transition-normal);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-normal);
}

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 500;
    color: var(--gray-600);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-normal);
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a:hover::after {
    width: 100%;
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid var(--gray-200);
}

.lang-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    background: var(--gray-100);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(8px);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-greeting {
    font-size: 1.25rem;
    color: var(--gray-600);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.hero-greeting strong {
    color: var(--primary);
    font-weight: 600;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-title span {
    display: block;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    max-width: 600px;
    line-height: 1.6;
}

.hero-secondary {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
    max-width: 600px;
    font-style: italic;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hero-cv {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.hero-cv p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.cv-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #1F2937, #374151);
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all var(--transition-normal);
}

.cv-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] .cv-btn {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(99, 102, 241, 0.1));
    color: #E2E8F0;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .cv-btn:hover {
    background: linear-gradient(135deg, var(--primary), #6366F1);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-shape {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    opacity: 0.1;
}

@keyframes morph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    50% {
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    }
    75% {
        border-radius: 30% 70% 70% 30% / 70% 30% 70% 30%;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    margin: 0.5rem auto 0;
    border-right: 2px solid var(--gray-400);
    border-bottom: 2px solid var(--gray-400);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== About Section ===== */
.about {
    padding: var(--section-padding);
    background: var(--bg-surface);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.about-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.about-content h4 {
    font-size: 1.2rem;
    color: var(--gray-800);
    margin: 1.5rem 0 1rem;
}

.about-list {
    list-style: none;
    padding-left: 0;
}

.about-list li {
    margin-bottom: 1rem;
    color: var(--gray-600);
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
}

.about-list li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.about-skills {
    margin-top: 2rem;
}

.about-skills h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.skills-category {
    margin-bottom: 1.5rem;
}

.skills-category h4 {
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.about-info {
    margin-top: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-icon {
    font-size: 1.5rem;
}

.about-skills h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.6rem 1.2rem;
    background: var(--gray-100);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ===== Experience Section ===== */
.experience {
    padding: var(--section-padding);
    background: var(--gray-50);
}

.experience-container {
    max-width: 1000px;
    margin: 0 auto;
}

.experience-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-surface);
    border-radius: 50px;
    font-weight: 500;
    color: var(--gray-600);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.tab-btn:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-icon {
    font-size: 1.2rem;
}

.exp-panel {
    display: none;
    background: var(--bg-surface);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease;
}

.exp-panel.active {
    display: block;
}

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

.exp-header {
    margin-bottom: 2rem;
    text-align: center;
}

.exp-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.exp-role {
    color: var(--primary);
    font-weight: 500;
    font-size: 1.1rem;
}

.exp-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    width: 100%;
}

.exp-intro {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* Accordion Styles */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.accordion-item {
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.accordion-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
}

.accordion-item.active {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    text-align: left;
    transition: background 0.25s ease, color 0.25s ease;
}

.accordion-header:hover {
    background: var(--gray-50);
}

.accordion-item.active .accordion-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(99, 102, 241, 0.04));
    color: var(--primary);
}

.acc-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gray-100);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-500);
    transition: transform 0.35s ease, background 0.3s ease, color 0.3s ease;
}

.accordion-item.active .acc-icon {
    background: var(--primary);
    color: white;
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
    padding: 0 1.1rem;
}

.accordion-item.active .accordion-content {
    padding: 0 1.1rem 1rem;
}

.accordion-content p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--gray-600);
    margin: 0;
}

.exp-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.gallery-main {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    max-height: 400px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
}

.main-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    transition: transform var(--transition-normal);
    display: block;
    margin: 0 auto;
}

.main-image:hover {
    transform: scale(1.02);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
    flex-shrink: 0;
}

.gallery-nav:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gallery-counter {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

.gallery-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    width: 100%;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-400) var(--gray-200);
}

.gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbs::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 3px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

.thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.thumb:hover,
.thumb.active {
    opacity: 1;
    box-shadow: 0 0 0 3px var(--primary);
}

/* ===== Portfolio Section ===== */
.portfolio {
    padding: var(--section-padding);
    background: var(--bg-surface);
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-600);
    background: var(--gray-100);
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    background: var(--gray-200);
}

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

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform var(--transition-normal);
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 2rem 1.5rem 1.5rem;
    color: white;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h4 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.portfolio-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== Contact Section ===== */
.contact {
    padding: var(--section-padding);
    background: var(--gray-50);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

.contact-info > p {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--gray-600);
}

.contact-item a {
    color: var(--primary);
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* ===== Footer ===== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 2rem 1.5rem;
}

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

.footer-links a {
    color: var(--gray-400);
    margin-left: 1.5rem;
}

.footer-links a:hover {
    color: white;
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-cv {
        text-align: center;
    }

    .cv-buttons {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-shape {
        width: 280px;
        height: 280px;
    }

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

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

    .exp-panel {
        padding: 1.5rem;
    }

    .gallery-main {
        max-height: 250px;
    }

    .main-image {
        max-height: 250px;
    }

    .thumb {
        width: 50px;
        height: 50px;
    }

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

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

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

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        opacity: 0;
        transition: all var(--transition-normal);
    }

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

    .lang-switch {
        border-left: none;
        padding-left: 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .experience-tabs {
        flex-direction: column;
    }

    .tab-btn {
        justify-content: center;
    }

    .exp-panel {
        padding: 1.5rem;
    }

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

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

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

    .cv-buttons {
        flex-direction: column;
    }

    .skills-grid {
        gap: 0.5rem;
    }

    .skill-tag {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
}

/* ===== Reading Progress Bar ===== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 1001;
    transition: width 0.1s ease-out;
}

/* ===== Custom Cursor ===== */
@media (pointer: fine) {
    .custom-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 20px;
        height: 20px;
        border: 2px solid var(--primary);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 9999;
        transition: width 0.1s, height 0.1s, background-color 0.1s;
        display: none; /* hidden until mousemoves */
        mix-blend-mode: normal; 
    }

    .custom-cursor.cursor-hover {
        width: 40px;
        height: 40px;
        background-color: rgba(37, 99, 235, 0.2);
        border-color: rgba(37, 99, 235, 0.5);
    }
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--secondary);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* ===== Hover Glow Effects ===== */
.portfolio-item, .exp-panel, .thumb {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.portfolio-item:hover, .exp-panel:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2) !important;
}
