/* Reset and Base Styles */
/* Language switcher */
.lang-switch{display:flex;gap:8px;align-items:center;margin-left:auto}
.lang-switch button{font-size:.85rem;padding:6px 10px;border-radius:8px;border:1px solid #cbd5e1;background:#fff;color:#0f172a;cursor:pointer;transition:.2s ease}
.lang-switch button:hover{background:#f1f5f9}
.lang-switch button.active{background:#2563eb;color:#fff;border-color:#2563eb}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #0f172a;
    background-color: #f8fafc;
    overflow-x: hidden;
}

/* Better global link contrast */
a { color: #1d4ed8; }
a:hover { color: #1e40af; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: #3b82f6;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #60a5fa;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #cbd5e1;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
    z-index: 1;
    padding-bottom: 2rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-greeting {
    display: block;
    font-size: 2.5rem;
    color: #60a5fa;
    margin-bottom: 0.5rem;
}

.hero-name {
    display: inline-block;
    font-size: 4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

/* Small-sized '입니다' next to the name in Korean */
.hero-title .hero-imnida {
    display: inline-block;
    font-size: 1.0em;
    margin-left: 0.25em;
    color: inherit;
    font-weight: 500;
}

.hero-nickname {
    display: block;
    font-size: 3rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hero-subtitle-small {
    font-size: 1.2rem;
    color: #1f2937;
    margin-bottom: 1.3rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: #334155;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border: 1px solid #1d4ed8;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: #1f2937;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: #111827;
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease-out;
}

.hero-avatar {
    width: 400px;
    height: 400px;
    border-radius: 12px;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar-placeholder {
    font-size: 4rem;
    font-weight: 700;
    color: white;
}

.avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid #60a5fa;
    border-bottom: 2px solid #60a5fa;
    transform: rotate(45deg);
}

/* Section Styles */
section {
    padding: 6rem 0;
    position: relative;
    z-index: 2;
}

/* Ensure proper spacing between hero and about sections */
.about {
    margin-top: 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #475569;
}

/* About Section */
.about {
    background: #ffffff;
    z-index: 3;
}

/* CTA that sits just below About should match About background */
.post-about-cta {
  background: #ffffff;
  padding: 0; /* override global section padding for a tighter look */
}


.about-text p {
    font-size: 1.1rem;
    color: #334155;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}


/* About bullets indentation */
.about .about-text ul { list-style: disc; margin: 0.25rem 0 0.75rem 1.25rem; padding-left: 0; display: grid; gap: 6px; }
.about .about-text ul li { margin: 0; }

/* Education Section */
.education-intro {
    margin-bottom: 3rem;
}

.education-intro p {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.education-timeline {
    position: relative;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #60a5fa;
}

.education-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    position: relative;
}

.education-item::before {
    content: '';
    position: absolute;
    left: calc(2rem - 5px);
    top: 0;
    width: 10px;
    height: 10px;
    background: #60a5fa;
    border-radius: 50%;
    z-index: 1;
}

.education-period {
    font-size: 1.1rem;
    font-weight: 600;
    color: #60a5fa;
    text-align: right;
    padding-right: 1rem;
}


/* Experience section */
.experience .experience-grid{display:grid;grid-template-columns:1fr;gap:24px}
.experience-item{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:24px;box-shadow:0 6px 16px rgba(0,0,0,.05)}
.experience-header h3{margin:0 0 4px;font-size:1.25rem;color:#0f172a}
.exp-meta{color:#475569;margin-bottom:8px}
.exp-bullets{list-style:disc;margin-left:1.25rem;display:grid;gap:6px}
@media (min-width: 900px){.experience .experience-grid{grid-template-columns:1fr 1fr}}

.education-details h3 {
    font-size: 1.5rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.education-details h4 {
    font-size: 1.2rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.education-details p {
    color: #334155;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.education-achievements h5 {
    color: #0f172a;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.education-achievements ul {
    list-style: none;
    margin-bottom: 1rem;
}

/* Publications: cards are clickable (no inline abstracts) */
.publication-item { position: relative; }
.publication-content h3 { cursor: pointer; }
/* Hide abstracts/figures/links only on the main Publications section, not on paper pages */
.publications .publication-abstract,
.publications .publication-toggle,
.publications .publication-links { display: none !important; }
/* Allow our new thumbnail to show */
.publications .pub-figure-placeholder { display: block !important; }

.education-achievements li {
    color: #334155;
    line-height: 1.7;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.education-achievements li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #60a5fa;
}

/* Top Achievements */
.achievements .highlights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
.achievements .highlight-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}
.achievements .highlight-card h4 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #2563eb;
}
.achievements .highlight-list { list-style: none; margin: 0; padding: 0; }
.achievements .highlight-list li { margin: 6px 0; }
.achievements .highlight-list a { color: #0f172a; text-decoration: none; }
.achievements .highlight-list a:hover { text-decoration: underline; }
.achievements .highlight-list li a {
  display: grid;
  grid-template-columns: clamp(360px, 70%, 1100px) 1fr;
  column-gap: 12px;
  row-gap: 4px;
  align-items: start;
}
.achievements .highlight-list li a .ta-title { min-width: 0; font-weight: 600; }
.achievements .highlight-list li a .ta-meta { color: #64748b; text-align: right; justify-self: end; }
@media (max-width: 640px) {
  .achievements .highlight-list li a { grid-template-columns: 1fr; }
}


/* Publications Section */
.publications {
    background: #ffffff;
}

/* Publication thumbnail shown on main page cards */
.publication-thumb {
    width: 100%;
    height: 500px; /* fixed height for uniform card sizes */
    object-fit: contain; /* show full image without cropping */
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-top: 0.75rem;
    display: block;
}

@media (max-width: 768px) {
    .publication-thumb {
        height: 140px; /* slightly smaller on mobile */
    }
}

.publications-grid {
    display: grid;
    gap: 2rem;
}

.publication-item {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.publication-content h3 {
    font-size: 1.25rem;
    color: #0f172a;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.publication-authors {
    color: #1f2937;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* Emphasize my name on the main Publications grid only */
.publications .publication-authors strong {
    font-size: 1.15em;
}


.publication-venue {
    color: #334155;
    font-style: normal;
    margin-bottom: 0.75rem;
}

.publication-description {
    color: #cbd5e1;
    line-height: 1.6;
}

/* Portfolio-style paper sections on main Publications cards */
.case-sections { margin-top: 0.75rem; }
.case-sections dt { font-weight: 600; color: #0ea5e9; margin-top: 0.5rem; font-size: 0.9rem; }
.case-sections dd { margin: 0.25rem 0 0.75rem 0; color: #334155; }
/* Bullets inside paper cards */
.case-sections dd ul { list-style: disc; margin: 0.25rem 0 0.75rem 1.25rem; padding-left: 0; display: grid; gap: 4px; }
.case-sections dd ul li { margin: 0; }


/* Two-column grid for publication cards (image left, details right) */
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 768px) { .case-grid { grid-template-columns: 1fr; } }

/* Paper meta labels */
.paper-meta { margin-bottom: 0.75rem; }
.paper-meta .label { font-weight: 600; color: #64748b; margin-top: 0.5rem; font-size: 0.9rem; }


/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    font-size: 2rem;
}

.contact-details h4 {
    color: #f1f5f9;
    margin-bottom: 0.25rem;
}

.contact-details p {
    color: #cbd5e1;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 0.5rem;
    color: #e2e8f0;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #60a5fa;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

/* Footer */
.footer {
    background: #ffffff;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.footer p {
    color: #94a3b8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(15, 23, 42, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        padding: 1rem;
        display: block;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-nickname {
        font-size: 2rem;
    }

    .hero-avatar {
        width: 280px;
        height: 280px;
    }

    .avatar-placeholder {
        font-size: 3rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .section-title {
        font-size: 2rem;
    }

    .education-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .education-timeline::before {
        left: 1rem;
    }

    .education-item::before {
        left: calc(1rem - 5px);
    }

    .education-period {
        text-align: left;
        padding-right: 0;
        padding-left: 2rem;
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    /* Prevent timeline overlap with text on small screens */
    .education-details {
        padding-left: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

    section {
        padding: 4rem 0;
    }

    .about {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-nickname {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .publication-item {
        padding: 1.5rem;
    }

    .publication-content h3 {
        font-size: 1.1rem;
    }

    .about {
        margin-top: 0.5rem;
    }

    /* Extra-small phones: a bit more left padding for timeline clearance */
    .education-details {
        padding-left: 2.25rem;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Skills section (if needed later) */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-item {
    background: #334155;
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
}


/* Projects Section */
.projects {
  background: #0f172a;
}

.projects .section-title {
  color: #ffffff;
}

.projects .section-subtitle {
  color: #94a3b8;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.project-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* .project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
} */

.project-header { margin-bottom: 0.75rem; }
.project-title { font-size: 1.2rem; font-weight: 700; color: #e2e8f0; margin: 0 0 0.25rem 0; }
.project-subtitle { color: #94a3b8; font-size: 0.95rem; }

/* Category color accents - removed from titles, now using badges */

.project-bullets { list-style: none; padding-left: 0; margin: 0.75rem 0 1rem; }
.project-bullets li { position: relative; padding-left: 1.25rem; color: #cbd5e1; margin-bottom: 0.5rem; }
.project-bullets li::before { content: '▹'; position: absolute; left: 0; color: #60a5fa; }

.project-meta { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }
/* Slightly more space under tags when used in project headers */
.project-header .project-meta { margin-top: 0.25rem; margin-bottom: 0.6rem; }

.badge { padding: 0.25rem 0.5rem; border-radius: 0.375rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; }
.badge.eval { background: rgba(96,165,250,0.15); color: #60a5fa; border: 1px solid rgba(96,165,250,0.3); }
.badge.train { background: rgba(52,211,153,0.15); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
/* Inline project link wrapper to keep links inline with text */
.project-link-wrapper { color: #334155; }
.project-link-wrapper a { color: #2563eb; text-decoration: underline; }

.badge.interp { background: rgba(244,114,182,0.15); color: #f472b6; border: 1px solid rgba(244,114,182,0.3); }
.badge.data { background: rgba(251,191,36,0.15); color: #f59e0b; border: 1px solid rgba(251,191,36,0.3); }
.badge.agents { background: rgba(167,139,250,0.15); color: #a78bfa; border: 1px solid rgba(167,139,250,0.3); }


.project-link { color: #93c5fd; text-decoration: none; }
.project-link:hover { text-decoration: underline; }

.professor-link {
  color: inherit;
  text-decoration: underline;
}
.professor-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

@media (max-width: 480px) {
  .projects-grid { grid-template-columns: 1fr; }
}

.skill-name {
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 1rem;
}

.skill-progress {
    width: 100%;
    height: 8px;
    background: #475569;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 4px;
    transition: width 1s ease;
}



/* Projects: match portfolio light card style */
.projects { background: #ffffff; }
.projects .section-title { color: #0f172a; }
.project-card { background: #ffffff; border: 1px solid #e5e7eb; color: #0f172a; }
.project-subtitle { color: #475569; }
.project-bullets li { color: #334155; }
.project-link { color: #2563eb; }

/* Education bullets layout (from portfolio) */
.edu-bullets { list-style: none; padding-left: 0; margin: 10px 0 0; }
.edu-item { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; align-items: start; }
.edu-key { color: #64748b; font-weight: 600; white-space: nowrap; }
.edu-val { color: #0f172a; }
@media (max-width: 640px){ .edu-item{ grid-template-columns: 1fr; } .edu-key{ margin-top:6px; white-space: normal; } }

/* Generic card + grid utilities to mirror portfolio */
.card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:16px; color:#0f172a; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width: 900px){ .grid-2{ grid-template-columns:1fr; } }

.education .grid-2 { grid-template-columns: 1fr; }

.experience .grid-2 { grid-template-columns: 1fr; }


/* Ensure project title color on light background */
.projects .project-title { color: #0f172a; }

/* Generic bullets for cards */
.bullets { list-style: disc; margin-left: 1.25rem; display: grid; gap: 6px; }
.meta { color: #64748b; margin-left: 6px; }


/* Global: tighten horizontal padding for all cards site‑wide */
.publication-item,
.project-card,
.experience-item,
.card,
.achievements .highlight-card {
  padding-left: 1rem;
  padding-right: 1rem;
}


/* Contact buttons centering */
.contact .contact-info { grid-column: 1 / -1; text-align: center; }
.contact .contact-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.contact .contact-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
