/* latin-ext */
@font-face {
    font-family: "Lato";
    font-style: italic;
    font-weight: 400;
    src:
        local("Lato Italic"),
        local("Lato-Italic"),
        url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2)
            format("woff2");
    unicode-range:
        U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF,
        U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: "Lato";
    font-style: italic;
    font-weight: 400;
    src:
        local("Lato Italic"),
        local("Lato-Italic"),
        url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2)
            format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: "Lato";
    font-style: italic;
    font-weight: 700;
    src:
        local("Lato Bold Italic"),
        local("Lato-BoldItalic"),
        url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2)
            format("woff2");
    unicode-range:
        U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF,
        U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: "Lato";
    font-style: italic;
    font-weight: 700;
    src:
        local("Lato Bold Italic"),
        local("Lato-BoldItalic"),
        url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2)
            format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 400;
    src:
        local("Lato Regular"),
        local("Lato-Regular"),
        url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2)
            format("woff2");
    unicode-range:
        U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF,
        U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 400;
    src:
        local("Lato Regular"),
        local("Lato-Regular"),
        url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2)
            format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 700;
    src:
        local("Lato Bold"),
        local("Lato-Bold"),
        url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2)
            format("woff2");
    unicode-range:
        U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF,
        U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 700;
    src:
        local("Lato Bold"),
        local("Lato-Bold"),
        url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2)
            format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:focus,
a:hover {
    color: var(--accent-gold);
    text-decoration: none;
}

body,
td,
th,
tr,
p,
a {
    font-family: "Lato", Verdana, Helvetica, sans-serif;
    font-size: 14px;
}

strong {
    font-family: "Lato", Verdana, Helvetica, sans-serif;
    font-size: 14px;
}

h2 {
    margin: 0;
    font-weight: normal;
    font-family: "Lato", Verdana, Helvetica, sans-serif;
    font-size: 22px;
}

.papertitle {
    font-family: "Lato", Verdana, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.name {
    padding-top: 20px;
    margin: 0;
    font-family: "Lato", Verdana, Helvetica, sans-serif;
    font-size: 32px;
}

.one {
    position: relative;
    width: 320px;
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
    border-radius: 10px;
}

.two {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: opacity 0.2s ease-in-out;
    -moz-transition: opacity 0.2s ease-in-out;
    -webkit-transition: opacity 0.2s ease-in-out;
    border-radius: inherit;
}

.two video,
.one video,
.one img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.fade {
    transition: opacity 0.2s ease-in-out;
    -moz-transition: opacity 0.2s ease-in-out;
    -webkit-transition: opacity 0.2s ease-in-out;
}

span.highlight {
    background-color: #fdf6e3;
}

h1 {
    color: var(--accent-strong);
}

.tag {
    display: inline-block;
    padding: 6px 10px;
    margin: 3px;
    border-radius: 10px;
    color: var(--tag-color);
    font-size: 14px;
    font-weight: 700;
    background-color: var(--tag-bg);
    border: 1px solid var(--tag-border);
    letter-spacing: 0.1px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.green,
.orange,
.blue,
.red,
.gray,
.brown,
.purple {
    background-color: var(--tag-bg);
    color: var(--tag-color);
    font-weight: 700;
}

/* Global Styles */
:root {
    /* Light theme (teal accent, black text) */
    --primary-color: #1a1a1a;
    --secondary-color: #333333;
    --accent-color: #0d9488;
    --accent-strong: #0f766e;
    --accent-gold: #c9a227;
    --heading-gradient: linear-gradient(120deg, #134e4a, #0d9488, #14b8a6);
    --background-color: #f0fdfa;
    --surface-color: #ffffff;
    --section-bg: #ffffff;
    --header-bg: linear-gradient(135deg, rgba(13, 148, 136, 0.03), rgba(201, 162, 39, 0.02)),
        linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    --card-bg: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
    --card-border: #ccfbf1;
    --card-hover-border: #99f6e4;
    --card-shadow: rgba(13, 148, 136, 0.05);
    --card-hover-shadow: rgba(13, 148, 136, 0.1);
    --tag-bg: #f0fdfa;
    --tag-border: #ccfbf1;
    --tag-color: #115e59;
    --sticker-bg: #0f766e;
    --text-color: #1a1a1a;
    --text-muted: #555555;
    --border-color: #e0f2f1;
    --section-spacing: 2rem;
    --content-width: 1000px;
}

/* Dark theme */
[data-theme="dark"] {
    --primary-color: #e2e8f0;
    --secondary-color: #cbd5e1;
    --accent-color: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-gold: #fbbf24;
    --heading-gradient: linear-gradient(120deg, #14b8a6, #2dd4bf, #5eead4);
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --section-bg: #1e293b;
    --header-bg: linear-gradient(135deg, rgba(45, 212, 191, 0.05), rgba(251, 191, 36, 0.02)),
        linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --card-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --card-border: #334155;
    --card-hover-border: #475569;
    --card-shadow: rgba(0, 0, 0, 0.2);
    --card-hover-shadow: rgba(0, 0, 0, 0.3);
    --tag-bg: #1e293b;
    --tag-border: #334155;
    --tag-color: #5eead4;
    --sticker-bg: #0f766e;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

/* Typing cursor effect for name */
.name::after {
    content: '|';
    animation: blink 0.8s infinite;
}

.name.typing-done::after {
    display: none;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--surface-color);
    border: 2px solid var(--accent-color);
    border-radius: 24px;
    width: 90px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    box-shadow: 0 4px 12px var(--card-shadow);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px var(--card-hover-shadow);
    background: var(--accent-color);
    color: white;
}

.theme-toggle .theme-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(20deg);
}

.theme-toggle .theme-label {
    font-family: "Lato", sans-serif;
    min-width: 36px;
    text-align: center;
}

body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--surface-color);
    box-shadow: 0 0 20px var(--card-shadow);
    border-radius: 10px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Header Styles */
.header {
    padding: var(--section-spacing) 0;
    background: var(--header-bg);
    border-radius: 8px;
    margin-bottom: 2rem;
    transition: background 0.3s ease;
}

.header-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.header-text {
    flex: 1;
    padding: 20px;
}

.name {
    font-size: 2.8rem;
    margin: 0 0 1rem;
    text-align: center;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.5px;
    background: var(--heading-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header-image {
    flex-shrink: 0;
    padding-right: 20px;
}

.profile-photo {
    width: 200px;
    height: auto;
    border-radius: 10px;
}

/* Section Styles */
.section {
    padding: var(--section-spacing) 0;
    border-top: 1px solid var(--border-color);
    background-color: var(--section-bg);
    border-radius: 8px;
    margin-bottom: 2rem;
    padding: 2rem;
    box-shadow: 0 2px 4px var(--card-shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.section h2 {
    font-size: 1.9rem;
    margin-bottom: 1.5rem;
    color: var(--accent-strong);
    letter-spacing: -0.2px;
}

/* List Styles */
.news-list,
.awards-list,
.services-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.news-list li,
.awards-list li,
.services-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
}

.news-list li:before,
.awards-list li:before,
.services-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #c9a227;
}

/* Education Styles */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.education-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.institution-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background-color: white;
    padding: 8px;
    border-radius: 8px;
    box-sizing: content-box;
    object-fit: contain;
}

.education-details h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.education-details p {
    margin: 0;
    color: var(--text-muted);
}

/* Research and Project Styles */
.research-list,
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section > .research-item {
    margin-bottom: 2rem;
}

.section > .research-item:last-of-type {
    margin-bottom: 2rem;
}

.research-item,
.project-item {
    position: relative;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 6px 16px var(--card-shadow);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.3s ease,
        border-color 0.3s ease;
}

.research-item:hover,
.project-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px var(--card-hover-shadow);
    border-color: var(--card-hover-border);
}

.research-image,
.project-image {
    flex-shrink: 0;
    width: 320px;
}

.research-content,
.project-content {
    flex: 1;
}

.papertitle {
    font-weight: bold;
    color: var(--accent-strong);
    font-size: 17px;
    letter-spacing: 0.1px;
}

.research-content p {
    font-size: 15px;
}

.research-content strong {
    font-size: 15.5px;
    color: var(--text-color);
}

.research-item .tag.sticker,
.project-item .tag.sticker {
    position: absolute;
    left: 10px;
    top: -12px;
    padding: 6px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--card-shadow);
    background-color: var(--tag-bg);
    border: 1px solid var(--accent-color);
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.3px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .research-item .tag.sticker,
[data-theme="dark"] .project-item .tag.sticker {
    color: var(--text-color);
}

/* Hover Effects */
.one {
    position: relative;
    width: 320px;
    aspect-ratio: 16 / 9;
    height: auto;
}

.two {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.one:hover .two {
    opacity: 1;
}

/* Tag Styles */
.tag {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    color: var(--tag-color);
    font-weight: 700;
    background-color: var(--tag-bg);
    border: 1px solid var(--tag-border);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.tag.blue,
.tag.green,
.tag.orange,
.tag.purple,
.tag.red,
.tag.gray,
.tag.brown {
    background-color: var(--tag-bg);
    color: var(--tag-color);
    font-weight: 700;
}

.star-icon {
    display: inline-block;
    color: #c9a227;
    margin-left: 6px;
    font-size: 0.95em;
    line-height: 1;
    vertical-align: text-top;
    font-family: inherit;
}

.tag-strong {
    background-color: #fdf8e8;
    border: 1px solid #e8d9a0;
    color: #8b7355;
    font-weight: 700;
}

/* Link Styles */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #c9a227;
}

/* Social Links */
.social-links {
    text-align: center;
    margin-top: 1rem;
}

/* Footer */
.footer {
    text-align: right;
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Experience Styles */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.experience-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.experience-item .institution-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background-color: white;
    padding: 8px;
    border-radius: 8px;
    box-sizing: content-box;
    object-fit: contain;
}

.experience-details h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.experience-details p {
    margin: 0;
    color: var(--text-muted);
}

/* Disable hover effects on mobile devices */
@media (hover: none) and (pointer: coarse) {
    .two {
        display: none !important;
    }

    .one:hover .two {
        opacity: 0 !important;
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 80px;
        height: 36px;
        font-size: 12px;
    }

    .theme-toggle .theme-icon {
        font-size: 16px;
    }

    body,
    td,
    th,
    tr,
    p,
    a {
        font-size: 13px;
    }

    .name {
        font-size: 28px;
    }

    h2 {
        font-size: 20px;
    }

    .papertitle {
        font-size: 13px;
    }

    .one {
        width: 260px;
    }

    .two {
        width: 100%;
        height: 100%;
    }

    .tag {
        font-size: 12px;
        padding: 2px 5px;
    }

    .research-image,
    .project-image {
        width: 260px;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-image {
        margin-top: 1rem;
    }

    .profile-photo {
        width: 150px;
    }

    .research-item,
    .project-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .research-image,
    .project-image {
        margin-bottom: 1rem;
    }

    .education-item {
        flex-direction: column;
        text-align: center;
    }

    .institution-logo {
        margin-bottom: 1rem;
    }

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

    .social-links a {
        margin: 0;
    }

    .experience-item {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
    }

    .experience-item .institution-logo {
        width: 80px;
    }
}

@media screen and (max-width: 480px) {
    body,
    td,
    th,
    tr,
    p,
    a {
        font-size: 12px;
    }

    .name {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    .papertitle {
        font-size: 12px;
    }

    .one {
        width: 220px;
    }

    .two {
        width: 100%;
        height: 100%;
    }

    .tag {
        font-size: 11px;
        padding: 2px 4px;
    }

    .container {
        padding: 0 0.5rem;
    }

    .section {
        padding: 1.5rem 0;
    }

    .research-content,
    .project-content {
        font-size: 0.95rem;
    }

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

    .research-image,
    .project-image {
        width: 220px;
    }

    .experience-item {
        gap: 0.8rem;
    }

    .experience-item .institution-logo {
        width: 80px;
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
    }

    .container {
        max-width: 100%;
    }

    .header-image {
        display: none;
    }

    .theme-toggle {
        display: none;
    }

    a {
        text-decoration: none;
        color: #1a1a1a;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* GitHub Projects Section */
.github-projects {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.github-stats {
    text-align: center;
}

.github-stats img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pinned-repos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 900px;
}

.repo-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.repo-row img {
    flex: 1;
    min-width: 400px;
    max-width: 450px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.repo-row img:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.github-link {
    text-align: center;
    margin-top: 1rem;
}

.github-link a {
    text-decoration: none;
}

.github-link .tag {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    transition: transform 0.3s ease;
}

.github-link .tag:hover {
    transform: scale(1.05);
}

/* Responsive Design for GitHub Section */
@media screen and (max-width: 768px) {
    .repo-row {
        flex-direction: column;
        align-items: center;
    }

    .repo-row img {
        min-width: 300px;
        max-width: 100%;
    }

    .github-stats img {
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .repo-row img {
        min-width: 280px;
    }

    .github-link .tag {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
}
