/* =====================
   Reset & Base
   ===================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    display: flex;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* =====================
   Typography
   ===================== */

h1 {
    font-weight: 600;
    font-size: 1.85rem;
    letter-spacing: -0.03em;
    color: #000;
    margin-bottom: 0.5rem;
}

h2 {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #999;
    margin-bottom: 1rem;
}

a {
    color: #000;
    text-decoration: none;
    position: relative;
    background-image: linear-gradient(90deg, #000, #000);
    background-repeat: no-repeat;
    background-position: 0% 100%;
    background-size: 100% 1px;
    transition: all 0.25s ease-out;
    padding-bottom: 1px;
    cursor: pointer;
    font-weight: 600;
}

a:hover {
    background-size: 100% 2px;
    color: #000;
}

.highlight {
    font-weight: 600;
}

strong {
    font-weight: 600;
    color: #000;
}

strong u {
    text-decoration: none;
    border-bottom: 2px solid #000;
}

/* =====================
   Table of Contents
   ===================== */

.toc {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    padding: 3rem 1.5rem;
    background: #fafafa;
    border-right: 2px solid #f0f0f0;
    overflow-y: auto;
}

.toc-content h3 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #999;
    margin-bottom: 1.25rem;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 0.75rem;
}

.toc a {
    font-size: 0.875rem;
    color: #666;
    border: none;
    transition: color 0.2s ease;
}

.toc a:hover {
    color: #000;
    border: none;
}

.toc-nested {
    margin-top: 0.5rem;
    margin-left: 1rem;
}

.toc-nested li {
    margin-bottom: 0.5rem;
}

.toc-nested a {
    font-size: 0.8rem;
}

/* =====================
   Layout
   ===================== */

.content {
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 4rem 6rem 4rem;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpFade 0.9s ease-out 0.2s forwards;
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.collapsible-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.section-toggle-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.section-toggle-btn i {
    transition: transform 0.3s ease;
}

.section-toggle-btn:hover {
    color: #000;
}

.section-content {
    margin-left: 2rem;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.collapsible-subsection {
    margin-bottom: 1.25rem;
}

.subsection-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 0.75rem;
}

.subsection-toggle-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.subsection-toggle-btn i {
    transition: transform 0.3s ease;
}

.subsection-toggle-btn:hover {
    color: #000;
}

.subsection-content {
    margin-left: 1.5rem;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.subsection-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.main-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000;
    margin: 0;
    letter-spacing: -0.02em;
    text-transform: none;
}

.subsection-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #999;
    margin: 0;
}

/* =====================
   Top Section: 2 Columns
   ===================== */

.top-section {
    display: grid;
    grid-template-columns: minmax(auto, 180px) 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #f0f0f0;
}

@media screen and (max-width: 1024px) {
    .top-section {
        gap: 2.5rem;
    }
}

@media screen and (max-width: 900px) {
    .top-section {
        grid-template-columns: minmax(auto, 160px) 1fr;
        gap: 2rem;
    }

    .about-current,
    .about-startup,
    .about-previous,
    .about-research-goal {
        font-size: 0.95rem;
    }
}

/* Left Column: Photo, Name, Links */
.profile-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    background: #fff;
    transition: all 0.4s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.site-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #000;
}

.links-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.links-column a {
    font-size: 0.875rem;
    color: #000;
    background-image: linear-gradient(90deg, #000, #000);
    background-repeat: no-repeat;
    background-position: 0% 100%;
    background-size: 100% 1px;
    transition: all 0.25s ease;
    padding-bottom: 1px;
    cursor: pointer;
}

.links-column a:hover {
    color: #000;
    background-size: 100% 2px;
}

/* =====================
   About Column
   ===================== */

.about-column {
    display: flex;
    flex-direction: column;
}

.about-column h2 {
    margin-bottom: 1rem;
}

.about-current,
.about-startup,
.about-research-goal,
.about-personal-interests {
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
    margin-bottom: 1.25rem;
}

.about-personal-interests {
    color: #666;
    font-style: italic;
}

.about-previous-section {
    margin-bottom: 1.25rem;
}

.about-previous-intro {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.about-previous-list {
    list-style: none;
    padding-left: 1.5rem;
}

.about-previous-list li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 0.35rem;
    position: relative;
}

.about-previous-list li::before {
    content: '•';
    position: absolute;
    left: -1rem;
    color: #ccc;
}

.about-contact {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1.5rem;
}

.about-contact a {
    color: #000;
}

.hero-intro {
    font-size: 1.15rem;
    line-height: 1.75;
    color: #000;
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}


.hero-cta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.75rem;
}

.hero-cta a {
    color: #000;
    font-weight: 500;
    background-image: linear-gradient(90deg, #000, #000);
    background-repeat: no-repeat;
    background-position: 0% 100%;
    background-size: 100% 1px;
    transition: all 0.25s ease;
    padding-bottom: 1px;
    cursor: pointer;
}

.hero-cta a:hover {
    background-size: 100% 2px;
    color: #000;
}

.hero-contact {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    text-align: center;
}

.hero-contact a {
    color: #000;
}

/* =====================
   Back to Top Button
   ===================== */

#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

#back-to-top:hover {
    background: #333;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* =====================
   Featured Projects Section
   ===================== */

.featured-paper {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    align-items: start;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.featured-paper:nth-child(1) { animation-delay: 0.3s; }
.featured-paper:nth-child(2) { animation-delay: 0.5s; }
.featured-paper:nth-child(3) { animation-delay: 0.7s; }
.featured-paper:nth-child(4) { animation-delay: 0.9s; }

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

.featured-paper:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.paper-image-container {
    width: 200px;
    flex-shrink: 0;
}

.paper-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.paper-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.paper-title-area {
    flex: 1;
    min-width: 0;
}

.paper-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #000;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.paper-status {
    font-size: 0.75rem;
    color: #999;
    display: block;
    margin-bottom: 0.35rem;
}

.paper-actions-compact {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.paper-btn-compact {
    padding: 0.3rem 0.65rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
    white-space: nowrap;
}

.primary-btn-compact {
    background: #000;
    color: #fff;
    font-weight: 500;
    border: none;
}

.primary-btn-compact:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.secondary-btn-compact {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    font-weight: 500;
    background-image: none;
}

.secondary-btn-compact:hover {
    border-color: #000;
    color: #000;
    background: #f5f5f5;
    background-size: 100% 100%;
}

.paper-authors {
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 0.4rem 0;
    font-style: italic;
    line-height: 1.4;
}

.paper-description {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.paper-abstract {
    margin-top: 0.75rem;
    padding: 1rem;
    background: #fafafa;
    border-left: 2px solid #e0e0e0;
}

.paper-abstract p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}


/* =====================
   Expandable Items (Publications & Experience)
   ===================== */

.item-list {
    list-style: none;
}

.expandable-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.expandable-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.item-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
}

.item-main {
    flex: 1;
}

.toggle-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    transition: color 0.2s ease;
    flex-shrink: 0;
    align-self: flex-start;
}

.toggle-btn i {
    transition: transform 0.3s ease;
}

.toggle-btn:hover {
    color: #000;
}

.item-summary {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0.5rem 0 0 0;
}

.item-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f5f5f5;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.item-details[style*="display: none"] {
    opacity: 0;
}

.detail-line {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 0.5rem 0;
}

/* Publications */
.pub-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.pub-title-row a {
    flex: 1;
    font-weight: 500;
    font-size: 1rem;
}

/* Experience */
.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.exp-company {
    font-weight: 500;
    flex: 1;
}

.exp-company a {
    color: #000;
    font-weight: 500;
}

.exp-role {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0.35rem 0 0 0;
}

.mentor {
    font-style: italic;
    color: #555;
}

.meta {
    font-size: 0.875rem;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =====================
   Simple Lists (Awards, Teaching, Service, etc.)
   ===================== */

.simple-list {
    list-style: none;
}

.awards-list {
    list-style: none;
}

.award-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f5f5f5;
}

.award-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.award-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.award-title {
    font-weight: 500;
    font-size: 0.95rem;
}

.award-title a {
    color: #000;
}

.award-details {
    font-size: 0.85rem;
    color: #666;
    margin: 0.25rem 0 0 0;
}

.teaching-item,
.service-item,
.talk-item {
    margin-bottom: 1rem;
}

.teaching-header,
.service-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.teaching-course,
.service-role {
    font-weight: 500;
    font-size: 0.95rem;
}

.teaching-inst,
.service-org {
    font-size: 0.85rem;
    color: #666;
    margin: 0.25rem 0 0 0;
}

.talk-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.talk-event {
    font-size: 0.95rem;
}

.press-item {
    margin-bottom: 1.5rem;
}

.press-title {
    font-weight: 500;
    font-size: 0.95rem;
    color: #000;
}

.press-meta {
    font-size: 0.85rem;
    color: #999;
    margin: 0.25rem 0;
}

.press-summary {
    font-size: 0.9rem;
    color: #666;
    margin: 0.35rem 0 0 0;
}

/* =====================
   Responsive
   ===================== */

@media screen and (max-width: 768px) {
    .toc {
        display: none;
    }

    .content {
        margin-left: 0;
        padding: 3rem 1.5rem 5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .main-section-title {
        font-size: 1.3rem;
    }

    .top-section {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
        padding: 1.5rem;
    }

    .profile-column {
        order: -1;
        align-items: center;
        text-align: center;
    }

    .profile-image {
        width: 140px;
        height: 140px;
    }

    .site-title {
        font-size: 1.4rem;
    }

    .links-column {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
    }

    .about-column {
        text-align: left;
    }


    .pub-title-row,
    .exp-header,
    .award-header,
    .teaching-header,
    .service-header,
    .talk-item,
    .highlight-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .meta,
    .highlight-meta {
        font-size: 0.8rem;
        white-space: normal;
    }
}

@media screen and (max-width: 480px) {
    .content {
        padding: 2.5rem 1.25rem 4rem;
    }

    h1 {
        font-size: 1.35rem;
    }

    .main-section-title {
        font-size: 1.2rem;
    }

    .top-section {
        padding: 1.25rem;
    }

    .profile-image {
        width: 110px;
        height: 110px;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .links-column {
        gap: 0.5rem;
    }

    .links-column a {
        font-size: 0.8rem;
    }

    .about-current,
    .about-startup,
    .about-research-goal {
        font-size: 0.95rem;
    }

    .about-previous-intro {
        font-size: 0.95rem;
    }

    .about-previous-list li {
        font-size: 0.9rem;
    }

    .about-contact,
    .hero-cta {
        font-size: 0.875rem;
    }

    .featured-paper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .paper-image-container {
        width: 100%;
        max-width: 300px;
    }

    .paper-top-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .paper-actions-compact {
        order: 2;
        margin-top: 0.5rem;
    }

    .paper-title-area {
        order: 1;
    }

    .paper-title {
        font-size: 0.95rem;
    }

    .paper-authors {
        font-size: 0.775rem;
    }

    .paper-description {
        font-size: 0.85rem;
    }

    .paper-abstract p {
        font-size: 0.825rem;
    }

    .item-summary {
        font-size: 0.9rem;
    }

    .exp-role {
        font-size: 0.85rem;
    }
}

/* =====================
   Font Selector - COMMENTED OUT
   ===================== */

/*
.font-selector {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.font-selector label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

.font-selector select {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.font-selector select:hover {
    border-color: #000;
}

.font-selector select:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 768px) {
    .font-selector {
        top: 1rem;
        right: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .font-selector label {
        font-size: 0.8rem;
    }

    .font-selector select {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }
}
*/
