/* Nordic-inspired minimalist design */
:root {
    /* Nordic color palette */
    --nordic-snow: #FAFAFA;
    --nordic-ice: #ECEFF4;
    --nordic-frost: #D8DEE9;
    --nordic-storm: #4C566A;
    --nordic-night: #2E3440;
    --nordic-midnight: #242933;
    --nordic-aurora-green: #A3BE8C;
    --nordic-aurora-blue: #81A1C1;
    --nordic-aurora-purple: #B48EAD;
    --nordic-aurora-orange: #D08770;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 16px;
    --line-height: 1.6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Container */
    --container-max-width: 1100px;
    
    /* Transitions */
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: var(--line-height);
    color: var(--nordic-night);
    background-color: var(--nordic-snow);
    font-weight: 400;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Navigation */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--nordic-ice);
    transition: all var(--transition-base);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Mobile Menu Toggle - Custom Hamburger */
.mobile-menu-toggle {
    display: none;
    width: 32px;
    height: 32px;
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1003;
    transition: all var(--transition-base);
}

.mobile-menu-toggle:hover {
    opacity: 0.7;
}

/* Hamburger Icon Lines */
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--nordic-storm);
    position: absolute;
    left: 4px;
    transition: all var(--transition-base);
    border-radius: 2px;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 8px;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 15px;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 22px;
}

/* Hamburger Animation to X */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 15px;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 15px;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    color: var(--nordic-storm);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--nordic-aurora-blue);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--nordic-aurora-blue);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
}

/* Hide mobile language switcher on desktop - only when screen is large */
@media (min-width: 769px) {
    .nav-links .language-switcher {
        display: none;
    }
}

.lang-link {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--nordic-storm);
    border-radius: 6px;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

.lang-link:hover {
    color: var(--nordic-aurora-blue);
    border-color: var(--nordic-aurora-blue);
}

.lang-link.active {
    background-color: var(--nordic-aurora-blue);
    color: white;
    border-color: var(--nordic-aurora-blue);
}

/* Main Content */
.main-content {
    margin-top: 60px;
    width: 100%;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--nordic-snow) 0%, var(--nordic-ice) 100%);
    position: relative;
    width: 100%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(163, 190, 140, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(129, 161, 193, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(180, 142, 173, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.profile-section {
    text-align: center;
}

.profile-image {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 4px solid var(--nordic-ice);
    box-shadow: 
        0 20px 40px rgba(46, 52, 64, 0.1),
        0 0 0 8px rgba(129, 161, 193, 0.1);
    margin-bottom: 2rem;
}

.welcome-message {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--nordic-aurora-blue), var(--nordic-aurora-purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--nordic-storm);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.hero-name {
    font-weight: 600;
    color: var(--nordic-night);
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--nordic-ice);
    color: var(--nordic-storm);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-base);
    font-weight: 500;
}

.social-link:hover {
    background-color: var(--nordic-aurora-orange);
    color: white;
    transform: translateY(-2px);
}

.social-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
}

/* Sections */
.section {
    padding: 5rem 0;
    position: relative;
    width: 100%;
}

.section:nth-child(even) {
    background: linear-gradient(135deg, var(--nordic-ice) 0%, rgba(236, 239, 244, 0.7) 100%);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--nordic-night);
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: -0.5px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--nordic-aurora-orange);
    opacity: 0.7;
    border-radius: 2px;
}

.section-intro {
    max-width: 720px;
    margin: 0 auto 3rem;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.7;
    color: var(--nordic-storm);
    text-align: center;
}

/* Research Grid */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.research-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--nordic-frost);
    transition: all var(--transition-base);
    position: relative;
}

.research-card:hover {
    box-shadow: 0 8px 24px rgba(46, 52, 64, 0.08);
    transform: translateY(-4px);
}

.research-card h3 {
    color: var(--nordic-night);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.research-card p {
    line-height: 1.7;
    color: var(--nordic-storm);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--nordic-frost);
    box-shadow: 0 2px 12px rgba(46, 52, 64, 0.06);
    transition: all var(--transition-base);
}

.project-card:hover {
    box-shadow: 0 8px 24px rgba(46, 52, 64, 0.1);
    transform: translateY(-4px);
}

.project-title {
    font-size: 1.5rem;
    color: var(--nordic-night);
    margin-bottom: 1rem;
    font-weight: 600;
}

.project-description {
    color: var(--nordic-storm);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    padding: 6px 14px;
    background-color: var(--nordic-ice);
    color: var(--nordic-storm);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--nordic-frost);
    transition: all var(--transition-base);
}

.tech-tag:hover {
    background-color: var(--nordic-aurora-blue);
    color: white;
    border-color: var(--nordic-aurora-blue);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.project-link {
    color: var(--nordic-aurora-orange);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-base);
    padding: 8px 16px;
    border: 1px solid var(--nordic-aurora-orange);
    border-radius: 6px;
    font-size: 0.9rem;
}

.project-link:hover {
    background-color: var(--nordic-aurora-orange);
    color: white;
    transform: translateY(-2px);
}

/* CV Section */
.cv-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--nordic-frost);
    max-width: 800px;
    margin: 0 auto;
}

.cv-section {
    margin-bottom: 2.5rem;
}

.cv-section h3 {
    color: var(--nordic-aurora-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--nordic-ice);
}

.cv-item {
    margin-bottom: 1.5rem;
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-item-title {
    font-weight: 600;
    color: var(--nordic-night);
    font-size: 1.1rem;
}

.cv-item-date {
    color: var(--nordic-aurora-orange);
    font-size: 0.9rem;
    opacity: 0.8;
}

.cv-item-subtitle {
    color: var(--nordic-aurora-blue);
    margin-bottom: 0.5rem;
}

.cv-download {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background-color: var(--nordic-aurora-blue);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition-base);
}

.cv-download:hover {
    background-color: var(--nordic-aurora-orange);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--nordic-night);
    color: var(--nordic-frost);
    padding: 2rem 0;
    text-align: center;
    margin-top: 5rem;
}

.footer p {
    font-size: 0.85rem;
    margin: 0;
}

.footer a {
    color: var(--nordic-aurora-blue);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navigation Mobile */
    .nav-container {
        padding: 0.75rem 1rem;
        justify-content: space-between;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(250, 250, 250, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        gap: 2rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        display: flex;
    }
    
    .nav-link {
        padding: 1rem 2rem;
        font-size: 1.2rem;
        border: none;
        width: auto;
        text-align: center;
        color: var(--nordic-night);
        font-weight: 600;
    }
    
    .nav-link:hover {
        color: var(--nordic-aurora-blue);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-links .language-switcher {
        display: flex;
        gap: 0.5rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--nordic-ice);
        justify-content: center;
        margin-left: 0;
    }
    
    /* Container */
    .container {
        padding: 0 1rem;
    }
    
    /* Hero Mobile */
    .hero {
        padding: 3rem 0;
        min-height: auto;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }
    
    .welcome-message {
        font-size: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Sections Mobile */
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .section-intro {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }
    
    /* Grids Mobile */
    .research-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .research-card,
    .project-card {
        padding: 1.5rem;
    }
    
    /* CV Mobile */
    .cv-content {
        padding: 1.5rem;
    }
    
    .cv-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Footer Mobile */
    .footer {
        margin-top: 3rem;
        padding: 1.5rem 0;
    }
}

/* Small phones */
@media (max-width: 480px) {
    :root {
        --font-size-base: 14px;
    }
    
    .profile-image {
        width: 160px;
        height: 160px;
    }
    
    .welcome-message {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    .tech-tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .social-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}