:root {
    --bg-color: #fdfdfd;
    --text-color: #2c2c2c;
    --text-light: #555555;
    --accent-color: #2a5caa; /* KAIST Blue-ish */
    --accent-hover: #1a3c75;
    --border-color: #e0e0e0;
    --placeholder-bg: #eeeeee;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --max-width: 860px;
}

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

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 5rem 2rem;
}

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

a:hover {
    color: var(--accent-hover);
}

/* Header */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
    gap: 3rem;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
    color: #111;
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.affiliation-block {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    font-size: 0.95rem;
}

.social-icon {
    color: var(--text-light);
    font-weight: 500;
    border-bottom: 1px solid transparent;
}

.social-icon:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.profile-image-container {
    flex-shrink: 0;
}

.profile-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px; /* Slight roundness for modern feel */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Subtle shadow */
}

/* Sections Global */
.section-block {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
    color: #111;
}

/* About */
#about p {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 90%;
}

/* News */
.news-list {
    list-style: none;
}

.news-list li {
    display: flex;
    margin-bottom: 0.8rem;
}

.news-list .date {
    min-width: 120px;
    font-family: 'Inter', monospace; /* Monospace-like alignment with Inter */
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: var(--text-light);
    opacity: 0.8;
}

/* Publications */
.publication-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.pub-teaser {
    flex-shrink: 0;
    width: 200px;
}

.pub-teaser img, .placeholder-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    background-color: var(--placeholder-bg);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.05); /* Very subtle border */
}

.pub-details {
    flex: 1;
}

.pub-title {
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
    line-height: 1.4;
    color: #111;
}

.pub-authors {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.pub-venue {
    font-style: italic;
    color: #444;
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}

.badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-light);
    margin-right: 6px;
    text-transform: uppercase;
    transition: all 0.1s ease;
}

.badge:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: rgba(42, 92, 170, 0.05);
    text-decoration: none;
}

/* Software */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.2rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.project-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.project-teaser .placeholder-img {
    aspect-ratio: 2/1; /* Wider for projects */
    margin-bottom: 1rem;
}

.project-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.project-item p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.badge-small {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* Education */
.education-list li {
    margin-bottom: 1.5rem;
}

.edu-top {
    display: flex;
    justify-content: space-between;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.edu-date {
    color: var(--text-light);
    font-size: 0.95rem;
    font-family: 'Inter', monospace;
}

.edu-degree {
    color: var(--text-light);
}

/* Footer */
footer {
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #888;
    display: flex;
    justify-content: space-between;
}

/* Responsive */
@media (max-width: 700px) {
    .profile-header {
        flex-direction: column-reverse; /* Info below image on mobile usually looks weird, let's keep info top or put image top. Let's do Image top. */
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }
    
    .profile-image-container {
        margin: 0 auto;
    }
    
    .social-links {
        justify-content: center;
    }

    .publication-item {
        flex-direction: column;
    }

    .pub-teaser {
        width: 100%;
        max-width: 300px;
        margin-bottom: 0.5rem;
    }
}
