/*
 * Tokyo Night Theme - Modern Dark Theme with Monospace Typography
 * zjllee.github.io
 * Based on Tokyo Night color palette
 */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    /* Tokyo Night Dark background */
    font-family: "JetBrains Mono", "Fira Code", "Consolas", Monaco, "Courier New", monospace;
    line-height: 1.8;
    color: #c0caf5; /* Tokyo Night text color */
    background-color: #1a1b26; /* Tokyo Night background */
    max-width: 100%;
    overflow-x: hidden;
}

/* === Container & Layout === */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* === Typography === */
h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #7dcfff; /* Tokyo Night cyan */
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #7dcfff; /* Tokyo Night cyan */
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #bb9af7; /* Tokyo Night purple */
}

p {
    margin-bottom: 1.25rem;
}

strong {
    color: #e0af68; /* Tokyo Night yellow */
    font-weight: 600;
}

em {
    color: #9ece6a; /* Tokyo Night green */
    font-style: italic;
}

/* === Homepage Specific === */
.role-line {
    font-size: 1.15rem;
    color: #c0caf5;
    margin-bottom: 2rem;
}

.info-box {
    border: 1px solid #414868;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background-color: #1f2335;
    border-radius: 4px;
}

.contact {
    font-size: 1rem;
    color: #c0caf5;
}

.contact p:first-child strong {
    color: #7dcfff; /* Same cyan as h1 title */
}

/* === Theme Switcher === */
.theme-switcher {
    margin-top: 1.5rem;
}

#theme-button {
    padding: 0.75rem 1.25rem;
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    font-size: 0.9rem;
    background-color: #24283b; /* Tokyo Night surface */
    color: #7aa2f7; /* Tokyo Night blue */
    border: 1px solid #414868;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#theme-button:hover {
    background-color: #414868;
    border-color: #7aa2f7;
    box-shadow: 0 0 10px rgba(122, 162, 247, 0.3);
}

#theme-button:active {
    background-color: #1f2335;
    transform: translateY(1px);
}

/* === Navigation & Links === */
nav.quick-links {
    background-color: #24283b; /* Tokyo Night surface */
    border: 1px solid #414868;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

nav.quick-links h2 {
    margin-top: 0;
    font-size: 1.5rem;
    border-bottom: 1px solid #414868;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

nav.quick-links ul {
    list-style: none;
    padding-left: 0;
}

nav.quick-links li {
    margin-bottom: 0.75rem;
}

nav.quick-links li::before {
    content: "→ ";
    color: #7aa2f7;
    font-weight: bold;
}

a {
    color: #7aa2f7; /* Tokyo Night blue */
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

a:visited {
    color: #bb9af7; /* Tokyo Night purple */
}

a:hover {
    color: #7dcfff; /* Tokyo Night cyan */
    border-bottom: 1px solid #7dcfff;
}

a:active {
    color: #f7768e; /* Tokyo Night red */
}

/* === Sections === */
section {
    margin-bottom: 2rem;
}

/* === Lists === */
ul {
    margin-left: 2rem;
    margin-bottom: 1.25rem;
}

ul li {
    margin-bottom: 0.5rem;
}

ul.publication-list,
ul.talks-list {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
    margin-top: 0.5rem;
}

ul.publication-list li,
ul.talks-list li {
    margin-bottom: 1.5rem;
}

ul.publication-list li strong,
ul.talks-list li strong {
    color: #e0af68; /* Tokyo Night yellow */
}

/* === Footer === */
footer {
    margin-top: 2rem;
    font-size: 1rem;
    color: #9aa5ce;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: #7aa2f7;
}

/* === Code & Preformatted Text === */
code {
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    background-color: #24283b;
    color: #9ece6a; /* Tokyo Night green */
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #414868;
}

pre {
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    background-color: #24283b;
    padding: 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    border: 1px solid #414868;
    line-height: 1.6;
}

pre code {
    background-color: transparent;
    padding: 0;
    border: none;
}

/* === Scrollbar Styling === */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1a1b26;
}

::-webkit-scrollbar-thumb {
    background: #414868;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #565f89;
}

/* === Selection === */
::selection {
    background-color: #7aa2f7;
    color: #1a1b26;
}

::-moz-selection {
    background-color: #7aa2f7;
    color: #1a1b26;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.35rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .info-box {
        padding: 1rem;
    }
}

/* === Print Styles === */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .theme-switcher {
        display: none;
    }

    section {
        background-color: white;
        border-left-color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}

/* === Accessibility === */
:focus {
    outline: 2px solid #7aa2f7;
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === Additional Utility Classes === */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }


/* === Special Elements === */
blockquote {
    border-left: 4px solid #f7768e;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: #a9b1d6;
    font-style: italic;
    background-color: #24283b;
    padding: 1rem 1.25rem;
    border-radius: 4px;
}

hr {
    border: none;
    border-top: 1px solid #414868;
    margin: 2rem 0;
}

/* === Tables === */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: #24283b;
    border-radius: 6px;
    overflow: hidden;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #414868;
}

th {
    background-color: #1f2335;
    color: #7dcfff;
    font-weight: 600;
}

tr:hover {
    background-color: #292e42;
}
