/* ===== CSS Variables - Modern Professional Theme ===== */
:root {
    /* Modern Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #06b6d4;

    /* Dark Theme */
    --dark: #0a0a0f;
    --dark-light: #111118;
    --dark-medium: #18181f;
    --gray-900: #0f0f14;
    --gray-800: #1a1a22;
    --gray-700: #2a2a35;
    --gray-600: #3a3a48;
    --gray-500: #5a5a6a;
    --gray-400: #8a8a9a;
    --gray-300: #b0b0be;
    --gray-200: #d0d0da;
    --gray-100: #f0f0f5;
    --white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-card: linear-gradient(145deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.03) 100%);
    --gradient-dark: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25);
    --shadow-primary: 0 0 20px rgba(99, 102, 241, 0.15);

    /* Radii */
    --radius-sm: 0.375rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

html::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

body {
    font-family: var(--font-sans);
    background: var(--dark);
    color: var(--gray-300);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

::selection {
    background: var(--primary);
    color: var(--white);
}

/* ===== Cursor Glow Effect ===== */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.cursor-glow.active {
    opacity: 1;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    padding: 0.75rem 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-400);
    position: relative;
    padding: 0.5rem 0;
    letter-spacing: 0.01em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.nav-toggle .bar {
    width: 25px;
    height: 2px;
    background: var(--primary-light);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 6rem 1.5rem 4rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            var(--dark) 0%,
            #0d0d14 25%,
            #10101a 50%,
            #0d0d14 75%,
            var(--dark) 100%);
}

.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.15);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(139, 92, 246, 0.12);
    top: 50%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: rgba(6, 182, 212, 0.1);
    bottom: 20%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(20px, -20px) scale(1.05);
    }

    66% {
        transform: translate(-15px, 15px) scale(0.95);
    }
}

.hero-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.hero-greeting {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    color: var(--white);
}

.title-line.accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--gray-300);
    margin-bottom: 1rem;
    min-height: 2rem;
}

.typewriter {
    color: var(--primary-light);
}

.cursor {
    color: var(--primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-description strong {
    color: var(--primary-light);
}

.hero-cta {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-lg), var(--shadow-primary);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), 0 0 40px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(99, 102, 241, 0.4);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.btn-full {
    width: 100%;
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-500);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    animation: floatScroll 2.5s ease-in-out infinite;
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--gray-600);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    animation: scroll 1.5s ease-in-out infinite;
}

@keyframes floatScroll {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

@keyframes scroll {

    0%,
    100% {
        opacity: 1;
        transform: translateY(0);
    }

    50% {
        opacity: 0.3;
        transform: translateY(6px);
    }
}

/* ===== Sections ===== */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    padding: 0.5rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-full);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== About Section ===== */
.about {
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 4rem;
    align-items: center;
}

.about-intro {
    font-size: 1.25rem;
    color: var(--gray-200);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-intro strong {
    color: var(--primary-light);
}

.about-text p {
    margin-bottom: 1.25rem;
    color: var(--gray-400);
    line-height: 1.8;
}

.about-text p strong {
    color: var(--primary-light);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Profile Card ===== */
.about-visual {
    display: flex;
    justify-content: center;
}

.profile-card {
    background: var(--gradient-card);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.profile-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-glow);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.profile-info p {
    font-size: 0.9rem;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.profile-tags span {
    padding: 0.4rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border-radius: var(--radius-full);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ===== Skills Section ===== */
.skills {
    background: var(--dark-light);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.skill-card {
    background: var(--gradient-card);
    border: 1px solid rgba(99, 102, 241, 0.1);
    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(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: var(--shadow-glow);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-icon-wrapper {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.skill-icon {
    font-size: 1.75rem;
}

.skill-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.skill-description {
    font-size: 0.9rem;
    color: var(--gray-400);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* ===== Projects Section ===== */
.projects {
    background: linear-gradient(180deg, var(--dark-light) 0%, var(--dark) 100%);
}

/* ===== Projects Grid ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: var(--gray-900);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: scale(1.03);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--shadow-primary);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 1.25rem;
}

.project-category {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

/* ===== Project Overlay Modal ===== */
.project-overlay-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-overlay-modal.active {
    opacity: 1;
    visibility: visible;
}

.overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.overlay-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--dark-light);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(99, 102, 241, 0.2);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.project-overlay-modal.active .overlay-content {
    transform: scale(1) translateY(0);
}

.overlay-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-close:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.overlay-image {
    height: 100%;
    min-height: 400px;
}

.overlay-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay-details {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.overlay-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.overlay-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.25rem;
}

.overlay-description {
    font-size: 1rem;
    color: var(--gray-400);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.overlay-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.overlay-tech span {
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.overlay-meta {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ===== Open Project Button ===== */
.btn-open-project {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 25px rgba(99, 102, 241, 0.2);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s ease;
    letter-spacing: 0.02em;
}

.btn-open-project .btn-open-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-open-project::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.btn-open-project:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl), 0 0 50px rgba(99, 102, 241, 0.4);
}

.btn-open-project:hover::before {
    left: 100%;
}

.btn-open-project:hover .btn-open-icon {
    transform: translate(3px, -3px);
}

.btn-open-project:active {
    transform: translateY(-1px) scale(0.98);
}

/* ===== Page Transition Overlay ===== */
#page-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    background: rgba(15, 15, 20, 0.6);
    /* Semi-transparent dark background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading Spinner */
#page-transition-overlay::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

#page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

#page-transition-overlay.active::after {
    opacity: 1;
    transform: scale(1);
    animation: transitionSpin 1s linear infinite 0.1s;
}

@keyframes transitionSpin {
    from {
        transform: scale(1) rotate(0deg);
    }

    to {
        transform: scale(1) rotate(360deg);
    }
}

/* Overlay Responsive */
@media (max-width: 768px) {
    .overlay-content {
        grid-template-columns: 1fr;
        max-height: 95vh;
        overflow-y: auto;
    }

    .overlay-image {
        min-height: 250px;
    }

    .overlay-details {
        padding: 1.5rem;
    }

    .overlay-title {
        font-size: 1.5rem;
    }

    .slide {
        width: 280px;
    }

    .slide-image {
        height: 160px;
    }
}

/* ===== Experience / Timeline ===== */
.experience {
    background: var(--dark);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), rgba(99, 102, 241, 0.2));
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0;
    width: 46px;
    height: 46px;
    background: var(--dark-light);
    border: 3px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-22px);
    z-index: 1;
}

.marker-icon {
    font-size: 1.15rem;
}

.timeline-item.future .timeline-marker {
    border-style: dashed;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 0 20px 5px rgba(99, 102, 241, 0.2);
    }
}

.timeline-content {
    background: var(--gradient-card);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-primary);
}

.timeline-header {
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--primary-light);
    font-weight: 500;
}

.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
}

.timeline-description {
    font-size: 0.9rem;
    color: var(--gray-400);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-skills span {
    padding: 0.3rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
}

/* ===== Contact Section ===== */
.contact {
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);
}

.contact-grid {
    display: flex;
    justify-content: center;
}

.contact-main-card {
    max-width: 450px;
    width: 100%;
    background: var(--gradient-card);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Email link box */
.contact-link-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition);
}

.contact-link-box:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.contact-link-icon {
    font-size: 1.5rem;
}

.contact-link-text {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Social buttons row */
.contact-socials-row {
    display: flex;
    gap: 1rem;
}

.contact-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    color: var(--gray-300);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.contact-social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* CV download button */
.btn-cv-download {
    width: 100%;
    padding: 1.1rem 2rem;
    font-size: 1rem;
    text-align: center;
}

/* ===== Form ===== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: var(--gradient-card);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius);
    color: var(--white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(99, 102, 241, 0.03);
}

.form-group label {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--gray-500);
    pointer-events: none;
    transition: var(--transition);
    background: transparent;
}

.form-group textarea~label {
    top: 1rem;
    transform: none;
}

.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:focus~label,
.form-group textarea:not(:placeholder-shown)~label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.75rem;
    background: var(--dark-light);
    padding: 0 0.5rem;
    color: var(--primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

/* ===== Footer ===== */
.footer {
    padding: 3rem 0 2rem;
    background: var(--gray-900);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-visual {
        order: -1;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--dark-light);
        border-left: 1px solid rgba(99, 102, 241, 0.1);
        flex-direction: column;
        justify-content: center;
        gap: 2.5rem;
        transition: var(--transition);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .section {
        padding: 4rem 0;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .timeline {
        padding-left: 2.5rem;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
        transform: translateX(-19px);
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 5rem 1rem 3rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .social-links {
        flex-direction: column;
    }

    .social-link {
        justify-content: center;
    }
}

/* ===== Animations ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Print Styles ===== */
@media print {

    .navbar,
    .scroll-indicator,
    .cursor-glow {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* ===== Footer ===== */
.footer {
    background: var(--gray-900);
    border-top: 1px solid rgba(99, 102, 241, 0.12);
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.4rem;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.footer-links {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--gray-400);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(99, 102, 241, 0.08);
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-600);
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}