* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global image styling - rounded corners for all images except logos */
img {
    border-radius: 8px;
}

/* Remove rounded corners from all logo images */
.trusted-logo,
.nav-org-logo img {
    border-radius: 0 !important;
}

/* Ensure no rounded corners on ANY collaborating/trusted logos */
.trusted-by-footer .trusted-logo,
.trusted-logos img {
    border-radius: 0 !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Arial, sans-serif;
    color: #000;
    overflow-x: hidden;
    position: relative;
    background: #000; /* Base black */
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Continuous gradient overlay for entire page */
body::before {
    content: '';
    position: absolute; /* Changed from fixed to absolute */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 500vh; /* Ensure it covers all content */
    background: linear-gradient(180deg, 
        rgba(0, 102, 204, 0.25) 0%,      /* Strong blue at top */
        rgba(0, 102, 204, 0.2) 8%,       /* Slightly less blue */
        rgba(0, 51, 102, 0.15) 20%,      /* Medium blue */
        rgba(0, 26, 51, 0.1) 35%,        /* Darker blue */
        rgba(0, 13, 26, 0.08) 50%,       /* Very dark blue */
        rgba(0, 6, 13, 0.05) 65%,        /* Almost black */
        rgba(0, 3, 6, 0.02) 80%,         /* Very subtle blue */
        rgba(0, 0, 0, 0) 90%);           /* Pure black for rest of page */
    pointer-events: none;
    z-index: -1;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066CC, #4a9eff);
    z-index: 10000;
    transition: width 0.3s ease;
    width: 0%;
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.5);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #0066CC;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.5);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px) rotate(360deg);
    background: #0052CC;
    box-shadow: 0 15px 40px rgba(0, 102, 204, 0.7);
}

/* Particle Background */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

/* Selection Style */
::selection {
    background: #0066CC;
    color: #fff;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation Enhanced */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
    padding: 20px 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: difference;
}

/* Fix logo visibility before scrolling */
nav:not(.scrolled) .nav-org-logo {
    mix-blend-mode: normal;
}

/* Fix cv-download button visibility before scrolling */
nav:not(.scrolled) .cv-download {
    mix-blend-mode: normal !important;
}

/* Make JSI logo visible on dark background */
nav:not(.scrolled) .nav-org-logo img[alt="Jožef Stefan Institute"] {
    /* Apply filter to make dark logo visible on dark background */
    filter: brightness(5) invert(1);
    opacity: 0.9;
    height: 50px; /* Even smaller to match proportions */
    width: auto;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    mix-blend-mode: normal;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

nav.scrolled .nav-link {
    color: #000;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logos {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 30px;
}

.nav-org-logo {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0.8;
    position: relative;
}

.nav-org-logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0066CC;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-org-logo:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.nav-org-logo:hover::after {
    width: 100%;
}

.nav-org-logo img {
    height: 85px;
    width: auto;
    transition: all 0.3s ease;
    filter: brightness(1);
}

.nav-org-logo:hover img {
    filter: brightness(1.2);
}

nav.scrolled .nav-org-logo img {
    height: 40px; /* Increased from 35px */
}

/* Ensure JSI logo matches size when scrolled */
nav.scrolled .nav-org-logo img[alt="Jožef Stefan Institute"] {
    filter: none; /* Remove filter when scrolled */
    opacity: 1;
    height: 25px; /* Even smaller proportionally */
}

/* Remove any background from Zopyros logo */
nav .nav-org-logo img[alt="Zopyros"] {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Specifically for scrolled state */
nav.scrolled .nav-org-logo img[alt="Zopyros"] {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Special styling for logos with light backgrounds - removed padding and background */
.nav-org-logo img[alt="Zopyros"],
.nav-org-logo img[alt="Stanford"],
.nav-org-logo img[alt="Wolfram Research"],
.nav-org-logo img[alt="Carnegie Mellon University"],
.nav-org-logo img[alt="Jožef Stefan Institute"] {
    /* Removed background and padding for transparent logos */
    border-radius: 0;
}


.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #0066CC;
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover {
    color: #4a9eff;
    transform: translateY(-2px);
}

/* Magnetic hover effect for nav */
.magnetic {
    transition: transform 0.2s ease;
}

.cv-download {
    background: #0080FF;
    padding: 10px 20px;
    border-radius: 25px;
    color: #fff !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    mix-blend-mode: normal !important;
}

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

.cv-download:hover::before {
    width: 300px;
    height: 300px;
}

.cv-download:hover {
    background: #0066CC;
    transform: translateY(-2px) scale(1.05);
    opacity: 1 !important;
    box-shadow: 0 10px 30px rgba(0, 128, 255, 0.5);
}

/* Parallax Sections */
.parallax-container {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent; /* Ensure transparent */
}

/* Allow overflow for gradient blending */
#hero.parallax-container,
#research-projects.parallax-container {
    overflow: visible;
}

/* Ensure sections flow seamlessly */
#hero.parallax-container {
    margin: 0;
    padding-bottom: 0;
    border: none;
    background: transparent;
}

#research-projects.parallax-container {
    margin: 0;
    padding-top: 0;
    border: none;
    background: transparent;
}

/* Remove any gaps between sections */
.parallax-container + .parallax-container {
    margin-top: -2px; /* Slight overlap to prevent gaps */
}

/* Ensure no borders or shadows on any section */
section,
.parallax-container,
.content-section,
.content-wrapper {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}


.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    will-change: transform;
    transition: opacity 1.5s ease;
}

/* Interactive Background Patterns */
.interactive-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: visible; /* Changed from hidden to prevent clipping */
    z-index: 1;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 133, 255, 0.2) 0%, transparent 70%);
    animation: float-random 20s infinite ease-in-out;
}

@keyframes float-random {
    /* Animation disabled - elements should be static */
    0%, 100% { transform: translate(0, 0) scale(1); }
}

/* Background Images */
.bg-hero {
    background: transparent;
    height: 130%; /* Extend beyond viewport to ensure coverage */
    border: none;
    box-shadow: none;
}


.bg-about {
    background: transparent;
}

.bg-skills {
    background: transparent;
}

.bg-projects {
    background: transparent;
}

.bg-projects-business {
    background: transparent;
}

.bg-experience {
    background: transparent;
}

/* Content Sections */
.content-section {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 50px;
    overflow: visible;
    background: transparent; /* Ensure transparent */
}

/* Sections should be transparent to show continuous gradient */
section {
    position: relative;
    background: transparent;
    z-index: 1; /* Above body gradient */
}

/* Hero section specific positioning - slightly higher on PC screens */
@media (min-width: 1024px) {
    #hero .content-section {
        align-items: flex-start;
        padding-top: 220px; /* Further increased for more space from menu */
        padding-bottom: 40px; /* Standard spacing to Featured Research */
        background: transparent;
        overflow: visible;
    }
    
    /* Fix scroll indicator overlap on wider screens */
    .scroll-indicator {
        bottom: 40px; /* Moved up 5px to avoid overlap */
    }
    
    /* Reduce accent line margin on wider screens to prevent overlap */
    .accent-line {
        margin: 20px auto 40px auto; /* Reduced bottom margin to create space for scroll indicator */
    }
}

.content-section.reduced-padding {
    padding: 30px 50px; /* Slightly less spacing for business projects (as requested) */
    min-height: auto;
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    overflow: visible;
    background: transparent;
    border: none;
}

/* Hero Section */
#hero .content-wrapper::before,
#hero .content-wrapper::after {
    display: none; /* Remove any pseudo-elements that might create lines */
}

#hero .content-section,
#hero .content-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.hero-content {
    text-align: center;
    color: #fff;
    position: relative;
    background: transparent;
}

.profile-image {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    margin: 0 auto 50px auto;
    border: 5px solid #0066CC;
    display: block;
    box-shadow: 0 20px 60px rgba(0, 102, 204, 0.4);
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

.profile-image:hover img {
    transform: scale(1.1);
}

/* Text scramble effect */
.hero-title {
    font-size: 96px;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 20px;
    line-height: 0.9;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    display: inline-block;
}

.hero-title .letter {
    display: inline-block;
    transition: all 0.3s ease;
    white-space: pre;
}

.hero-title:hover .letter {
    animation: bounce-letter 0.6s ease;
}

.hero-title:hover .letter:nth-child(odd) {
    animation-delay: 0.1s;
}

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

.hero-subtitle {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 40px;
    background: linear-gradient(45deg, #0066CC, #4a9eff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
    animation: gradient-shift 3s ease infinite;
}

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

.hero-description {
    font-size: 24px;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto 60px;
    opacity: 0.95;
    font-weight: 300;
    animation: fade-in-up 1s ease 0.5s both;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

.cta-button {
    display: inline-block;
    padding: 25px 60px;
    background: #0066CC;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    border-radius: 60px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 40px rgba(0, 102, 204, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 60px rgba(0, 102, 204, 0.5);
    background: #0052CC;
}

/* About Section */
.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 30px; /* Much reduced padding */
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 162, 255, 0.05));
    border: 2px solid rgba(0, 102, 204, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.2), 
                0 0 50px rgba(0, 102, 204, 0.1);
    position: relative;
}

.about-text h2 {
    font-size: 64px;
    margin-bottom: 40px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

.about-text p {
    font-size: 18px !important;
    line-height: 1.8;
    margin-bottom: 20px;
    opacity: 0.9;
    transition: all 0.3s ease;
    font-weight: 400;
}

.about-text p:hover {
    opacity: 1;
    transform: translateX(5px);
}

.about-highlights {
    margin-top: 40px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.highlight-item:hover {
    transform: translateX(10px);
    color: #4a9eff;
}

.highlight-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #0066CC, #4a9eff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s ease;
}

.highlight-item:hover .highlight-icon {
    transform: rotate(360deg) scale(1.2);
}

/* Stats with simple hover */
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.stat-item:hover::before {
    animation: shine 0.6s ease;
}

@keyframes shine {
    0% {
        transform: rotate(45deg) translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(45deg) translateY(100%);
        opacity: 0;
    }
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(45deg, #0066CC, #4a9eff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 5px 15px rgba(0, 102, 204, 0.2);
}

.stat-label {
    font-size: 16px;
    opacity: 0.8;
}

/* Skills Section */
#skills .content-section {
    min-height: auto;
    padding: 40px 50px; /* Standard spacing */
}

/* About Section - Minimal height and spacing */
#about .content-section {
    padding: 30px 50px; /* Reduced spacing */
    min-height: 15vh; /* Much smaller height for tighter layout */
}

/* Research Projects Section - Standard spacing */
#research-projects .content-section {
    padding: 40px 50px; /* Standard spacing */
}

/* Experience Section - Standard spacing */
#experience .content-section {
    padding: 40px 50px; /* Standard spacing */
}

.skills-content {
    text-align: center;
    color: #fff;
}

.section-title {
    font-size: 72px;
    margin-bottom: 30px;
    font-weight: 800;
    letter-spacing: -2px;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
}

.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #0066CC, #4a9eff);
    top: 50%;
    transform: translateY(-50%);
}

.section-title::before {
    left: -80px;
}

.section-title::after {
    right: -80px;
}

.section-subtitle {
    font-size: 24px;
    margin-bottom: 60px;
    opacity: 0.8;
    font-weight: 300;
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

@media (max-width: 1024px) {
    .skills-categories {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

.skill-category {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066CC, #00a2ff);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 102, 204, 0.3);
    transform: translateY(-5px) rotateX(-5deg);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.2);
}

.skill-category:hover::before {
    transform: scaleX(1);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #0066CC, #00a2ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-category:hover .category-icon {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 102, 204, 0.5);
}

.skill-category:hover .category-icon::after {
    opacity: 1;
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

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

.skill-tag {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s ease;
    color: #e0e0e0;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 102, 204, 0.3);
    transition: left 0.3s ease;
    z-index: -1;
}

.skill-tag:hover::before {
    left: 0;
}

.skill-tag:hover {
    background: rgba(0, 102, 204, 0.2);
    border-color: #0066CC;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
    z-index: 1;
}

.skill-tag.expert {
    background: rgba(0, 102, 204, 0.25);
    border-color: #0066CC;
    color: #4a9eff;
    font-weight: 600;
}

.skill-tag.advanced {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
    color: #81C784;
}

/* Skills Legend */
.skills-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.legend-item:hover {
    transform: translateY(-3px);
}

.legend-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: #e0e0e0;
    font-weight: 500;
    transition: all 0.3s ease;
}

.legend-item:hover .legend-pill {
    transform: scale(1.1);
}

.legend-pill.expert {
    background: rgba(0, 102, 204, 0.25);
    border-color: #0066CC;
    color: #4a9eff;
}

.legend-pill.advanced {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
    color: #81C784;
}

.legend-text {
    font-size: 14px;
    color: #b0b0b0;
    font-weight: 400;
}

/* Projects Section Enhanced */
.projects-content {
    color: #fff;
}

.projects-header {
    text-align: center;
    margin-bottom: 80px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02) rotateX(-5deg);
    box-shadow: 0 30px 60px rgba(0, 102, 204, 0.4);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 102, 204, 0.3);
}

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

.project-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    padding: 20px;
}

.project-image img[alt*="OPTIMAS"],
.project-image img[alt*="Zopyros"] {
    object-fit: cover;
    padding: 0;
}

.project-image img[alt*="Carnegie Mellon"] {
    object-fit: contain;
    padding: 0;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.project-info {
    padding: 30px;
    position: relative;
}

.project-type {
    display: inline-block;
    background: rgba(0, 102, 204, 0.2);
    color: #4a9eff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.project-card:hover .project-type {
    background: rgba(0, 102, 204, 0.3);
    transform: scale(1.05);
}

.project-title {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-card:hover .project-title {
    color: #4a9eff;
}

.project-description {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

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

.project-link {
    color: #0066CC;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.project-link:hover {
    color: #4a9eff;
    border-bottom-color: rgba(74, 158, 255, 0.3);
    transform: translateY(-1px);
}

/* Ensure project links are always clickable */
.project-card .project-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: rgba(0, 102, 204, 0.1);
    border-radius: 8px;
    border-bottom: none;
    transition: all 0.3s ease;
}

.project-card .project-link:hover {
    background: rgba(0, 102, 204, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

/* View All Button Enhanced */
.view-all-button {
    display: inline-block;
    padding: 18px 50px;
    background: linear-gradient(135deg, #0066CC, #0052CC);
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3); /* 2x less glow */
    position: relative;
    overflow: hidden;
}

.view-all-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.6s ease;
}

.view-all-button:hover::before {
    left: 100%;
}

.view-all-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 7px 20px rgba(0, 102, 204, 0.5); /* 2x less glow */
    background: linear-gradient(135deg, #0052CC, #003d99);
}

/* Experience Section Enhanced */
.experience-content {
    color: #fff;
    position: relative;
}

.experience-header {
    text-align: center;
    margin-bottom: 80px;
}

/* Timeline Progress Indicator */
.timeline-progress {
    display: none; /* Hide the side timeline progress bar */
    position: fixed;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    height: 200px;
    width: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-progress.visible {
    opacity: 1;
}

.timeline-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, #0066CC, #4a9eff);
    border-radius: 2px;
    transition: height 0.3s ease;
    height: 0%;
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.5);
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #0066CC, #4a9eff, transparent);
    animation: timeline-pulse 3s ease infinite;
}

@keyframes timeline-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.timeline-item {
    position: relative;
    padding: 40px 0;
    width: 50%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    padding-right: 60px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    top: 50px;
    width: 20px;
    height: 20px;
    background: #0066CC;
    border-radius: 50%;
    border: 4px solid #000;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.4);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.5);
    box-shadow: 0 0 0 10px rgba(0, 102, 204, 0.2);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-content:hover::before {
    opacity: 1;
    animation: rotate 10s linear infinite;
}

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

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
    border-color: rgba(0, 102, 204, 0.3);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.3);
}

.timeline-date {
    font-size: 14px;
    color: #4a9eff;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.timeline-title {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.timeline-description {
    font-size: 16px;
    opacity: 0.8;
    line-height: 1.6;
}

/* Trusted By Footer Section Enhanced */
.trusted-by-footer {
    margin-bottom: 20px; /* Standard spacing between collaborating and connect */
    padding-bottom: 20px; /* Standard spacing */
    border-bottom: none; /* Remove border */
}

.trusted-by-footer .trusted-by-title {
    text-align: center;
    font-size: 2em;
    font-weight: 600;
    color: #000;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.trusted-logos {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 40px;
    align-items: center;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.trusted-logo {
    max-height: 65px;
    max-width: 150px;
    width: auto;
    height: auto;
    transition: all 0.3s ease;
    opacity: 0.8;
    object-fit: contain;
    filter: grayscale(0.5);
}

.trusted-logo:hover {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
    filter: grayscale(0);
}

/* Contact Section */
.contact-section {
    background: #fff;
    color: #000;
    padding: 40px 50px; /* Standard spacing */
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 20;
}

/* Smooth transition from dark to white */
#experience {
    position: relative;
    padding-top: 200px; /* 2x more space from about section */
}

/* Container for View Full Timeline button */
#experience .view-all-button {
    position: relative;
    z-index: 15;
    margin-bottom: 50px;
}


.contact-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(100px, -100px) scale(1.1); }
    66% { transform: translate(-100px, 100px) scale(0.9); }
}

.contact-title {
    font-size: 48px;
    margin-bottom: 30px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.contact-subtitle {
    font-size: 24px;
    margin-bottom: 50px;
    opacity: 0.7;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.contact-link {
    color: #000;
    text-decoration: none;
    font-size: 18px;
    padding: 15px 30px;
    border: 2px solid #000;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #000;
    transition: left 0.3s ease;
    z-index: -1;
}

.contact-link:hover::before {
    left: 0;
}

.contact-link:hover {
    color: #fff;
    transform: translateY(-3px);
}

.contact-link i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.contact-link:hover i {
    transform: scale(1.2);
}

/* Section Separator - Minimal spacing */
.section-separator {
    height: 60px;
    background: linear-gradient(180deg, #0a0a0a 0%, #ffffff 100%);
}

.separator-line {
    display: none;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px; /* Moved up 5px from 35px */
    left: 0;
    right: 0;
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    cursor: pointer;
    padding: 20px 20px 15px; /* Reduced padding */
    background: transparent; /* Removed gradient for continuous flow */
    text-align: center;
    transition: opacity 0.3s ease;
    z-index: 5; /* Ensure it's above gradients */
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator::after {
    content: '↓';
    display: block;
    font-size: 24px;
    margin-top: 5px;
    animation: arrow-bounce 1s infinite;
    text-align: center;
}

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

/* Add visual flair */
.glow-effect {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 133, 255, 0.65) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.accent-line {
    width: 100px;
    height: 6px;
    background: linear-gradient(90deg, #0066CC, #4a9eff);
    margin: 40px auto;
    border-radius: 3px;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.accent-line.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    position: relative;
    z-index: 10001;
}

/* Ensure desktop nav shows above 1400px */
@media (min-width: 1401px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    .nav-links {
        display: flex !important;
        position: static !important;
    }
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
}

nav.scrolled .mobile-menu-toggle span {
    background: #000;
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10002;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-text {
    font-size: 24px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: linear-gradient(90deg, #0066CC, #4a9eff);
    animation: loading 2s ease infinite;
}

@keyframes loading {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
}

/* Easter Egg - Konami Code */
.easter-egg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #0066CC;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    z-index: 10003;
    animation: easter-egg-appear 2s ease;
}

@keyframes easter-egg-appear {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2) rotate(180deg); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(360deg); }
}

/* Specific logo sizing fixes - Equal surface area approach */
.trusted-logo[alt="Jožef Stefan Institute"] {
    max-height: 75px;
    max-width: 150px;
}

.trusted-logo[alt="Stanford University"] {
    max-height: 72px;
    max-width: 144px;
}

.trusted-logo[alt="Carnegie Mellon University"] {
    max-height: 55px;
    max-width: 100px;
}

.trusted-logo[alt="Wolfram Research"] {
    max-height: 70px;
    max-width: 170px;
}

.trusted-logo[alt="Zopyros AI"] {
    max-height: 75px;
    max-width: 150px;
}

.trusted-logo[alt="Big Bang"] {
    max-height: 52px;
    max-width: 104px;
}

.trusted-logo[alt="Dormeo"] {
    max-height: 65px;
    max-width: 150px;
}

.trusted-logo[alt="University of Ljubljana"] {
    max-height: 55px;
    max-width: 105px;
}

.trusted-logo[alt="Amazon"] {
    max-height: 70px;
    max-width: 170px;
}

.trusted-logo[alt="Department for Artificial Intelligence"] {
    max-height: 75px;
    max-width: 150px;
}

.trusted-logo[alt="Quintelligence"] {
    max-height: 70px;
    max-width: 140px;
}

/* All logos are now transparent - no backgrounds needed */
.trusted-logo[alt="Amazon"],
.trusted-logo[alt="Wolfram Research"],
.trusted-logo[alt="Zopyros AI"],
.trusted-logo[alt="Carnegie Mellon University"],
.trusted-logo[alt="Quintelligence"] {
    background: transparent;
    padding: 0;
    border-radius: 0; /* No rounded corners */
}

/* Responsive - Show hamburger menu earlier to prevent text cutoff */
@media (max-width: 1400px) {
    
    /* Hide timeline progress on mobile */
    .timeline-progress {
        display: none;
    }
    
    /* Disable mix-blend-mode on mobile to prevent color inversion glitch */
    nav {
        mix-blend-mode: normal !important;
    }
    
    /* Navigation */
    .nav-content {
        padding: 0 20px;
    }
    
    .nav-logos {
        gap: 10px;
    }
    
    .nav-org-logo img {
        height: 65px;
    }
    
    nav.scrolled .nav-org-logo img {
        height: 32px; /* Increased from 28px */
    }
    
    /* Removed padding from logos for transparent appearance */
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links .nav-link {
        color: #000;
        font-size: 18px;
        font-weight: 500;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }
    
    .nav-links .nav-link:hover {
        color: #0066CC;
        transform: translateX(5px);
    }
    
    .nav-links .cv-download {
        background: #0080FF;
        color: #fff !important;
        padding: 15px 20px;
        border-radius: 25px;
        text-align: center;
        margin-top: 30px;
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
        padding: 10px;
        margin: -10px;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 2px;
        background: #fff;
        transition: all 0.3s ease;
    }
    
    /* Hero */
    .hero-content {
        padding: 0 20px;
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 48px;
        line-height: 1.1;
        letter-spacing: -1px; /* Proportionally adjusted for mobile */
        white-space: normal !important; /* Ensure line breaks work */
        display: block !important; /* Ensure block display for proper line breaking */
    }
    
    /* Ensure br tags work in hero title on mobile */
    .hero-title br {
        display: block !important;
        content: "" !important;
        margin: 0 !important;
        line-height: 1.1 !important;
    }
    
    /* Ensure letter spans don't interfere with line breaks on mobile */
    .hero-title .letter {
        white-space: normal !important;
    }
    
    /* Ensure proper spacing between words on mobile */
    .hero-title .letter[data-char=" "] {
        min-width: 0.3em !important;
        display: inline-block !important;
    }
    
    /* Force space character visibility on mobile */
    .hero-title .space-char {
        display: inline-block !important;
        min-width: 0.3em !important;
        white-space: pre !important;
    }
    
    .hero-subtitle {
        font-size: 22px;
    }
    
    .hero-description {
        font-size: 16px;
        max-width: 100%;
    }
    
    .profile-image {
        width: 180px;
        height: 180px;
        margin: 40px auto 30px auto;
    }
    
    /* About */
    .about-content {
        text-align: center;
    }
    
    .about-text {
        text-align: center;
        padding: 15px 20px; /* Much reduced mobile padding */
        margin: 0 20px;
    }
    
    /* Skills section handled by earlier media query */
    
    .skill-category {
        padding: 30px 20px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-card {
        grid-template-columns: 1fr;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-image img {
        padding: 15px;
    }
    
    .project-image img[alt*="OPTIMAS"],
    .project-image img[alt*="Zopyros"],
    .project-image img[alt*="Carnegie Mellon"] {
        padding: 0;
    }
    
    .view-all-button {
        padding: 15px 40px;
        font-size: 16px;
    }
    
    /* Timeline */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 60px !important;
        text-align: left !important;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-dot {
        left: 10px !important;
    }
    
    /* General */
    .section-title {
        font-size: 36px;
    }
    
    .section-title::before,
    .section-title::after {
        display: none;
    }
    
    .section-subtitle {
        font-size: 18px;
    }
    
    .content-section {
        padding: 30px 20px; /* Standard mobile spacing */
    }
    
    .content-section.reduced-padding {
        padding-top: 20px !important;
        padding-right: 20px !important; 
        padding-bottom: 40px !important; /* 2x more space after View All Projects button (20px * 2) */
        padding-left: 20px !important;
    }
    
    #skills .content-section {
        padding-top: 60px !important; /* 2x more space above skills (30px * 2) */
        padding-right: 20px !important;
        padding-bottom: 30px !important;
        padding-left: 20px !important;
    }
    
    #about .content-section {
        padding: 20px 20px; /* Minimal mobile spacing */
        min-height: 12vh; /* Much smaller mobile height */
    }
    
    #experience .content-section {
        padding-top: 120px !important; /* 4x more space above Professional Journey (30px * 4) */
        padding-right: 20px !important;
        padding-bottom: 30px !important;
        padding-left: 20px !important;
    }
    
    #research-projects .content-section {
        padding: 30px 20px; /* Standard mobile spacing */
    }
    
    #hero .content-section {
        padding-bottom: 30px; /* Mobile - standard hero to research spacing */
    }
    
    .skills-legend {
        gap: 15px;
        margin: 30px 0;
    }
    
    .legend-item {
        gap: 6px;
    }
    
    .legend-pill {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .legend-text {
        font-size: 12px;
    }
    
    .accent-line {
        margin: 20px auto;
    }
    
    .glow-effect {
        display: none;
    }
    
    /* Trusted logos mobile */
    .trusted-logos {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    
    .trusted-logo {
        max-height: 35px;
        max-width: 70px;
    }
    
    .trusted-logo[alt="Jožef Stefan Institute"] {
        max-height: 40px;
        max-width: 75px;
    }
    
    .trusted-logo[alt="Stanford University"] {
        max-height: 32px;
        max-width: 70px;
    }
    
    .trusted-logo[alt="Zopyros AI"] {
        max-height: 30px;
        max-width: 65px;
    }
    
    .trusted-logo[alt="Big Bang"] {
        max-height: 32px;
        max-width: 70px;
    }
    
    .trusted-logo[alt="Dormeo"] {
        max-height: 30px;
        max-width: 75px;
    }
    
    .trusted-logo[alt="University of Ljubljana"] {
        max-height: 35px;
        max-width: 70px;
    }
    
    .trusted-logo[alt="Amazon"] {
        max-height: 28px;
        max-width: 60px;
    }
    
    .trusted-logo[alt="New Collaboration"],
    .trusted-logo[alt="Department for Artificial Intelligence"] {
        max-height: 32px;
        max-width: 70px;
    }
    
    .trusted-logo[alt="Carnegie Mellon University"] {
        max-height: 30px;
        max-width: 55px;
    }
    
    .trusted-logo[alt="Wolfram Research"] {
        max-height: 32px;
        max-width: 75px;
    }
    
    
    .trusted-logo[alt="Quintelligence"] {
        max-height: 32px;
        max-width: 65px;
    }
    
    .trusted-logo.placeholder {
        width: 120px;
        height: 40px;
        font-size: 11px;
        padding: 10px;
    }
    
    /* Contact Section */
    .contact-section {
        padding: 30px 20px; /* Standard mobile spacing */
    }
    
    .trusted-by-footer {
        margin-bottom: 15px; /* Mobile - standard spacing between collaborating and connect */
        padding-bottom: 15px; /* Mobile - standard spacing */
    }
    
    .contact-title {
        font-size: 32px;
    }
    
    .contact-subtitle {
        font-size: 18px;
    }
    
    .contact-links {
        gap: 20px;
    }
    
    .contact-link {
        font-size: 16px;
        padding: 12px 24px;
    }
    
    /* Back to top button */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Fix scroll indicator positioning on mobile */
    .scroll-indicator {
        bottom: 20px;
        padding-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 36px;
        letter-spacing: -0.8px; /* Proportionally adjusted for smallest mobile */
    }
    
    .nav-org-logo img {
        height: 52px;
    }
    
    nav.scrolled .nav-org-logo img {
        height: 28px; /* Increased from 24px */
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .section-title {
        font-size: 28px;
    }
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #0066CC;
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: all 0.1s ease;
    mix-blend-mode: difference;
}

.custom-cursor-dot {
    width: 4px;
    height: 4px;
    background: #0066CC;
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    border-color: #4a9eff;
    background: rgba(0, 102, 204, 0.1);
}

/* Smooth fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

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

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

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

/* Scale animations */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

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

/* SPACING FIXES FOR DESKTOP AND MOBILE */

/* Fix About parallax container height - it's way too big */
#about.parallax-container {
    min-height: auto !important; /* Remove the 100vh minimum height */
    height: auto !important; /* Let it size to content */
}

/* Also fix the content-section inside About to not take up full viewport */
#about .content-section {
    min-height: auto !important; /* Remove 100vh minimum height */
    height: auto !important; /* Let it size to content */
    padding: 100px 50px !important; /* Full standard section padding matching base content-section */
}

/* Ensure about-text has proper padding for readability */
.about-text {
    padding-top: 100px !important; /* 4x more space above text (25px * 4) */
    padding-right: 30px !important;
    padding-bottom: 25px !important;
    padding-left: 30px !important;
    margin: 0 auto !important;
}

/* Fix Skills section container height on PC - it's too tall */
@media (min-width: 1025px) {
    #skills.parallax-container {
        min-height: auto !important; /* Remove 100vh minimum height */
        height: auto !important; /* Let it size to content */
    }
    
    #skills .content-section {
        min-height: auto !important; /* Remove 100vh minimum height */
        height: auto !important; /* Let it size to content */
        padding-top: 140px !important; /* 2x more space before skills (original was ~70px) */
        padding-right: 50px !important;
        padding-bottom: 30px !important;
        padding-left: 50px !important;
    }
}

/* Desktop fixes for medium to large screens */
@media (min-width: 1025px) and (max-width: 1499px) {
    /* About section with proper spacing for medium desktop screens */
    #about .content-section {
        padding: 100px 50px !important; /* Full standard section padding like base content-section */
        min-height: auto !important; /* Let it size to content, not vh */
        height: auto !important; /* Let it size to content */
    }
    
    /* Desktop about-text gets reasonable padding */
    .about-text {
        padding-top: 80px !important; /* 4x more space above text (20px * 4) */
        padding-right: 30px !important;
        padding-bottom: 20px !important;
        padding-left: 30px !important;
        margin: 0 auto !important;
    }
    
    /* Reduce accent line margins */
    .about-text .accent-line {
        margin: 12px auto 18px auto; /* Smaller margins */
    }
    
    /* Professional Journey section - standard spacing */
    #experience .content-section {
        /* Normal spacing - no need to pull up since About has proper padding now */
    }
}

/* Desktop fixes for screens above 1500px */
@media (min-width: 1500px) {
    /* About section with proper spacing for large desktop screens */
    #about .content-section {
        padding: 100px 50px !important; /* Full standard section padding matching base content-section */
        min-height: auto !important; /* Let it size to content, not vh */
        height: auto !important; /* Let it size to content */
    }
    
    /* Large desktop about-text gets good padding for readability */
    .about-text {
        padding-top: 100px !important; /* 4x more space above text (25px * 4) */
        padding-right: 30px !important;
        padding-bottom: 25px !important;
        padding-left: 30px !important;
        margin: 0 auto !important; /* No vertical margins */
    }
    
    /* Minimize accent line margins */
    .about-text .accent-line {
        margin: 10px auto 15px auto; /* Much smaller margins */
    }
    
    /* Standard section transitions */
    .parallax-container + .parallax-container {
        /* Normal section spacing since About has proper padding now */
    }
    
    /* Professional Journey section - standard spacing */
    #experience .content-section {
        /* Normal spacing - no need to pull up since About has proper padding now */
    }
    
    /* Keep Featured Research section spacing as requested */
    #research-projects .content-section {
        padding: 40px 50px; /* Keep standard spacing as requested */
    }
}

/* Mobile fixes */
@media (max-width: 1400px) {
    /* Reduce profile picture top spacing further (4x less than original) */
    .profile-image {
        margin: 5px auto 25px auto; /* Cut top margin in half again (10px to 5px) */
    }
    
    /* Separate blue pill (cta-button) from scroll indicator */
    .cta-button {
        margin-bottom: 30px; /* Add space below the blue pill */
    }
    
    /* Move scroll indicator further down and make it truly separate */
    .scroll-indicator {
        bottom: 15px; /* Reduced from 20px */
        margin-top: 25px; /* Add margin to separate from blue pill */
        padding: 15px 20px 10px; /* Reduced padding */
    }
    
    /* About section with proper mobile spacing */
    #about .content-section {
        padding: 30px 20px !important; /* Standard mobile section padding */
        min-height: auto !important; /* Let it size to content */
        height: auto !important; /* Let it size to content */
    }
    
    /* Make About text content compact but readable on mobile */
    .about-text {
        padding-top: 60px !important; /* 4x more space above text (15px * 4) */
        padding-right: 20px !important;
        padding-bottom: 15px !important;
        padding-left: 20px !important;
        margin: 0 10px !important; /* Reduced margin */
    }
    
    /* Minimize accent line margin in About section */
    .about-text .accent-line {
        margin: 10px auto 15px auto; /* Much smaller margins */
    }
    
    /* Professional Journey section - standard mobile spacing */
    #experience .content-section {
        /* Normal spacing - no need to pull up since About has proper padding now */
    }
}

/* Additional mobile fixes for very small screens */
@media (max-width: 480px) {
    /* Reduce profile picture spacing further on very small screens (4x less than original) */
    .profile-image {
        margin: 3px auto 20px auto; /* Cut top margin in half again (7px to 3px) */
    }
    
    /* About section with compact but proper spacing for very small screens */
    #about .content-section {
        padding: 30px 20px !important; /* Standard mobile section padding */
        min-height: auto !important; /* Let it size to content */
        height: auto !important; /* Let it size to content */
    }
    
    .about-text {
        padding-top: 48px !important; /* 4x more space above text (12px * 4) */
        padding-right: 15px !important;
        padding-bottom: 12px !important;
        padding-left: 15px !important;
        margin: 0 8px !important;
    }
    
    /* Make accent line margin minimal */
    .about-text .accent-line {
        margin: 8px auto 12px auto; /* Very small margins */
    }
    
    /* Professional Journey section - standard spacing for small screens */
    #experience .content-section {
        /* Normal spacing - no need to pull up since About has proper padding now */
    }
    
    /* Make scroll indicator more compact */
    .scroll-indicator {
        font-size: 12px; /* Smaller text */
        padding: 10px 15px 8px; /* More compact */
        bottom: 10px;
    }
}