/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #b8b8b8;
    --secondary-color: #9a9a9a;
    --light-bg: #1a1a1a;
    --light-secondary: #242424;
    --text-dark: #e0e0e0;
    --text-medium: #b0b0b0;
    --text-light-gray: #909090;
    --gradient: linear-gradient(135deg, #404040 0%, #2a2a2a 100%);
    --accent-brown: #707070;
    --nav-bg: #2a2a2a;
    --mouse-x: 50%;
    --mouse-y: 50%;
    --parallax-x: 0px;
    --parallax-y: 0px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    padding-left: 80px;
    max-width: 100vw;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Navigation */
.navbar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 80px;
    z-index: 1000;
    background: #ffffff !important;
    backdrop-filter: blur(10px);
    box-shadow: 4px 0 6px rgba(0, 0, 0, 0.15);
    border-right: none;
}

.nav-container {
    height: 100%;
    padding: 2rem 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a1a1a;
    text-decoration: none;
    text-shadow: none;
    padding: 0.5rem 0;
    margin: 0;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 2.5rem;
    width: 100%;
    padding: 0;
    margin: 0;
    align-items: center;
}

.nav-link {
    color: #2a2a2a;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
    font-weight: 500;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.85rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #1a1a1a;
    transition: height 0.3s ease;
}

.nav-link:hover {
    color: #000;
    transform: rotate(180deg) scale(1.05);
}

.nav-link:hover::after {
    height: 80%;
}

.nav-link.active::after {
    height: 80%;
}

.lang-switcher {
    background: transparent;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    margin-bottom: 1rem;
    transform: rotate(-90deg);
}

.lang-switcher:hover {
    background: #1a1a1a;
    color: #ffffff;
    transform: rotate(-90deg) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #1a1a1a;
    transition: 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
    margin: 0;
    margin-left: -80px;
    padding-left: calc(80px + 2rem);
    padding-right: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at calc(100% - var(--mouse-x)) calc(100% - var(--mouse-y)), rgba(200, 200, 200, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.015) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    transition: background 0.3s ease;
}

/* Animated Background Circles */
.hero-background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04), transparent);
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 500px;
    height: 500px;
    top: -250px;
    right: -250px;
    animation-delay: 0s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: -200px;
    animation-delay: 5s;
}

.circle-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    z-index: 10;
    position: relative;
    animation: fadeInUp 1s ease;
}

.hero-image-wrapper {
    flex-shrink: 0;
    animation: fadeInLeft 1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.hero-image {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #2a2a2a;
    margin: 0;
    padding: 0;
}

.hero-image:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.hero-image img,
.hero-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.1);
}

.avatar-credit {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-medium);
    margin-top: 0.5rem;
}

.gogh-link {
    color: var(--text-medium);
    text-decoration: none;
    border-bottom: 1px solid var(--text-medium);
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

.gogh-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.hero-content {
    text-align: left;
    z-index: 2;
    animation: fadeInRight 1s ease;
    margin: 0;
    padding: 0;
}

.email-line {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.email-link {
    color: var(--text-medium);
    text-decoration: none;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: var(--primary-color);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.glitch {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 0rem;
    position: relative;
    animation: glitch 3s infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes glitch {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }
    25% {
        text-shadow: -2px 0 20px rgba(200, 200, 200, 0.25);
    }
    50% {
        text-shadow: 2px 0 20px rgba(255, 255, 255, 0.2);
    }
    75% {
        text-shadow: -2px 0 20px rgba(200, 200, 200, 0.25);
    }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 0.3rem;
    line-height: 1.5;
}

.lab-link {
    color: var(--text-medium);
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 2px solid var(--text-medium);
}

.lab-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.description {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.cta-buttons > *:not(.cta-buttons-secondary) {
    flex: 1 1 auto;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #505050 0%, #404040 100%);
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #1a1a1a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.btn-tertiary {
    background: transparent;
    border: 1px solid var(--text-medium);
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.75rem;
    padding: 8px 12px;
    flex: 1 1 33.333%;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
}

.btn-tertiary:hover {
    background: var(--text-medium);
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.15);
}

.cta-buttons-secondary {
    margin: 1rem auto 0;
    padding: 0;
    gap: 0.5rem;
    max-width: 420px;
    flex-wrap: nowrap;
    display: flex;
}

/* Normalize dropdown width to match .btn-tertiary */
.btn-dropdown {
    flex: 1 1 33.333%;
    min-width: 0;
    max-width: calc(33.333% - 0.33rem);
}

.btn-dropdown button {
    width: 100%;
    padding: 8px 12px;      /* matches .btn-tertiary */
    white-space: nowrap;    /* prevents growth */
}

.cta-buttons-secondary > * {
    flex: 1 1 0 !important;
    max-width: calc(33.333% - 0.33rem);
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0px;
    margin: 0;
}

.btn-dropdown {
    position: relative;
    flex: 1 1 33.333%;
    min-width: 0;
}

.btn-dropdown button {
    width: 100%;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    flex-direction: column;
    gap: 0.3rem;
    padding-top: 0.4rem;
}

.btn-dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: flex;
}

.dropdown-content a {
    background: transparent;
    border: 1px solid var(--text-medium);
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    padding: 6px 10px;
    border-radius: 50px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background: var(--text-medium);
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.15);
}

/* Animated Background Circles */
.hero-background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04), transparent);
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 500px;
    height: 500px;
    top: -250px;
    right: -250px;
    animation-delay: 0s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: -200px;
    animation-delay: 5s;
}

.circle-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

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

/* About Me Section */
.about-me {
    padding: 5rem 0;
    background: var(--light-secondary);
    position: relative;
    margin: 0;
    margin-left: -80px;
    padding-left: calc(80px + 2rem);
    padding-right: 2rem;
}

.about-me-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    box-sizing: border-box;
}

.about-text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.about-text p {
    font-size: 1rem;
    color: var(--text-medium);
    margin: 0 0 1.5rem 0;
    padding: 0;
    line-height: 1.7;
    text-align: justify;
}

.about-text a {
    color: var(--text-medium);
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 2px solid var(--text-medium);
}

.about-text a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.about-image {
    width: 350px;
    height: auto;
    border-radius: 10px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

/* Research Section */
.research {
    padding: 6rem 0;
    background: var(--light-bg);
    position: relative;
    margin: 0;
    margin-left: -80px;
    padding-left: calc(80px + 2rem);
    padding-right: 2rem;
}

.research-intro-blurb {
    text-align: left;
    font-size: 1.05rem;
    color: var(--text-medium);
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 0;
    line-height: 1.7;
}

.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.research-story {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.research-story-title {
    font-size: 1.3rem;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 1rem 0;
    padding: 0;
    text-align: center;
}

.research-plot-container {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--light-bg);
    margin: 0;
    padding: 0;
}

.research-plot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    margin: 0;
}

.research-plot.active {
    opacity: 1;
    z-index: 1;
}

.research-plot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    margin: 0;
    padding: 0;
}

.research-timeline {
    position: relative;
    padding: 1.5rem 0;
    margin: 0.5rem 0 0 0;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--text-light-gray);
    transform: translateY(-50%);
}

.timeline-dots {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0 10%;
    margin: 0;
    z-index: 2;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--light-secondary);
    border: 3px solid var(--text-light-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin: 0;
    padding: 0;
}

.timeline-dot:hover {
    transform: scale(1.2);
    border-color: var(--primary-color);
}

.timeline-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(184, 184, 184, 0.2);
}

/* Skills Section */
.skills {
    padding: 5rem 0;
    background: var(--light-secondary);
    position: relative;
    overflow: visible;
    margin: 0;
    margin-left: -80px;
    padding-left: calc(80px + 2rem);
    padding-right: 2rem;
}


.section-title {
    font-size: 3rem;
    text-align: center;
    margin: 0 0 3rem 0;
    padding: 0;
    color: var(--text-dark);
}

.skills-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
    transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1), gap 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: grid-template-columns, gap;
}

.skills-content.skills-expanded {
    grid-template-columns: 0fr 1fr;
    gap: 0;
}

.skills-content.skills-deeply-expanded {
    grid-template-columns: 0fr 1fr;
    gap: 0;
}

.skills-text {
    transition: opacity 0.5s ease;
    overflow: hidden;
    min-width: 0;
}

.skills-content.skills-expanded .skills-text,
.skills-content.skills-deeply-expanded .skills-text {
    opacity: 0;
    visibility: hidden;
}

.skills-text p {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin: 0 0 1.5rem 0;
    padding: 0;
    line-height: 1.7;
    text-align: justify;
}

/* Interactive Skill Domains */
.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-self: center;
    transition: align-self 0.5s ease;
}

.skills-content.skills-expanded .skills-container,
.skills-content.skills-deeply-expanded .skills-container {
    align-self: start;
}

/* Main Domain Buttons */
.skill-domain {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.skill-domain:first-child {
    align-items: flex-end;
}

.domain-header {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: var(--gradient);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    user-select: none;
    box-shadow: 0 4px 15px rgba(61, 61, 61, 0.2);
    width: 70%;
    max-width: 350px;
    will-change: width, max-width;
}

.skill-domain.expanded .domain-header {
    width: 100%;
    max-width: none;
}

.domain-header:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, #505050 0%, #383838 100%);
}

.domain-name {
    flex-grow: 1;
    font-weight: 600;
    font-size: 1.2rem;
    white-space: nowrap;
}

.domain-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    opacity: 0;
    will-change: max-height, opacity;
}

.skill-domain.expanded .domain-content {
    max-height: 3000px;
    margin-top: 1rem;
    overflow: visible;
    opacity: 1;
}

/* Category Buttons (Second Level) */
.skill-category {
    display: flex;
    flex-direction: column;
    margin-left: 1.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.3rem;
    background: var(--gradient);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    user-select: none;
    box-shadow: 0 3px 10px rgba(61, 61, 61, 0.15);
    opacity: 0.9;
    width: 70%;
    max-width: 350px;
    will-change: width, max-width;
}

.skill-category.expanded .category-header {
    width: 100%;
    max-width: none;
}

.category-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
    opacity: 1;
}

.category-name {
    flex-grow: 1;
    font-weight: 500;
    font-size: 1rem;
    padding-left: 0.2rem;
    white-space: nowrap;
}

.expand-icon {
    font-size: 1.3rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.skill-domain.expanded > .domain-header .expand-icon {
    transform: rotate(45deg);
}

.skill-category.expanded > .category-header .expand-icon {
    transform: rotate(45deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0.5rem;
    opacity: 0;
    will-change: max-height, opacity;
}

.skill-category.expanded .category-content {
    max-height: 2000px;
    margin-top: 0.8rem;
    overflow: visible;
    opacity: 1;
}

/* Subcategory Level (Third Level) */
.skill-subcategory {
    display: flex;
    flex-direction: column;
    margin-left: 1.5rem;
}

.subcategory-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--gradient);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    user-select: none;
    box-shadow: 0 2px 8px rgba(61, 61, 61, 0.15);
    width: 75%;
    max-width: 280px;
    will-change: width, max-width;
}

.skill-subcategory.expanded .subcategory-header {
    width: 100%;
    max-width: none;
}

.subcategory-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, #505050 0%, #383838 100%);
}

.subcategory-name {
    flex-grow: 1;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
}

.subcategory-header .expand-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.skill-subcategory.expanded > .subcategory-header .expand-icon {
    transform: rotate(45deg);
}

.subcategory-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    opacity: 0;
    margin-left: 1.5rem;
    will-change: max-height, opacity;
}

.skill-subcategory.expanded .subcategory-content {
    max-height: 1000px;
    margin-top: 0.6rem;
    overflow: visible;
    opacity: 1;
}

/* Skill Tags */
.skill-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gradient);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 2px 8px rgba(61, 61, 61, 0.15);
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, #505050 0%, #383838 100%);
}

/* Light background variant for specific skills */
.skill-tag-light {
    background: linear-gradient(135deg, #5a5a5a 0%, #6a6a6a 100%);
    color: #d0d0d0;
}

.skill-tag-light:hover {
    background: linear-gradient(135deg, #6a6a6a 0%, #7a7a7a 100%);
}

/* Wrapper for skill tags to enable proper wrapping */
.category-content > .skill-tag {
    margin: 0;
    flex-shrink: 0;
    margin-left: 1.5rem;
    width: fit-content;
    max-width: 75%;
}


/* Publications Section */
.projects {
    padding: 6rem 0;
    background: var(--light-bg);
    position: relative;
    margin: 0;
    margin-left: -80px;
    padding-left: calc(80px + 2rem);
    padding-right: 2rem;
}

.projects::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.02), transparent);
    pointer-events: none;
}

.publications-list {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.publication-item {
    display: flex;
    gap: 1rem;
    margin: 0 0 2rem 0;
    padding: 0;
    align-items: flex-start;
}

.publication-number {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    flex-shrink: 0;
    min-width: 2rem;
    margin: 0;
    padding: 0;
}

.publication-text {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.7;
    text-align: justify;
    margin: 0;
    padding: 0;
}

.publication-text strong {
    color: var(--text-dark);
    font-weight: 600;
}

.publication-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.publication-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1000px;
}

.project-card {
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    will-change: transform;
    transform-style: preserve-3d;
}

.project-card:hover {
    transform: translateY(-10px) rotateY(0deg) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, #a0826d 0%, #8b6f5e 100%);
    overflow: hidden;
}

.project-card:nth-child(2) .project-image {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.project-card:nth-child(3) .project-image {
    background: linear-gradient(135deg, #6b5d52 0%, #4a4238 100%);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 240, 235, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.project-overlay p {
    color: var(--text-medium);
    text-align: center;
    margin-bottom: 1rem;
}

.project-link {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* Visualizations Section */
.visualizations {
    padding: 0;
    background: var(--light-secondary);
    position: relative;
    margin: 0;
    margin-left: -80px;
    padding-left: calc(80px + 2rem);
    padding-right: 0;
}

.visualizations .container {
    max-width: none;
    padding: 0;
    margin: 0;
}

.visualizations .section-title {
    padding: 5rem 0 0 0;
    margin: 0 0 0.5rem 0;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
    padding: 0 2rem 2rem 0;
    line-height: 1.6;
}

.viz-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.viz-card {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: none;
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    align-items: center;
    padding: 2rem 0;
    margin: 0;
}

.viz-card:hover {
    transform: none;
    box-shadow: none;
}

.viz-container {
    flex: 1.2;
    padding: 0;
    margin: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viz-info {
    flex: 0.8;
    padding: 1rem 2rem 1rem 1rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
}

.viz-header {
    margin: 0 0 1.5rem 0;
    padding: 0;
}

.viz-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    padding: 0;
    font-weight: 600;
}

.viz-header p {
    font-size: 1rem;
    color: var(--text-medium);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.viz-iframe {
    width: 100%;
    height: 90vh;
    max-height: 1000px;
    border: none;
    border-radius: 8px;
    margin: 0;
    padding: 0;
}

.viz-image {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    object-position: center center;
    border-radius: 8px;
    margin: 0;
    padding: 0;
}

.viz-footer {
    padding: 1rem 0 0 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.viz-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--gradient);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    padding: 100px 20px;
    background: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 200, 200, 0.02), transparent);
    pointer-events: none;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: #2a2a2a;
    border: 2px solid rgba(138, 138, 138, 0.3);
    border-radius: 10px;
    color: var(--text-dark);
    font-size: 1rem;
    transition: border 0.3s ease;
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.info-item p {
    color: var(--text-medium);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    padding: 10px 20px;
    background: #2a2a2a;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 10px;
    border: 2px solid rgba(138, 138, 138, 0.3);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
}

/* Footer */
.footer {
    padding: 2rem 2rem 2rem calc(2rem + 80px);
    margin: 0;
    margin-left: -80px;
    text-align: center;
    background: var(--light-bg);
    color: var(--text-medium);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
        padding-left: 0;
        margin: 0;
    }

    body::before {
        left: 0;
        width: 100%;
    }

    .navbar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
        border-right: none;
        border-bottom: 1px solid rgba(80, 80, 80, 0.3);
        margin: 0;
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        margin: 0;
        gap: 0;
    }

    .logo {
        font-size: 1.5rem;
        padding: 0;
        margin: 0;
    }

    .lang-switcher {
        position: absolute;
        right: 70px;
        top: 50%;
        transform: translateY(-50%) rotate(-90deg);
        margin: 0;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(36, 36, 36, 0.98) 100%);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
        gap: 1.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 0.5rem 0;
    }

    .nav-link::after {
        display: none;
    }

    .hero {
        padding: 5rem 1.25rem 2rem;
        margin: 0;
        margin-left: 0;
    }

    .hero-container {
        flex-direction: column;
        gap: 2rem;
        padding: 0;
        margin: 0 auto;
        text-align: center;
    }

    .hero-image,
    .hero-image img,
    .hero-image video {
        width: min(250px, 80vw);
        height: min(250px, 80vw);
    }

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

    .email-line {
        text-align: center;
        font-size: 1rem;
    }

    .avatar-credit {
        font-size: 0.7rem;
    }

    .glitch {
        font-size: 2.5rem;
    }

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

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

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

    .viz-card {
        flex-direction: column;
    }

    .viz-container {
        min-height: 300px;
    }

    .viz-iframe {
        height: min(500px, 60vh);
    }

    .viz-info {
        padding: 1.5rem;
    }

    .viz-image {
        max-height: min(400px, 50vh);
    }

    .publication-text {
        text-align: left;
        font-size: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .skills-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-domain:first-child {
        align-items: flex-start;
    }

    .domain-header {
        width: 85%;
        max-width: none;
    }

    .category-header {
        width: 90%;
        max-width: none;
    }

    .subcategory-header {
        width: 90%;
        max-width: none;
    }

    .domain-name,
    .category-name,
    .subcategory-name {
        white-space: normal;
        overflow-wrap: break-word;
    }

    .skill-category {
        margin-left: 1rem;
    }

    .skill-subcategory {
        margin-left: 1rem;
    }

    .category-content > .skill-tag {
        margin-left: 1rem;
    }

    .subcategory-content {
        margin-left: 1rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .research-plot-container {
        height: auto;
        min-height: 350px;
    }

    .research-plot img {
        max-height: 250px;
    }

    .about-me-content {
        margin: 0 auto;
        padding: 0 1.25rem;
        max-width: 100%;
        flex-direction: column;
    }

    .about-me-content p {
        text-align: left;
        font-size: 1rem;
        margin: 0 0 1.5rem 0;
    }

    .about-image {
        width: 100%;
        max-width: 350px;
        height: auto;
        margin: 0;
        padding: 0;
    }

    /* Fix section margins for mobile */
    .hero,
    .about-me,
    .research,
    .about,
    .projects,
    .visualizations {
        margin: 0;
        margin-left: 0;
        padding: 5rem 1.25rem;
    }

    .visualizations {
        padding: 0;
        padding-left: 1.25rem;
    }

    .footer {
        margin: 0;
        margin-left: 0;
        padding: 2rem 1.25rem;
    }

    /* Fix button row wrapping and sizing */
    .cta-buttons-secondary {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin: 1rem auto 0;
        padding: 0;
        max-width: 100%;
    }

    .cta-buttons-secondary > * {
        height: 44px;
        min-height: 44px;
        margin: 0;
        padding: 10px 0px;
    }

    .btn-primary,
    .btn-secondary {
        min-height: 44px;
        margin: 0;
        padding: 12px 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-tertiary {
        height: 44px;
        min-height: 44px;
        font-size: 0.8rem;
        padding: 10px 14px;
        margin: 0;
    }

    /* Larger touch targets for timeline dots */
    .timeline-dot {
        width: 32px;
        height: 32px;
        border-width: 4px;
        margin: 0;
        padding: 0;
    }

    .timeline-dot.active::after {
        width: 14px;
        height: 14px;
    }

    /* Fix visualization card heights */
    .viz-card {
        min-height: auto;
        padding: 2rem 0;
        margin: 0;
    }

    .viz-iframe {
        height: min(500px, 60vh);
        margin: 0;
        padding: 0;
    }

    .viz-image {
        max-height: min(400px, 50vh);
        margin: 0;
        padding: 0;
    }

    .viz-info {
        padding: 1.5rem 1.25rem;
        margin: 0;
    }


    /* Ensure horizontal scroll prevention */
    html {
        overflow-x: hidden;
    }
}

/* Small phones breakpoint */
@media (max-width: 375px) {
    .glitch {
        font-size: 2rem;
    }

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

    .hero-image,
    .hero-image img,
    .hero-image video {
        width: 200px;
        height: 200px;
    }

    .cta-buttons-secondary {
        max-width: 100%;
    }

    .btn-tertiary {
        font-size: 0.7rem;
        padding: 8px 10px;
    }
}
