/* ==========================================================================
   Ryo Fujii – Personal Website Styles
   ========================================================================== */

:root {
    --primary: #004f90;
    --text: #1f2328;
    --muted: #57606a;
    --border: #e5e7eb;
    --surface: #f7f8fa;
    --bg: #ffffff;
    --accent: #3b82d4;
}

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

body {
    font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

/* ---------- Header / About ---------- */
header {
    margin-bottom: 2.5rem;
}

.about-grid {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.profile-col {
    flex-shrink: 0;
    text-align: center;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.social-links a {
    color: var(--primary);
    text-decoration: none;
}

.social-links a:hover {
    text-decoration: underline;
}

.bio {
    flex: 1;
    min-width: 0;
}

.bio-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.bio p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.bio p a strong {
    font-weight: 600;
}

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

section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.3rem;
    margin-bottom: 1rem;
}

/* ---------- Entry blocks ---------- */
.entry {
    margin-bottom: 1.4rem;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.entry-title {
    font-weight: 700;
    font-size: 1rem;
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap;
}

.entry-subtitle {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

.entry ul {
    margin-top: 0.4rem;
    padding-left: 1.2rem;
}

.entry li {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.entry li li {
    font-size: 0.85rem;
}

/* ---------- Project groups ---------- */
.project-group {
    margin-top: 0.8rem;
}

.project-group-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.project {
    margin-bottom: 0.8rem;
    padding-left: 0.6rem;
    border-left: 2px solid var(--border);
}

.project-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.project-period {
    font-size: 0.8rem;
    color: var(--muted);
}

.project ul {
    margin-top: 0.3rem;
    padding-left: 1rem;
}

.project li {
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

/* ---------- Papers (two-column: image + details) ---------- */
.paper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.paper-img {
    flex-shrink: 0;
    width: 160px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.paper-img img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.paper-img object {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

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

.paper-venue {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.paper-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.4;
}

.paper-title a {
    color: var(--primary);
    text-decoration: none;
}

.paper-title a:hover {
    text-decoration: underline;
}

.paper-authors {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

.paper-authors strong {
    color: var(--text);
}

.paper-note {
    color: var(--muted);
    font-size: 0.78rem;
}

.paper-desc {
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.paper-links {
    margin-top: 0.3rem;
    font-size: 0.8rem;
}

.paper-links a {
    margin-right: 0.6rem;
    color: var(--primary);
    font-weight: 500;
}

/* ---------- Skills ---------- */
.skills-grid {
    display: grid;
    gap: 0.6rem;
}

.skill-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.skill-label {
    font-weight: 700;
    white-space: nowrap;
    min-width: 170px;
}

/* ---------- Achievements ---------- */
.achievement {
    margin-bottom: 0.8rem;
}

.achievement-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.achievement-title a {
    color: var(--primary);
    text-decoration: none;
}

.achievement-title a:hover {
    text-decoration: underline;
}

.achievement-desc {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------- Misc ---------- */
.inline-list {
    font-size: 0.9rem;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------- Lightbox ---------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 3rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem 2rem;
    }

    .about-grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .bio-name {
        font-size: 1.6rem;
    }

    .avatar {
        width: 140px;
        height: 140px;
    }

    .entry-header {
        flex-direction: column;
    }

    .skill-row {
        flex-direction: column;
        gap: 0.1rem;
    }

    .skill-label {
        min-width: auto;
    }

    .paper {
        flex-direction: column;
    }

    .paper-img {
        width: 100%;
    }
}
