/* =============================================
   MODERN PORTFOLIO WITH GLASSMORPHISM
   ============================================= */

/* CSS Variables for Themes */
:root {
    /* Light Theme */
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: rgba(0, 0, 0, 0.1);
    --orb-1: #667eea;
    --orb-2: #764ba2;
    --orb-3: #f093fb;
}

[data-theme="dark"] {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.3);
    --orb-1: #4c1d95;
    --orb-2: #312e81;
    --orb-3: #1e3a8a;
}

[data-theme="ocean"] {
    --bg-primary: #0a1929;
    --bg-secondary: #132f4c;
    --text-primary: #e3f2fd;
    --text-secondary: #90caf9;
    --accent-primary: #29b6f6;
    --accent-secondary: #00acc1;
    --glass-bg: rgba(41, 182, 246, 0.1);
    --glass-border: rgba(41, 182, 246, 0.2);
    --shadow: rgba(0, 0, 0, 0.3);
    --orb-1: #006064;
    --orb-2: #00838f;
    --orb-3: #0097a7;
}

[data-theme="sunset"] {
    --bg-primary: #1a0e0e;
    --bg-secondary: #2d1414;
    --text-primary: #ffe0b2;
    --text-secondary: #ffab91;
    --accent-primary: #ff6f00;
    --accent-secondary: #ff3d00;
    --glass-bg: rgba(255, 111, 0, 0.1);
    --glass-border: rgba(255, 111, 0, 0.2);
    --shadow: rgba(0, 0, 0, 0.4);
    --orb-1: #bf360c;
    --orb-2: #d84315;
    --orb-3: #e64a19;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
    transition: background 1s ease;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--orb-1);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--orb-2);
    bottom: -200px;
    right: -200px;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--orb-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

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

/* Glassmorphism Effect */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 var(--shadow);
    transition: all 0.3s ease;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 var(--shadow);
    transition: all 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 var(--shadow);
    border-color: var(--accent-primary);
}

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 50px;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.theme-btn:hover {
    transform: scale(1.1);
    background: var(--accent-primary);
    color: white;
}

.theme-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 20px var(--accent-primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

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

.section {
    padding: 5rem 0;
    min-height: 100vh;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title i {
    margin-right: 0.5rem;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.hero-image {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--accent-primary);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text {
    text-align: left;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.hero-affiliation {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-5px);
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--shadow);
}

.btn-secondary {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

/* About Section */
.about-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.about-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.interests-skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.interests h4,
.skills h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    list-style: none;
}

.tag {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    transform: translateY(-3px);
    background: var(--accent-primary);
    color: white;
}

/* Education Timeline */
.education-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 60px;
    bottom: -60px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    z-index: 2;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.institution {
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.3rem;
}

.date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Publications Section */
.search-bar {
    max-width: 600px;
    margin: 0 auto 3rem;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-bar i {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
}

.search-bar input::placeholder {
    color: var(--text-secondary);
}

.publications-grid {
    display: grid;
    gap: 2rem;
}

.publication-card {
    transition: all 0.4s ease;
}

.publication-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.publication-type {
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.publication-type.journal {
    background: rgba(102, 126, 234, 0.2);
    color: var(--accent-primary);
}

.publication-type.conference {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.publication-type.preprint {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.publication-year {
    font-weight: 600;
    color: var(--text-secondary);
}

.publication-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.publication-authors {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.publication-authors strong {
    color: var(--accent-primary);
}

.publication-venue {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.publication-actions {
    display: flex;
    gap: 0.8rem;
}

.pub-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.pub-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

/* Conference Talks Section */
.talks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.talk-card {
    transition: all 0.4s ease;
    padding: 1.5rem;
}

.talk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.talk-type {
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.talk-year {
    font-weight: 600;
    color: var(--text-secondary);
}

.talk-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.talk-event {
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.talk-event i {
    margin-right: 0.5rem;
}

.talk-location {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.talk-location i {
    margin-right: 0.5rem;
}

.talk-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

/* Awards Section */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.award-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.award-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.award-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.award-venue {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.award-year {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.award-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Contact Section */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-info {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--accent-primary);
    font-size: 1.3rem;
}

.contact-item a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-secondary);
}

.contact-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.contact-social-link {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.contact-social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-5px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: white;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

[data-animate] {
    opacity: 0;
}

[data-animate].animated {
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
}

[data-animate="fade-up"].animated {
    animation-name: fadeUp;
}

[data-animate="fade-up-delay"].animated {
    animation-name: fadeUp;
    animation-delay: 0.2s;
}

[data-animate="fade-up-delay-2"].animated {
    animation-name: fadeUp;
    animation-delay: 0.4s;
}

[data-animate="slide-right"].animated {
    animation-name: slideRight;
}

[data-animate="slide-right-delay"].animated {
    animation-name: slideRight;
    animation-delay: 0.2s;
}

[data-animate="slide-right-delay-2"].animated {
    animation-name: slideRight;
    animation-delay: 0.4s;
}

[data-animate="zoom-in"].animated {
    animation-name: zoomIn;
}

[data-animate="zoom-in-delay"].animated {
    animation-name: zoomIn;
    animation-delay: 0.2s;
}

[data-animate="zoom-in-delay-2"].animated {
    animation-name: zoomIn;
    animation-delay: 0.4s;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        width: 300px;
        height: 300px;
    }

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

    .hero-title {
        font-size: 2.5rem;
    }

    .social-links,
    .hero-buttons {
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        border-bottom: 1px solid var(--glass-border);
    }

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

    .mobile-menu-toggle {
        display: block;
    }

    .theme-switcher {
        top: 80px;
        flex-direction: column;
    }

    .timeline-item {
        grid-template-columns: 50px 1fr;
        gap: 1.5rem;
    }

    .timeline-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .timeline-item::before {
        left: 25px;
    }
}

@media (max-width: 600px) {
    .section-title {
        font-size: 2rem;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .awards-grid,
    .interests-skills {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================
   SERVICES SECTION
   ============================================= */

.services-section {
    min-height: auto;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-card {
    padding: 2rem;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px 0 var(--shadow);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.service-features li i {
    color: var(--accent-primary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.services-cta {
    margin-top: 3rem;
    text-align: center;
    padding: 3rem 2rem;
}

.services-cta h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.services-cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* =============================================
   COMMUNITY CONTRIBUTIONS SECTION
   ============================================= */

.community-section {
    min-height: auto;
}

.community-category {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--glass-border);
}

.category-title i {
    color: var(--accent-primary);
    font-size: 1.6rem;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.community-card {
    padding: 1.8rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.community-card.wide {
    grid-column: span 2;
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 var(--shadow);
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.community-role {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.community-role.chair {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.community-role.member {
    background: rgba(102, 126, 234, 0.2);
    color: var(--accent-primary);
}

.community-role.moderator {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.community-role.reviewer {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.community-role.expert {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
}

.community-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.community-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.community-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.community-location i {
    color: var(--accent-primary);
    font-size: 0.85rem;
}

.community-organization {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.community-organization i {
    color: var(--accent-primary);
}

.community-year {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.5rem;
}

/* =============================================
   TEACHING SECTION
   ============================================= */

.teaching-section {
    min-height: 50vh;
}

.teaching-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
}

/* =============================================
   RESPONSIVE DESIGN FOR NEW SECTIONS
   ============================================= */

@media (max-width: 968px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

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

    .community-card.wide {
        grid-column: span 1;
    }

    .services-cta {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.7rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
    }

    .category-title {
        font-size: 1.4rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .services-cta h3 {
        font-size: 1.5rem;
    }
}
