/* Template 5: Hybrid - CSS */

:root {
    --primary-color: #2a2c2e;
    --secondary-color: #4a7c8f;
    --accent-color: #4a7c8f;
    --accent-light: #8ba5b3;
    --text-color: #2a2c2e;
    --text-light: #7a8188;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Styles (from Template 1) */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    color: #ffffff;
    padding: 20px 0;
    transition: var(--transition);
}

.main-header.scrolled {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 30px;
    font-weight: 700;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.logo-svg {
    height: 80px;
    width: auto;
    display: block;
    transition: var(--transition);
}

.logo-svg tspan {
    transition: var(--transition);
}

.main-header.scrolled .logo-svg {
    height: 64px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--secondary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
}

/* Hamburger Button */
.nav-hamburguer {
    display: none;
    position: relative;
    background-color: transparent;
    border: none;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    height: 16px;
    width: 20px;
    cursor: pointer;
    transition: var(--transition);
    color: inherit;
    padding: 0;
    margin-left: 1rem;
}

.nav-hamburguer::before,
.nav-hamburguer::after {
    content: '';
    position: absolute;
    height: 2px;
    width: 100%;
    top: 50%;
    left: 50%;
    background-color: currentColor;
    transform: translate(-50%, -50%);
    transition: var(--transition);
}

.nav-hamburguer:hover {
    transform: scale(1.1);
}

.nav-hamburguer.open {
    border: none;
}

.nav-hamburguer.open::before {
    transform: translate(-50%, -50%) rotateZ(45deg);
}

.nav-hamburguer.open::after {
    transform: translate(-50%, -50%) rotateZ(-45deg);
}

/* Language Switcher */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.language-switcher .lang-btn {
    background-color: transparent;
    border: 1px solid currentColor;
    color: inherit;
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
    min-width: 50px;
}

.language-switcher .lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-switcher .lang-btn.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.main-header.scrolled .language-switcher .lang-btn.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.main-header.scrolled .language-switcher .lang-btn {
    border-color: var(--text-color);
    color: var(--text-color);
}

.main-header.scrolled .language-switcher .lang-btn:hover {
    background-color: var(--bg-light);
}

.nav-mobile .language-switcher {
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

.nav-mobile .language-switcher .lang-btn {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.nav-mobile .language-switcher .lang-btn.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Mobile Navigation */
.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 1rem 0;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 100%;
    background-color: #000000;
    transform: translateX(110%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow: hidden;
}

.nav-mobile.open {
    transform: translateX(0);
}

.nav-mobile ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 0;
    padding: 0;
    margin: 0;
}

.nav-mobile li {
    width: 100%;
}

.nav-mobile a {
    display: block;
    padding: 1rem 2rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-mobile a:hover,
.nav-mobile a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

.main-header.scrolled .nav-mobile {
    background-color: #ffffff;
}

.main-header.scrolled .nav-mobile a {
    color: var(--text-color);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.main-header.scrolled .nav-mobile a:hover,
.main-header.scrolled .nav-mobile a.active {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--secondary-color);
}

/* Hero Section (from Template 1, with black background) */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background-color: #000000;
    color: #ffffff;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    transition: opacity 0.5s ease;
}

.hero-section.scrolled .hero-overlay {
    opacity: 0.9;
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
}

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

.ant-formation-svg {
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
    transform: scale(1.5);
    transform-origin: center center;
}

.ant-formation-svg .ant-item path,
.ant-formation-svg .ant-item rect,
.ant-formation-svg .ant-item circle,
.ant-formation-svg .ant-item ellipse,
.ant-formation-svg .ant-item polygon,
.ant-formation-svg .ant-item polyline {
    transition: fill 0.3s ease, stroke 0.3s ease;
}

#antFormationContainer {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#antFormationContainer svg {
    width: 100%;
    height: auto;
    max-width: 500px;
}

.hero-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 480px;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: left;
    max-width: 600px;
    padding: 2rem;
    transition: var(--transition);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.5rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.8;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Ant Circle Animation */
.ant-circle-container {
    position: relative;
    width: 300px;
    height: 300px;
    z-index: 1;
    pointer-events: none;
}

.ant-circle-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 2;
}

.center-element {
    font-size: 12px;
    color: var(--primary-color);
    text-align: center;
    font-weight: 600;
}

.ant-item {
    position: absolute;
    width: 75px;
    height: 75px;
    left: 50%;
    top: 50%;
    will-change: transform;
}

.ant-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

/* Section Styles (from Template 2) */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.2rem;
    line-height: 1;
    color: var(--text-light);
}

/* Section Styles for non-home pages - Black header, white content */
body:not(.home-page) .section-header-wrapper {
    background-color: #000000;
    width: 100%;
    padding: 4rem 0;
}

/* Extra padding for first section title on non-home pages */
body:not(.home-page) section:first-of-type .section-header-wrapper {
    padding-top: 8rem;
}

body:not(.home-page) .section-header {
    background-color: transparent;
    color: #ffffff;
    padding: 0;
    margin-bottom: 0;
}

body:not(.home-page) .section-header h2 {
    color: #ffffff;
}

body:not(.home-page) .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

body:not(.home-page) .about-section,
body:not(.home-page) .research-preview-section {
    background-color: #ffffff;
    padding-top: 0;
    padding-bottom: 0;
}

body:not(.home-page) .about-section > .container,
body:not(.home-page) .research-preview-section > .container {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Ensure sections on non-home pages have white background */
body:not(.home-page) section {
    background-color: #ffffff;
}

/* About Section (from Template 2) */
.about-section {
    position: relative;
    z-index: 2;
    padding: 8rem 0;
    background-color: var(--bg-color);
    overflow-x: hidden; /* Only hide horizontal overflow from rotated background */
    overflow-y: visible; /* Allow vertical overflow for ant animation */
}

/* Contact section specific - prevent scrollbar */
body:not(.home-page) .about-section {
    overflow: hidden;
}

.about-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Allow clicks to pass through */
    overflow: hidden; /* Prevent background from causing scrollbars */
}

.ant-background-svg {
    width: 100%;
    height: 100%;
    opacity: 0.25; /* Almost transparent */
    overflow: hidden; /* Prevent SVG from causing scrollbars */
    max-width: 100%; /* Ensure SVG doesn't exceed container width */
}

.about-background {
    overflow: hidden; /* Prevent background from causing scrollbars */
}

.about-section .container {
    position: relative;
    z-index: 1; /* Ensure content is above background */
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    align-items: center;
}

.research-content-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.research-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.research-line-item {
    position: relative;
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: -232px; /* Shift entire item 232px to the left to align text with publications */
}

.research-line-image {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
}

.research-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.research-line-text {
    flex: 1;
    width: 100%;
    /* Text now aligns with publication cards */
}

.about-image-wrapper {
    position: relative;
}

.about-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.about-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

.about-text p {
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* Research Walking Ant */
.research-ant-wrapper {
    position: relative;
    width: 300px;
    height: 0;
    flex-shrink: 0;
    align-self: flex-start;
    pointer-events: none; /* Allow clicks to pass through wrapper */
    z-index: 0; /* Ensure wrapper doesn't create stacking context */
}

.research-walking-ant {
    position: fixed !important; /* Ensure fixed positioning */
    right: calc(1rem - 32px); /* Moved 32px to the right from original position */
    top: 0;
    width: 300px;
    height: auto;
    z-index: 1000 !important; /* Higher z-index to appear above all sections */
    pointer-events: none;
    will-change: transform;
    transition: opacity 0.3s ease;
    visibility: visible !important; /* Ensure visibility */
}

.research-walking-ant svg {
    width: 100%;
    height: auto;
    display: block;
}

.research-walking-ant svg path,
.research-walking-ant svg rect {
    fill: #000000 !important;
    stroke: #000000 !important;
}

.about-highlights {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.highlight-item {
    display: flex;
    flex-direction: column;
}

.highlight-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.highlight-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Research Preview Section (from Template 2) */
.research-preview-section {
    position: relative;
    z-index: 2;
    padding: 8rem 0;
    background-color: var(--bg-light);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.research-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.research-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.research-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.research-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.research-card-content {
    padding: 2rem;
}

.research-card-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.research-card-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.research-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.research-link:hover {
    gap: 1rem;
    color: var(--primary-color);
}

/* Footer */
.main-footer {
    position: relative;
    z-index: 1100; /* Higher than ant's z-index (1000) to ensure footer appears above ant */
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 5rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0.9;
    border-radius: 8px;
    object-fit: cover;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Social Media Icons */
.social-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.social-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.social-icon {
    width: 24px;
    height: 24px;
    transition: var(--transition);
    flex-shrink: 0;
    fill: currentColor;
}

.social-icon-researchgate {
    width: 24px;
    height: 24px;
}

.social-link:hover .social-icon {
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */

/* Base Mobile Styles (320px - 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    /* Header */
    .main-header {
        padding: 12px 0;
    }

    .main-header.scrolled {
        padding: 8px 0;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.2rem;
        flex: 0 0 auto;
    }

    .logo-svg {
        height: 32px !important;
        max-width: 150px;
    }

    .main-header.scrolled .logo-svg {
        height: 28px !important;
    }

    /* Hide desktop nav on mobile */
    .nav-desktop {
        display: none !important;
    }

    /* Show hamburger button on mobile */
    .nav-hamburguer {
        display: block;
    }

    /* Show mobile nav */
    .nav-mobile {
        display: flex;
    }

    /* Hide ant on mobile */
    .research-walking-ant {
        display: none !important;
    }

    /* Hero Section */
    .hero-section {
        min-height: 60vh;
        padding: 2rem 0;
    }

    .hero-container {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }

    .hero-left {
        order: 1;
        width: 100%;
    }

    .ant-formation-svg {
        max-width: 100%;
        transform: scale(0.8);
    }

    .hero-right {
        order: 2;
        width: 100%;
        min-width: unset;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
        line-height: 1;
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
        line-height: 1.2;
    }

    .hero-description {
        font-size: clamp(0.9rem, 4vw, 1rem);
    }

    /* About Section */
    .about-section {
        padding: 4rem 0;
    }

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

    .about-image-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
    }

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

    /* Contact page image - same max-width as about section image */
    img[src*="aryel-researching.jpeg"] {
        max-width: 300px !important;
        margin: 0 auto !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Contact page image container - center it like about section */
    [style*="position: sticky"][style*="top: 2rem"] {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        position: relative !important;
    }
    
    [style*="position: sticky"][style*="top: 2rem"] > div {
        max-width: 300px !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    /* Ensure parent grid centers the column */
    [style*="grid-template-columns: 1.5fr 1.5fr 1fr"] > div:first-child {
        display: flex !important;
        justify-content: center !important;
    }

    .about-highlights {
        flex-direction: column;
        gap: 1.5rem;
    }

    .highlight-item {
        text-align: center;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
        line-height: 1;
    }

    .section-subtitle {
        font-size: clamp(0.9rem, 4vw, 1rem);
        line-height: 1;
    }

    body:not(.home-page) .section-header-wrapper {
        padding: 3rem 0;
    }

    body:not(.home-page) section:first-of-type .section-header-wrapper {
        padding-top: 6rem;
    }

    /* Research Grid */
    .research-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .research-card {
        margin-bottom: 1rem;
    }

    /* Publications */
    .publication-item {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .publication-item h3 {
        font-size: 1.1rem;
    }

    .publication-item p {
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 1.5rem;
    }

    .footer-logo {
        max-width: 150px;
        margin: 0 auto 1rem;
    }

    .social-links {
        align-items: center;
    }

    /* Contact Form */
    .contact-form {
        padding: 1.5rem;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    input[type="text"],
    input[type="email"],
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }

    /* Education Cards */
    .education-item {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
}

/* Tablet Styles (481px - 1080px) */
@media (min-width: 481px) and (max-width: 1080px) {
    .container {
        padding: 0 1.5rem;
    }

    /* Header */
    .logo-svg {
        height: 50px;
    }

    .main-header.scrolled .logo-svg {
        height: 42px;
    }

    /* Hide desktop nav on tablet */
    .nav-desktop {
        display: none !important;
    }

    /* Show hamburger button on tablet */
    .nav-hamburguer {
        display: block;
    }

    /* Show mobile nav */
    .nav-mobile {
        display: flex;
    }

    .main-nav ul {
        gap: 1.5rem;
        font-size: 14px;
    }

    .main-nav a {
        font-size: 15px;
    }

    /* Hero Section */
    .hero-section {
        min-height: 65vh;
    }

    .hero-container {
        flex-direction: column;
        gap: 0;
        padding: 1.5rem;
    }

    .ant-formation-svg {
        max-width: 90%;
        transform: scale(1.2);
    }

    .hero-title {
        font-size: clamp(2.2rem, 6vw, 2.8rem);
        line-height: 1;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.2rem);
        line-height: 1.2;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        max-width: 80%;
        margin: 0 auto;
    }

    .about-highlights {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
    }

    /* Research Grid */
    .research-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    /* Contact */
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Desktop (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    /* Hero Section */
    .hero-container {
        gap: 0;
    }

    .ant-formation-svg {
        max-width: 450px;
        transform: scale(1.3);
    }

    /* About Section */
    .about-content {
        gap: 4rem;
        max-width: 80%;
        margin: 0 auto;
    }

    /* Research Grid */
    .research-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop (1025px+) */
@media (min-width: 1025px) {
    .ant-formation-svg {
        transform: scale(1.5);
    }
}

/* General Mobile Improvements (all mobile sizes) */
@media (max-width: 1080px) {
    /* Header - Mobile Navigation */
    .nav-desktop {
        display: none !important;
    }

    .nav-hamburguer {
        display: block;
    }

    .nav-mobile {
        display: flex;
    }

    /* Hide ant on mobile */
    .research-walking-ant {
        display: none !important;
    }

    /* Typography */
    h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.8rem, 7vw, 2.2rem);
    }

    h3 {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
    }

    p {
        font-size: clamp(0.95rem, 4vw, 1.1rem);
    }

    /* Spacing */
    section {
        padding: 3rem 0;
    }

    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Inline styles override for mobile */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    [style*="display: flex"] {
        flex-wrap: wrap;
    }

    /* Research content */
    .research-content-wrapper {
        flex-direction: column;
        gap: 2rem;
    }

    .research-content {
        max-width: 100%;
    }

    .research-line-item {
        flex-direction: column;
        gap: 1rem;
        margin-left: 0; /* Remove negative margin on mobile */
    }

    .research-line-image {
        display: none; /* Hide images on mobile */
    }

    .research-ant-wrapper {
        display: none; /* Hide decorative ant on mobile */
    }
}

/* Landscape Mobile (480px - 1080px landscape) */
@media (max-width: 1080px) and (orientation: landscape) {
    .hero-section {
        min-height: 50vh;
    }

    .hero-container {
        flex-direction: row;
        gap: 0;
    }

    .ant-formation-svg {
        max-width: 40%;
        transform: scale(1);
    }
}

    /* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .main-nav a,
    .btn,
    .social-link {
        padding: 0.75rem 1rem;
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .research-card:hover {
        transform: none;
    }
}

/* Education Cards with Logos */
.education-card-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.education-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.university-logo {
    width: 120px;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.education-info {
    flex: 1;
    min-width: 0;
}

/* Mobile: Logo on top */
@media (max-width: 768px) {
    .education-card-content {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .education-logo {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .university-logo {
        width: 100px;
        max-height: 100px;
    }
    
    .education-info {
        width: 100%;
        text-align: center;
    }
    
    .education-info > div {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .education-info > div > div[style*="text-align: right"] {
        text-align: center !important;
        margin-top: 0.5rem;
    }
}

/* Override inline styles for responsive design */
@media (max-width: 1080px) {
    /* Research page inline styles */
    .research-content-wrapper {
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .research-content {
        max-width: 100% !important;
    }

    .research-line-item {
        flex-direction: column !important;
        gap: 1rem !important;
        margin-left: 0 !important; /* Remove negative margin on mobile */
    }

    .research-line-image {
        display: none !important; /* Hide images on mobile */
    }

    /* Education page cards */
    [style*="display: flex"][style*="justify-content: space-between"] {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    [style*="text-align: right"] {
        text-align: left !important;
    }

    /* Contact page grid */
    [style*="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    /* Reduce padding on mobile */
    [style*="padding: 2.5rem"] {
        padding: 1.5rem !important;
    }

    /* Contact page responsive */
    [style*="grid-template-columns: 1fr 2fr"],
    [style*="grid-template-columns: 1fr 1.5fr 1.5fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    [style*="position: sticky"] {
        position: relative !important;
        top: 0 !important;
    }

    [style*="margin-bottom: 3rem"] {
        margin-bottom: 2rem !important;
    }

    /* Font size adjustments */
    [style*="font-size: 1.8rem"] {
        font-size: 1.4rem !important;
    }

    [style*="font-size: 1.5rem"] {
        font-size: 1.3rem !important;
    }

    [style*="font-size: 1.15rem"] {
        font-size: 1rem !important;
    }

    [style*="font-size: 1.1rem"] {
        font-size: 1rem !important;
    }
}

/* Additional responsive utilities */
@media (max-width: 480px) {
    /* Ensure all text is readable */
    body {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Stack all flex containers */
    [style*="display: flex"] {
        flex-direction: column !important;
    }
    
    /* Keep academic profiles links in row on mobile - override the above rule */
    a[style*="display: flex"][style*="align-items: center"] {
        flex-direction: row !important;
    }

    /* Full width for constrained elements */
    [style*="max-width: 900px"] {
        max-width: 100% !important;
    }
}

