/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
    /* Colors: deep teal / mint theme (distinct from previous palettes) */
    --primary-color: #18a999;
    --secondary-color: #052023;
    --accent-color: #18a999;
    --dark-bg: #031f23; /* page background */
    --light-text: #e6f5f4; /* main text color */
    --gray-text: #9cc3bf; /* secondary text */
    --card-bg: #072a2c; /* card background */
    --gradient-1: linear-gradient(135deg, #18a999 0%, #0b8f86 100%);
    --gradient-2: linear-gradient(135deg, #04262a 0%, #031f23 100%);
    --gradient-3: linear-gradient(135deg, #18a999 0%, #11b8a6 100%);
    --gradient-4: linear-gradient(135deg, #0b8f86 0%, #072a2c 100%);
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 40px;
    --header-height: 68px;

    /* Transitions */
    --transition-smooth: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.38s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Shadows */
    --shadow-sm: 0 6px 18px rgba(2, 18, 19, 0.45);
    --shadow-md: 0 10px 30px rgba(2, 18, 19, 0.5);
    --shadow-lg: 0 20px 60px rgba(2, 18, 19, 0.6);
    --shadow-glow: 0 0 30px rgba(24, 169, 153, 0.12);
    --shadow-card: 0 8px 24px rgba(2, 18, 19, 0.5), 0 2px 8px rgba(2,18,19,0.35);
    --shadow-hover: 0 10px 40px rgba(24,169,153,0.08), 0 4px 12px rgba(2,18,19,0.35);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1rem);
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===========================
   Page Header
   =========================== */
.page-header {
    padding: 1.25rem 0;
    background: rgba(3, 31, 35, 0.95);
    text-align: left;
    position: sticky;
    top: var(--header-height);
    z-index: 900;
    overflow: visible;
    border-bottom: 1px solid rgba(24, 169, 153, 0.1);
    box-shadow: 0 10px 30px rgba(2, 18, 19, 0.24);
    backdrop-filter: blur(14px);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(24, 169, 153, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: clamp(1.45rem, 2.3vw, 2.25rem);
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 0.25rem;
    line-height: 1.15;
}

.page-subtitle {
    font-size: clamp(0.88rem, 1.3vw, 1rem);
    color: var(--gray-text);
    line-height: 1.45;
}

/* ===========================
   Highlight Box
   =========================== */
.details-title {
    font-size: 1rem;
    color: var(--light-text);
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.details-text {
    color: var(--gray-text);
    margin-bottom: 0.5rem;
}

.details-list {
    list-style: disc;
    margin-left: 1.25rem;
    color: var(--gray-text);
    margin-bottom: 0.75rem;
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    width: 100%;
    background: rgba(3,31,35,0.96);
    z-index: 1000;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(24,169,153,0.06);
}

/* Skip link (accessible) */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -48px;
    background: var(--primary-color);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    z-index: 1200;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
    outline: none;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    backdrop-filter: blur(8px);
}

/* Ensure page content doesn't sit under the fixed header */
main {
    padding-top: var(--header-height);
}

.navbar.scrolled {
    background: rgba(2,18,19,0.98);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(24,169,153,0.12);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.logo:hover {
    opacity: 0.9;
}

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

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition-smooth);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: transparent;
    border: 0;
    padding: 0.35rem;
    color: inherit;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--light-text);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #031f23 0%, #072a2c 50%, #072a2c 100%);
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(24, 169, 153, 0.08) 0%, transparent 50%);
}

.animated-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.08;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--gradient-1);
    top: 10%;
    left: 10%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--gradient-2);
    top: 50%;
    right: 10%;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: var(--gradient-3);
    bottom: 10%;
    left: 20%;
}

.shape-4 {
    width: 250px;
    height: 250px;
    background: var(--gradient-4);
    bottom: 20%;
    right: 30%;
}

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

.hero-text {
}

.greeting {
    display: block;
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.name {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--light-text);
    box-shadow: 0 4px 20px rgba(24, 169, 153, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 48px rgba(24, 169, 153, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--light-text);
    border: 2px solid var(--primary-color);
}

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-top: 1rem;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--light-text);
}

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

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(24, 169, 153, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.social-links a:hover {
    background: var(--gradient-1);
    border-color: var(--primary-color);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: min(100%, 400px);
    padding: 0.75rem;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(24, 169, 153, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(24, 169, 153, 0.18);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.image-wrapper-slideshow {
    width: min(100%, 700px);
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 20px;
    border: 0;
    box-shadow: none;
    position: relative;
    z-index: 2;
}

.hero-slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(3, 31, 35, 0.7);
}

.hero-slideshow .hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    z-index: 1;
}

.hero-slideshow .hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.slideshow-controls {
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    pointer-events: none;
}

.slideshow-dots {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.45rem;
    border-radius: 999px;
    background: rgba(3, 31, 35, 0.66);
    border: 1px solid rgba(230, 245, 244, 0.14);
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.slideshow-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(230, 245, 244, 0.48);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.slideshow-dot.is-active {
    width: 22px;
    background: var(--primary-color);
}

.slideshow-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(230, 245, 244, 0.18);
    border-radius: 50%;
    background: rgba(3, 31, 35, 0.72);
    color: var(--light-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.slideshow-toggle:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

.slideshow-toggle i {
    font-size: 0.82rem;
}

.image-border {
    display: none;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: none;
}

.scroll-indicator a {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--light-text);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span {
    display: block;
    width: 6px;
    height: 6px;
    background: var(--light-text);
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span:nth-child(2) {
    top: 20px;
}

.scroll-indicator span:nth-child(3) {
    top: 30px;
}

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

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

/* ===========================
   Section Styling
   =========================== */
section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.title-underline {
    width: 80px;
    height: 5px;
    background: var(--gradient-1);
    margin: 0 auto;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(24, 169, 153, 0.4);
}

.section-subtitle {
    color: var(--gray-text);
    font-size: 1.1rem;
    margin-top: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   About Section
   =========================== */
.about {
    background: transparent;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    text-align: center;
    margin-bottom: 2.5rem;
}

.intro-text {
    font-size: 1.3rem;
    color: var(--light-text);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--gray-text);
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* About Highlights */
.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.highlight-item {
    display: block;
}

.highlight-icon {
    display: none;
}

.highlight-body h4 {
    font-size: 1.05rem;
    color: var(--light-text);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.highlight-body p {
    color: var(--gray-text);
    font-size: 0.97rem;
    line-height: 1.75;
    margin: 0;
}

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

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    border: none;
}

.stat-card:hover {
    border: none;
}

.stat-icon {
    font-size: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-text);
    font-size: 0.95rem;
}

/* ===========================
   Education Section
   =========================== */
.education {
    background: transparent;
}

.timeline {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-1);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 50px;
}

.timeline-icon {
    position: absolute;
    left: -30px;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    box-shadow: 0 0 20px rgba(24, 169, 153, 0.4);
}

.timeline-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: none;
}

.timeline-content:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(145deg, var(--card-bg), rgba(24,169,153,0.04));
}

.timeline-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--gradient-1);
    color: var(--light-text);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

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

.duration {
    color: var(--gray-text);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.description {
    color: var(--gray-text);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.4rem 1rem;
    background: rgba(24, 169, 153, 0.15);
    color: var(--light-text);
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(24, 169, 153, 0.3);
    transition: var(--transition-smooth);
    font-weight: 500;
}

.tag:hover {
    background: rgba(24, 169, 153, 0.25);
    transform: translateY(-2px);
    border-color: rgba(24, 169, 153, 0.5);
    box-shadow: 0 2px 8px rgba(24, 169, 153, 0.2);
}

/* Education Grid Layout */
.education-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 100%;
    margin: 0 auto;
}

body.education-page .education .container {
    max-width: 100%;
    padding: 0 2rem;
}

.education-card {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(24,169,153,0.04);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.education-card::before {
    display: none;
}

.education-card:hover::before {
    display: none;
}

.education-card:hover {
    background: var(--card-bg);
    border: none;
}

.education-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.education-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 1rem;
    background: var(--gradient-1);
    color: var(--light-text);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
    letter-spacing: 0.03em;
}

.education-card h3 {
    font-size: 1.25rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 700;
}

/* ===========================
   Research Section
   =========================== */
.research {
    background: transparent;
}

.research-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.research-categories {
    max-width: 100%;
    margin: 0 auto;
}

.research-category {
    margin-bottom: 2.5rem;
}

.category-title {
    font-size: 1.8rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-title i {
    color: var(--primary-color);
}

.research-grid {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0 auto;
}

.research-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: none;
    position: relative;
    overflow: hidden;
}

.research-card::before {
    display: none;
}

.research-card:hover::before {
    display: none;
}

.research-card:hover {
    border: none;
    background: var(--card-bg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-header h4 {
    font-size: 1.4rem;
    color: var(--light-text);
    flex: 1;
}

.status-badge {
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-badge.ongoing {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--light-text);
}

.status-badge.planned {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: var(--light-text);
}

.status-badge.upcoming {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: var(--light-text);
}

.status-badge.active {
    background: linear-gradient(135deg, #0a66c2 0%, #1e3a5f 100%);
    color: var(--light-text);
}

.status-badge.current {
    background: linear-gradient(135deg, #0a66c2 0%, #1e3a5f 100%);
    color: var(--light-text);
}

/* Scholar Section */
.scholar-section {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: none;
}

.scholar-text {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.scholar-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

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

.scholar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
}

.status-badge.completed {
    background: rgba(136, 132, 128, 0.1);
    color: var(--gray-text);
    border: 1px solid rgba(136, 132, 128, 0.2);
}

/* ===========================
   Experience Section
   =========================== */
.experience {
    background: transparent;
}

.experience-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 100%;
    margin: 0 auto;
}

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

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

.column-title i {
    color: var(--primary-color);
}

.experience-tabs {
    max-width: 100%;
    margin: 0 auto;
}

.tabs-header {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 1rem 2rem;
    background: transparent;
    color: var(--gray-text);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--gradient-1);
    color: var(--light-text);
    border-color: transparent;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.experience-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 100%;
    margin: 0;
}

/* Experience Row Layout */
.experience-row {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0 auto;
}

/* Academic and Industry Experience grid layouts */
body.academic-experience-page .experience .container {
    max-width: 100%;
    padding: 0 2rem;
}

body.academic-experience-page .experience-row,
.academic-experience-section .experience-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

body.industry-experience-page .experience .container {
    max-width: 100%;
    padding: 0 2rem;
}

body.industry-experience-page .experience-row,
.industry-experience-section .experience-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Responsive adjustments for experience grids */
@media (max-width: 1200px) {
    body.academic-experience-page .experience-row,
    .academic-experience-section .experience-row,
    body.industry-experience-page .experience-row,
    .industry-experience-section .experience-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.experience-row .experience-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    grid-template-columns: none;
}

.experience-row .card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--light-text);
    flex-shrink: 0;
}

.experience-row .experience-card:hover {
}

.experience-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,0.06);
    color: var(--light-text);
}

.experience-card:hover {
    background: var(--card-bg);
}

.card-icon {
    display: none;
}

.card-content h4 {
    font-size: 1.25rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.4;
}

/* ===========================
   Contact Section
   =========================== */
.contact {
    background: transparent;
}

/* ===========================
   Education, Academic & Industry Experience Sections
   =========================== */
.education-section,
.academic-experience-section,
.industry-experience-section {
    padding: 60px 0;
    background: transparent;
}

.industry-experience-section {
    background: transparent;
}

.cards-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.cards-grid.three-columns {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.cards-grid.two-columns {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

.info-card {
    background: var(--card-bg);
    padding: 2.25rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.info-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.info-card:hover::after {
    transform: scaleX(1);
}

.info-card:hover {
    transform: translateY(-8px);
    border-color: rgba(24, 169, 153, 0.3);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(160deg, var(--card-bg), rgba(24, 169, 153, 0.07));
}

.info-card .card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--light-text);
    margin-bottom: 0.25rem;
    box-shadow: 0 4px 18px rgba(24, 169, 153, 0.35);
    transition: var(--transition-smooth);
}

.info-card:hover .card-icon {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(24, 169, 153, 0.5);
}

.info-card h3 {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 0.2rem;
    font-weight: 700;
    line-height: 1.4;
}

.info-card .institution {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.info-card .period {
    color: var(--gray-text);
    font-size: 0.95rem;
    font-style: italic;
}

.info-card .description {
    color: var(--gray-text);
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive Design for Cards */
@media (max-width: 992px) {
    .cards-grid.three-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cards-grid.three-columns,
    .cards-grid.two-columns {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 1.5rem;
    }
}

/* ===========================
   Quick Access / Explore Section
   =========================== */
.quick-access {
    background: transparent;
    padding: var(--section-padding);
}

.access-grid {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0 auto;
}

.access-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    color: var(--light-text);
    transition: var(--transition-smooth);
}

.access-card:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.access-card:hover {
    color: var(--primary-color);
}

.access-icon {
    display: none;
}

.access-body {
    flex: 1;
}

.access-card h3 {
    font-size: 1.05rem;
    color: var(--light-text);
    margin-bottom: 0.3rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.access-card:hover h3 {
    color: var(--primary-color);
}

.access-card p {
    color: var(--gray-text);
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
}

.access-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(24, 169, 153, 0.12);
    color: var(--primary-color);
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.access-card:hover .access-arrow {
    background: var(--gradient-1);
    color: #fff;
    transform: translateX(4px);
}

/* ===========================
   Contact Section
   =========================== */

.contact-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Contact Form Section - Now at top */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    border: none;
    order: -1;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.info-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: none;
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(24, 169, 153, 0.25), 0 0 40px rgba(24, 169, 153, 0.1);
    background: linear-gradient(145deg, var(--card-bg), rgba(24, 169, 153, 0.07));
}

.info-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--light-text);
    margin: 0 auto 1rem;
}

.info-card h4 {
    font-size: 1.3rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--gray-text);
    line-height: 1.6;
}

.contact-social {
    text-align: center;
}

.contact-social h3 {
    font-size: 2rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

.social-grid {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0 auto;
}

.social-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    color: var(--light-text);
    transition: var(--transition-smooth);
}

.social-card:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.social-card i {
    font-size: 1.4rem;
    color: var(--primary-color);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.social-card span {
    font-weight: 600;
    font-size: 1rem;
    min-width: 120px;
}

.social-card:hover {
    color: var(--primary-color);
}

.social-intro {
    color: var(--gray-text);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.social-detail {
    font-size: 0.9rem;
    color: var(--gray-text);
    margin-top: 0.5rem;
}

.info-detail {
    font-size: 0.9rem;
    color: var(--gray-text);
    margin-top: 0.5rem;
    font-style: italic;
}

.contact-form h3 {
    font-size: 2rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-intro {
    color: var(--gray-text);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--light-text);
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--primary-color);
    width: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(17, 17, 17, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--light-text);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(26, 26, 46, 0.8);
    box-shadow: 0 0 0 3px rgba(24, 169, 153, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-text);
    opacity: 0.7;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form button[type="submit"] {
    margin-top: 1rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    align-self: center;
    min-width: 200px;
}

.contact-form button[type="submit"]:hover {
    transform: translateY(-3px);
}

/* Contact CTA Section */
.contact-cta {
    margin-top: 2.5rem;
}

.cta-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: none;
    text-align: center;
}

.cta-box:hover {
    border: none;
}

.cta-box h3 {
    font-size: 2rem;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.cta-box > p {
    color: var(--gray-text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-topics {
    background: rgba(24, 169, 153, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem auto;
    max-width: 600px;
}

.cta-topics h4 {
    color: var(--light-text);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.cta-topics ul {
    list-style: none;
    text-align: left;
}

.cta-topics ul li {
    color: var(--gray-text);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cta-topics ul li i {
    color: var(--primary-color);
}

.cta-box .btn {
    margin-top: 1.5rem;
}

/* ===========================
   Gallery Page
   =========================== */
.gallery-section {
    padding: var(--section-padding);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 1.5rem;
    align-items: stretch;
    justify-items: stretch;
}

.gallery-item {
    margin: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    background: var(--card-bg);
    border: 1px solid rgba(24, 169, 153, 0.14);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100%;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    background: rgba(24, 169, 153, 0.08);
}

.gallery-lightbox-trigger {
    width: 100%;
    height: 100%;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    overflow: hidden;
}

.gallery-item .gallery-images {
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    background: rgba(24, 169, 153, 0.05);
}

.gallery-item .gallery-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
}

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

.gallery-item figcaption {
    padding: 1rem 1.1rem 1.2rem;
    width: 100%;
    box-sizing: border-box;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.gallery-item h3 {
    font-size: 1.05rem;
    color: var(--light-text);
    margin-bottom: 0;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.gallery-item p {
    color: var(--gray-text);
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

body.lightbox-open {
    overflow: hidden;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 5.5rem 3.5rem;
    background: rgba(1, 14, 16, 0.96);
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox__figure {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.gallery-lightbox__image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 9rem);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox__caption {
    max-width: min(100%, 1100px);
    color: var(--light-text);
    font-size: 0.98rem;
    line-height: 1.5;
    text-align: center;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
    position: fixed;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(230, 245, 244, 0.2);
    border-radius: 50%;
    background: rgba(3, 31, 35, 0.82);
    color: var(--light-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover {
    background: var(--primary-color);
    transform: scale(1.04);
}

.gallery-lightbox__close {
    top: 1.25rem;
    right: 1.25rem;
}

.gallery-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox__nav:hover {
    transform: translateY(-50%) scale(1.04);
}

.gallery-lightbox__nav--prev {
    left: 1.25rem;
}

.gallery-lightbox__nav--next {
    right: 1.25rem;
}

.gallery-lightbox__nav[hidden] {
    display: none;
}

@media (max-width: 768px) {
    .gallery-lightbox {
        padding: 4.25rem 1rem 2rem;
    }

    .gallery-lightbox__image {
        max-height: calc(100vh - 8.5rem);
    }

    .gallery-lightbox__nav {
        width: 38px;
        height: 38px;
    }

    .gallery-lightbox__nav--prev {
        left: 0.75rem;
    }

    .gallery-lightbox__nav--next {
        right: 0.75rem;
    }
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: linear-gradient(180deg, #072a2c 0%, #031f23 100%);
    padding: 1.5rem 0 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    padding-bottom: 1rem;
}

.footer-brand h3 {
    font-size: 1.8rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.footer-tagline {
    color: var(--gray-text);
    font-size: 1.05rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.footer-location {
    color: var(--gray-text);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-location i {
    color: var(--primary-color);
}

.footer-connect h4 {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.footer-social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-text);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.social-link:hover {
    color: var(--light-text);
    background: rgba(24, 169, 153, 0.15);
    transform: translateX(5px);
}

.social-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: var(--primary-color);
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 1.5rem 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--gray-text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.footer-nav a:hover {
    color: var(--light-text);
}

.footer-nav a:hover::after {
    width: 100%;
}

.footer-copyright {
    color: var(--gray-text);
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

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

.footer-info h3 {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.footer-info p {
    color: var(--gray-text);
    font-size: 0.95rem;
}

.footer-links h4 {
    color: var(--light-text);
    margin-bottom: 1rem;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-text);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social h4 {
    color: var(--light-text);
    margin-bottom: 1rem;
}

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

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(24, 169, 153, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    transition: var(--transition-smooth);
}

.social-icons a:hover {
    background: var(--gradient-1);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}


.footer-bottom p {
    color: var(--gray-text);
    font-size: 0.9rem;
}

/* ===========================
   Back to Top Button
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50%;
    color: var(--light-text);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
}

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

.back-to-top:hover {
}

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

    .hero-image {
        order: -1;
    }

    .image-wrapper {
        width: min(100%, 320px);
    }

    .image-wrapper-slideshow {
        width: min(100%, 640px);
    }

    .name {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        flex-direction: column;
        background: rgba(3, 31, 35, 0.98);
        width: 260px;
        padding: 2rem;
        border-radius: 10px 0 0 10px;
        border-left: 1px solid rgba(24, 169, 153, 0.15);
        transition: right 0.3s ease;
        box-shadow: -4px 0 24px rgba(2, 18, 19, 0.5);
        z-index: 1002;
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-item {
        padding-left: 30px;
    }

    .timeline-icon {
        left: -20px;
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .education-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

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

    /* Keep experience cards readable on tablets */
    body.academic-experience-page .experience-row,
    .academic-experience-section .experience-row,
    body.industry-experience-page .experience-row,
    .industry-experience-section .experience-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .experience-sections {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

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

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }

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

    .page-subtitle {
        font-size: 1.1rem;
    }

    .name {
        font-size: 2rem;
    }

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

    .hero-description {
        font-size: 1rem;
    }

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

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

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

    .gallery-item figcaption {
        padding: 0.9rem 0.95rem 1rem;
    }

    body.academic-experience-page .experience-row,
    .academic-experience-section .experience-row,
    body.industry-experience-page .experience-row,
    .industry-experience-section .experience-row {
        grid-template-columns: 1fr;
    }

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

    .social-grid {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-links ul {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .image-wrapper {
        width: min(100%, 260px);
        padding: 0.5rem;
        border-radius: 22px;
    }

    .image-wrapper-slideshow {
        width: min(100%, 100%);
    }

    .hero-slideshow {
        border-radius: 8px;
    }

    .slideshow-controls {
        left: 0.9rem;
        right: 0.9rem;
        bottom: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .tabs-header {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        z-index: 998;
    }

    .container {
        padding: 0 20px;
    }

    .hero {
        padding-bottom: 40px;
    }

    section {
        padding: 40px 0;
    }

    .footer-nav {
        gap: 1rem;
    }

    .footer-tagline {
        font-size: 0.95rem;
    }

    .name {
        font-size: 1.85rem;
    }
}

/* ===========================
   Accessibility
   =========================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* ===========================
   Custom Scrollbar
   =========================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ===========================
   Message Popup Modal
   =========================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--card-bg);
    padding: 3rem 2.5rem;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: none;
}

.popup-overlay.active .popup-content {
    transform: scale(1) translateY(0);
}

.popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.popup-overlay.success .popup-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--light-text);
}

.popup-overlay.error .popup-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--light-text);
}

.popup-content h3 {
    font-size: 2rem;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.popup-content p {
    color: var(--gray-text);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

#popup-close {
    margin: 0 auto;
    min-width: 150px;
}

@media (max-width: 768px) {
    .popup-content {
        padding: 2rem 1.5rem;
    }
    
    .popup-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .popup-content h3 {
        font-size: 1.5rem;
    }
    
    .popup-content p {
        font-size: 1rem;
    }
}
