/* Subtle public-site polish: spacing, hierarchy, and homepage composition. */

html,
body {
    background: var(--bg);
}

.main {
    padding-top: 3.6rem;
}

.nav-links a {
    line-height: 1.45;
}

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

.page-title {
    line-height: 1.08;
    margin-bottom: 0.35rem;
}

.page-note {
    max-width: 540px;
    line-height: 1.42;
    margin-bottom: 1.45rem;
}

.section-marker {
    margin-top: 1.65rem;
    margin-bottom: 0.95rem;
}

.section-marker:first-of-type {
    margin-top: 0;
}

.page-title + .section-marker {
    margin-top: 1.45rem;
}

.profile-header {
    max-width: 690px;
    align-items: center;
    gap: 2.25rem;
    margin-bottom: 1.45rem;
}

.profile-copy {
    flex: 1 1 auto;
}

.name {
    line-height: 1.05;
    margin-bottom: 0.35rem;
}

.pronunciation-button {
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transform: translateY(-0.05rem);
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.pronunciation-button:hover,
.pronunciation-button:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.pronunciation-button svg {
    width: 0.82rem;
    height: 0.82rem;
}

.native-name {
    font-size: 0.62em;
}

.pronunciation-guide {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    line-height: 1.35;
    color: var(--text-muted);
    margin: 0.05rem 0 0.25rem;
}

.pronunciation-guide span {
    color: var(--text);
}

.handle {
    line-height: 1.35;
}

.profile-photo {
    width: 148px;
    height: 148px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.intro {
    max-width: 620px;
    margin-bottom: 2rem;
}

.intro p {
    line-height: 1.48;
    margin-bottom: 0.65rem;
}

.updates {
    max-width: 620px;
}

.update-item {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 0.55rem;
    line-height: 1.42;
}

.update-date {
    font-size: 0.68rem;
}

.pub-item,
.exp-item,
.project-item {
    max-width: 640px;
    margin-bottom: 1.45rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--border);
}

.pub-item:last-of-type,
.exp-item:last-of-type,
.project-item:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

:target {
    scroll-margin-top: 5rem;
}

.pub-item:target,
.timeline-entry:target,
.agent-anchor-highlight {
    outline: 2px solid rgba(182, 95, 60, 0.42);
    outline-offset: 7px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(182, 95, 60, 0.12), rgba(182, 95, 60, 0.035) 68%, transparent);
    box-shadow: 0 0 0 8px rgba(182, 95, 60, 0.08);
    transition: background-color 180ms ease, box-shadow 180ms ease, outline-color 180ms ease;
}

@media (prefers-reduced-motion: no-preference) {
    .pub-item:target,
    .timeline-entry:target,
    .agent-anchor-highlight {
        animation: agent-anchor-pulse 1200ms ease-out 2;
    }

    @keyframes agent-anchor-pulse {
        0% { box-shadow: 0 0 0 0 rgba(182, 95, 60, 0.28); }
        100% { box-shadow: 0 0 0 14px rgba(182, 95, 60, 0.02); }
    }
}

.pub-number {
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.pub-title,
.exp-role,
.project-title,
.post-title {
    line-height: 1.25;
}

.pub-title {
    margin-bottom: 0.35rem;
}

.pub-authors {
    line-height: 1.35;
    margin-bottom: 0.25rem;
}

.pub-authors a.link {
    color: inherit;
}

.pub-authors a.link:hover {
    color: var(--accent);
}

.pub-venue {
    margin-bottom: 0.45rem;
}

.pub-context {
    line-height: 1.4;
    margin-bottom: 0.45rem;
}

.pub-abstract {
    border-left-width: 1px;
    line-height: 1.42;
    margin-bottom: 0.55rem;
    padding-left: 0.8rem;
}

.pub-links {
    gap: 0.45rem 0.5rem;
}

.exp-header {
    margin-bottom: 0.45rem;
}

.exp-role {
    margin-bottom: 0.1rem;
}

.exp-period {
    margin-bottom: 0.5rem;
}

.exp-description,
.project-description {
    line-height: 1.43;
    margin-bottom: 0.55rem;
}

.exp-list li {
    line-height: 1.4;
    margin-bottom: 0.18rem;
}

.teaching-block {
    border-left-width: 1px;
    margin-top: 0.85rem;
    padding-left: 0.85rem;
}

.semester {
    margin-bottom: 0.35rem;
}

.project-title {
    margin-bottom: 0.4rem;
}

.project-tech,
.post-tags {
    gap: 0.35rem 0.45rem;
}

.tech-tag,
.post-tag {
    line-height: 1.35;
}

.timeline {
    max-width: 640px;
}

.timeline-entry {
    padding-bottom: 1.35rem;
}

.entry-title {
    line-height: 1.25;
    margin-bottom: 0.1rem;
}

.entry-note {
    line-height: 1.42;
}

.era {
    padding: 1rem 0 0.65rem;
}

.post-item {
    max-width: 640px;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.post-content {
    padding-bottom: 1.15rem;
}

.post-title {
    margin-bottom: 0.25rem;
}

.post-excerpt {
    line-height: 1.4;
}

@media (max-width: 768px) {
    .main {
        padding-top: 1.8rem;
    }

    .page-note {
        margin-bottom: 1.25rem;
    }

    .profile-header {
        margin-bottom: 1.3rem;
    }

    .pronunciation-button {
        width: 1.45rem;
        height: 1.45rem;
        transform: translateY(-0.08rem);
    }

    .profile-photo {
        width: 120px;
        height: 120px;
        margin-top: 0.15rem;
    }

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

    .pub-item,
    .exp-item,
    .project-item {
        margin-bottom: 1.25rem;
        padding-bottom: 1.2rem;
    }

    .timeline-entry {
        padding-bottom: 1.2rem;
    }
}
