:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #000000;
    --link-color: #0066cc;
    --sidebar-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --secondary-text: #666666;
    --profile-border: #e0e0e0;
    --item-bg: #ffffff;
    --publication-conf-color: #ee0000;
}

body.dark-theme {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --accent-color: #60a5fa;
    --link-color: #e0e0e0;
    --sidebar-bg: #1a1a1a;
    --border-color: #333333;
    --secondary-text: #999999;
    --profile-border: #333333;
    --item-bg: #1a1a1a;
    --publication-conf-color: #ff6b6b;
}

body.light-theme {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #000000;
    --link-color: #000000;
    --sidebar-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --secondary-text: #666666;
    --profile-border: #e0e0e0;
    --item-bg: #ffffff;
    --publication-conf-color: #ee0000;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 15px;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 85%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--sidebar-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: var(--border-color);
}

.theme-toggle svg {
    stroke: var(--text-color);
    transition: opacity 0.3s ease;
}

body.light-theme .theme-toggle .sun-icon {
    display: block;
}

body.light-theme .theme-toggle .moon-icon {
    display: none;
}

body.dark-theme .theme-toggle .sun-icon {
    display: none;
}

body.dark-theme .theme-toggle .moon-icon {
    display: block;
}

h1 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 2rem;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
}

.profile-section {
    flex: 7;
    margin-right: 20px;
}

.sidebar {
    flex: 3;
    background-color: var(--sidebar-bg);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.profile-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 30px;
}

.profile-image-rectangle {
    width: 250px;
    height: 250px;
    border-radius: 8px;
    background-color: var(--sidebar-bg);
    overflow: hidden;
    border: 1px solid var(--profile-border);
    flex-shrink: 0;
}

/* .profile-image-rectangle {
    margin-top: 15px;
} */

.profile-info-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 5px;
}

.profile-name {
    color: var(--text-color);
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.social-icons-header {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.social-icon-link:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

.social-icon {
    width: 18px;
    height: 18px;
    stroke: var(--text-color);
}

.bio-text {
    margin: 0 0 12px 0;
    line-height: 1.6;
    color: var(--text-color);
}

.bio-subtext {
    margin: 0;
    line-height: 1.6;
    color: var(--secondary-text);
    font-size: 0.95em;
}
.bio-subtext a {
    font-weight: inherit;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.profile-info {
    flex-grow: 1;
    text-align: center;
    color: var(--text-color);
}

.highlight {
    color: var(--accent-color);
}

.section {
    margin-bottom: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.section-title {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: var(--text-color);
}

li::marker {
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    text-transform: none;
    text-indent: 0px !important;
    text-align: start !important;
}

li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-weight: bold;
    width: 15px;
    text-align: left;
}

.publication-item {
    display: block;
    width: 100%;
    padding-left: 0;
}

.publication-title {
    margin-bottom: 4px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.publication-authors {
    font-size: 0.85em;
    color: var(--secondary-text);
    opacity: 0.8;
    margin-bottom: 8px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.publication-conf {
    font-size: 0.85em;
    color: var(--publication-conf-color);
    opacity: 0.8;
    margin-bottom: 8px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

strong {
    font-weight: 600;
}

.competition-desc {
    font-size: 0.85em;
    color: var(--secondary-text);
    opacity: 0.8;
    margin-bottom: 8px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.project-item,
.achievement-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    padding-left: 0;
    font-weight: 500;
}

.project-item::before,
.achievement-item::before {
    display: none;
}

.item-image {
    width: 80px;
    height: 50px;
    margin-right: 15px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--item-bg);
    border: 1px solid var(--border-color);
}

.item-text {
    flex: 1;
    min-width: 0;
}

a {
    color: var(--link-color);
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

a:hover {
    text-decoration: underline;
}

.quote {
    font-style: italic;
    margin: 20px 0;
}

.button-img {
    width: 100%;
    max-width: 150px;
    margin-bottom: 10px;
}

.connect-icons {
    display: flex;
    flex-direction: column;
}

.connect-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.connect-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    color: var(--text-color);
    flex-shrink: 0;
}

.footer {
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    font-size: 10px;
    color: var(--secondary-text);
}

.fun-fact {
    color: var(--accent-color);
    font-style: italic;
}

canvas {
    overflow: hidden;
    color: var(--text-color);
    position: fixed;
    width: 100vw;
    height: 100vh;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.3;
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
        overflow-x: hidden;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    h1 {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .main-content {
        flex-direction: column;
    }

    .profile-section {
        margin-right: 0;
        margin-bottom: 20px;
        overflow-x: hidden;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .profile-image-rectangle {
        width: 140px;
        height: 140px;
    }

    .profile-info-right {
        align-items: center;
        text-align: center;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .social-icons-header {
        justify-content: center;
    }

    .sidebar {
        margin-top: 20px;
        overflow-x: hidden;
    }

    .section-title {
        font-size: 1.1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .item-image {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }

    body {
        font-size: 14px;
    }

    .connect-icons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .connect-item {
        margin-bottom: 0;
        min-width: 0;
    }

    li {
        padding-left: 18px;
        font-size: 14px;
        line-height: 1.5;
    }

    li::before {
        width: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 98%;
        padding: 10px;
        overflow-x: hidden;
    }

    .theme-toggle {
        width: 35px;
        height: 35px;
    }

    h1 {
        font-size: 1.3rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .profile-image-rectangle {
        width: 120px;
        height: 120px;
    }

    .profile-name {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    body {
        font-size: 13px;
    }

    .connect-icons {
        grid-template-columns: 1fr;
    }

    .publication-authors {
        font-size: 0.8em;
    }

    li {
        padding-left: 16px;
        font-size: 13px;
        line-height: 1.4;
    }

    li::before {
        width: 10px;
        font-size: 0.9em;
    }

    .connect-item {
        font-size: 13px;
    }

    .social-icon-link {
        width: 28px;
        height: 28px;
    }

    .social-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 320px) {
    .container {
        width: 100%;
        padding: 8px;
    }

    li {
        padding-left: 14px;
        font-size: 12px;
    }

    li::before {
        width: 8px;
        font-size: 0.8em;
    }

    .publication-title,
    .publication-authors {
        font-size: 0.75em;
    }

    .profile-image-rectangle {
        width: 100px;
        height: 100px;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}
