/* Apply Inter font to the body */
body {
    font-family: 'Inter', sans-serif;
}

/* ===== CORE DESIGN TOKENS ===== */
:root {
    --color-bg-primary: #020617;       /* slate-950 */
    --color-bg-secondary: #0f172a;     /* slate-900 */
    --color-bg-card: #1e293b;          /* slate-800 */
    --color-accent: #22d3ee;           /* cyan-400 */
    --color-accent-dark: #0891b2;      /* cyan-600 */
    --color-accent-glow: rgba(34, 211, 238, 0.15);
    --color-text-primary: #f1f5f9;     /* slate-100 */
    --color-text-secondary: #cbd5e1;   /* slate-300 */
    --color-text-muted: #94a3b8;       /* slate-400 */
    --color-border: rgba(51, 65, 85, 0.6);
    --color-border-accent: rgba(34, 211, 238, 0.2);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(90deg, #22d3ee, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== SECTION TITLES ===== */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #22d3ee, #818cf8);
    border-radius: 2px;
}

/* ===== HERO BACKGROUND ===== */
.hero-bg {
    background: linear-gradient(160deg, #f8fafc 0%, #f0f9ff 100%);
}

/* ===== PUBLICATION ITEMS ===== */
.publication-item {
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
}

.publication-item:hover {
    transform: translateX(5px);
    border-color: var(--color-border-accent);
    box-shadow: 0 4px 24px rgba(34, 211, 238, 0.06);
}

/* ===== NAVIGATION LINKS ===== */
.nav-link {
    position: relative;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #0f172a;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #22d3ee, #818cf8);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

.nav-link.active-section {
    color: #22d3ee;
}

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

/* ===== HEADER ===== */
.header-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

/* ===== TIMELINE ===== */
.timeline-item:before {
    content: '';
    position: absolute;
    left: -30px;
    top: 5px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #0891b2;
    z-index: 1;
}

.timeline:before {
    content: '';
    position: absolute;
    left: -23px;
    top: 0;
    height: 100%;
    width: 2px;
    background: #e2e8f0;
}

/* ===== BACK TO TOP BUTTON ===== */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #0891b2;
    color: white;
    cursor: pointer;
    padding: 14px;
    border-radius: 50%;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#back-to-top:hover {
    background-color: #22d3ee;
    transform: translateY(-2px);
}

/* ===== PHOTO CAROUSEL ===== */
.carousel-container {
    position: relative;
    width: 100%;
    margin: auto;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    aspect-ratio: 16 / 9;
    height: 300px;
    border: 1px solid var(--color-border);
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.5s ease-in-out;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.55);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.25rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease;
    backdrop-filter: blur(4px);
}

.carousel-button:hover {
    background-color: rgba(34, 211, 238, 0.25);
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.dot.active {
    background-color: #22d3ee;
    transform: scale(1.2);
}

.photo-title {
    position: absolute;
    bottom: 28px;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
    color: white;
    padding: 10px 16px 4px;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-container:hover .photo-title {
    opacity: 1;
}

/* ===== NEWS SCROLL CONTAINER ===== */
.news-scroll-container {
    height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.news-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.news-scroll-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.news-scroll-container::-webkit-scrollbar-track {
    background-color: #f1f5f9;
}

.news-item-line {
    display: block;
}

/* ===== PUBLICATIONS SCROLL ===== */
.publications-scroll-container {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.publications-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.publications-scroll-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.publications-scroll-container::-webkit-scrollbar-track {
    background-color: #f1f5f9;
}

/* ===== PUBLICATION ABSTRACT ===== */
.pub-abstract summary {
    font-size: 0.8rem;
    color: #94a3b8;
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.pub-abstract summary::-webkit-details-marker {
    display: none;
}

.pub-abstract summary::before {
    content: '▶';
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}

.pub-abstract[open] summary::before {
    transform: rotate(90deg);
}

.pub-abstract summary:hover {
    color: #0891b2;
}

.pub-abstract[open] summary {
    color: #0891b2;
}

.pub-abstract p {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* ===== PROFILE GRADIENT RING ===== */
.profile-gradient-ring {
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee, #818cf8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ===== CARD HOVER ===== */
.card-hover {
    transition: all 0.25s ease;
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.card-hover:hover {
    border-color: rgba(34, 211, 238, 0.2);
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.06);
    transform: translateY(-1px);
}

/* ===== LIGHT MODE ===== */
html.light-mode body {
    background-color: #f8fafc;
    color: #1e293b;
}

html.light-mode .header-glass {
    background: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}

html.light-mode header .gradient-text {
    background: linear-gradient(90deg, #0891b2, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

html.light-mode .nav-link {
    color: #475569;
}

html.light-mode .nav-link:hover {
    color: #0891b2;
}

html.light-mode #mobile-menu {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

html.light-mode #mobile-menu a {
    color: #1e293b;
    border-color: #e2e8f0;
}

html.light-mode #mobile-menu-button,
html.light-mode #theme-toggle-button {
    color: #475569;
}

html.light-mode #mobile-menu-button:hover,
html.light-mode #theme-toggle-button:hover {
    color: #1e293b;
}

html.light-mode #about {
    background:
        radial-gradient(ellipse 70% 70% at 15% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 60%),
        #f0f9ff;
}

html.light-mode #about h1,
html.light-mode #about h2,
html.light-mode #about h3,
html.light-mode #about p {
    color: #1e293b;
}

html.light-mode #about h1 .gradient-text {
    background: linear-gradient(90deg, #0891b2, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

html.light-mode #about .btn-outline {
    color: #0891b2;
    border-color: #0891b2;
}

html.light-mode #about .btn-outline:hover {
    background-color: #ecfeff;
}

html.light-mode #about .btn-primary {
    background-color: #0891b2;
    color: #ffffff;
}

html.light-mode #about .btn-primary:hover {
    background-color: #0e7490;
}

html.light-mode #about .research-card {
    background-color: #ecfeff;
    border-color: #06b6d4;
}

html.light-mode #about .research-card h4 {
    color: #0e4f5e;
}

html.light-mode #about .research-card p {
    color: #475569;
}

html.light-mode #news-photos {
    background-color: #ffffff;
}

html.light-mode #news-photos h2.section-title {
    color: #1e293b;
}

html.light-mode #news-photos .news-card {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}

html.light-mode #news-photos .news-item-line {
    color: #475569;
}

html.light-mode #news-photos .news-item-line .text-cyan-400 {
    color: #0891b2;
}

html.light-mode #news-photos .news-item-line a {
    color: #0891b2;
}

html.light-mode .news-scroll-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
}

html.light-mode .news-scroll-container::-webkit-scrollbar-track {
    background-color: #f1f5f9;
}

html.light-mode #experience {
    background-color: #f8fafc;
}

html.light-mode #experience h2.section-title {
    color: #1e293b;
}

html.light-mode #experience .timeline:before {
    background: linear-gradient(to bottom, #0891b2, rgba(8, 145, 178, 0.15));
}

html.light-mode #experience .experience-card {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

html.light-mode #experience .experience-card h3 {
    color: #1e293b;
}

html.light-mode #experience .experience-card p,
html.light-mode #experience .experience-card a {
    color: #475569;
}

html.light-mode #experience .experience-card a:hover {
    color: #0891b2;
}

html.light-mode #experience .experience-card .text-cyan-400 {
    color: #0891b2;
}

html.light-mode #education {
    background-color: #f8fafc;
}

html.light-mode #education h2.section-title {
    color: #1e293b;
}

html.light-mode #education .edu-card {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

html.light-mode #education .edu-card h3 {
    color: #1e293b;
}

html.light-mode #education .edu-card p {
    color: #475569;
}

html.light-mode #education .edu-card .text-cyan-400 {
    color: #0891b2;
}

html.light-mode #publications {
    background-color: #ffffff;
}

html.light-mode #publications h2.section-title {
    color: #1e293b;
}

html.light-mode .publication-item {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}

html.light-mode .publication-item:hover {
    border-color: rgba(8, 145, 178, 0.3);
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.06);
}

html.light-mode .publication-item h3 {
    color: #1e293b;
}

html.light-mode .publication-item p,
html.light-mode .publication-item a {
    color: #475569;
}

html.light-mode .publication-item .text-cyan-400 {
    color: #0891b2;
}

html.light-mode .pub-abstract summary {
    color: #94a3b8;
}

html.light-mode .pub-abstract summary:hover,
html.light-mode .pub-abstract[open] summary {
    color: #0891b2;
}

html.light-mode .pub-abstract p {
    color: #6b7280;
}

html.light-mode .publications-scroll-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
}

html.light-mode .publications-scroll-container::-webkit-scrollbar-track {
    background-color: #f1f5f9;
}

html.light-mode #contact {
    background-color: #0f172a;
    color: #cbd5e1;
}

html.light-mode #contact h2,
html.light-mode #contact h3 {
    color: #ffffff;
}

html.light-mode #contact .text-cyan-400 {
    color: #22d3ee;
}

html.light-mode #contact .social-btn {
    background-color: #1e293b;
}

html.light-mode #contact .social-btn:hover {
    background-color: #334155;
}

html.light-mode footer {
    background-color: #020617;
    color: #64748b;
}
