/* ══════════════════════════════════════════
   nangman theme — Apple-minimal academic
   ══════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-soft: rgba(0, 113, 227, 0.08);
    --accent-ring: rgba(0, 113, 227, 0.25);

    --bg: #fbfbfd;
    --bg-elevated: #ffffff;
    --bg-subtle: #f5f5f7;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --border: rgba(0, 0, 0, 0.08);
    --hairline: rgba(0, 0, 0, 0.06);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 1px 2px rgba(0, 0, 0, 0.04), 0 20px 48px rgba(0, 0, 0, 0.09);

    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 24px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dur: 0.4s;
    --transition: var(--dur) var(--ease);
}

[data-theme="dark"] {
    --accent: #2997ff;
    --accent-hover: #0a84ff;
    --accent-soft: rgba(41, 151, 255, 0.12);
    --accent-ring: rgba(41, 151, 255, 0.3);

    --bg: #000000;
    --bg-elevated: #1d1d1f;
    --bg-subtle: #1d1d1f;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #6e6e73;
    --border: rgba(255, 255, 255, 0.1);
    --hairline: rgba(255, 255, 255, 0.06);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* ── Base ── */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}
::selection { background: var(--accent-soft); color: var(--accent); }
[data-theme="dark"] ::selection { background: rgba(41,151,255,0.22); color: var(--text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 999px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-color: var(--bg); }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
p { color: var(--text-secondary); line-height: 1.65; }
strong { color: var(--text); font-weight: 500; }
hr { border-color: var(--hairline); opacity: 1; }
[data-theme="dark"] .text-dark,
[data-theme="dark"] .link-dark { color: var(--text) !important; }
[data-theme="dark"] .text-muted { color: var(--text-secondary) !important; }

h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    letter-spacing: -0.022em;
    font-weight: 600;
    text-wrap: balance;
}
h1 { font-weight: 600 !important; letter-spacing: -0.04em; }
h3 { font-size: 1.75rem; }
h5 { font-size: 1.125rem; letter-spacing: -0.018em; }
.fw-light { font-weight: 400 !important; }
.fw-normal { font-weight: 500 !important; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ── Subtle aurora — only ambient visual kept by default ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(0, 113, 227, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 60% 70% at 85% 70%, rgba(0, 113, 227, 0.035) 0%, transparent 70%);
    z-index: -10;
    pointer-events: none;
}
[data-theme="dark"] body::before {
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(41, 151, 255, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 60% 70% at 85% 70%, rgba(41, 151, 255, 0.06) 0%, transparent 70%);
}

/* ── Hero ── */
.hero {
    min-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 3rem 1.5rem 4rem;
}

.hero-name {
    font-size: clamp(2.5rem, 6.5vw, 3.75rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 0.6rem;
    color: var(--text);
}
.hero-name-sub {
    font-size: 0.55em;
    color: var(--text-tertiary);
    font-weight: 400;
    letter-spacing: -0.02em;
}
.hero-subtitle {
    font-size: clamp(0.98rem, 1.5vw, 1.1rem);
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 620px;
    line-height: 1.6;
    margin: 0 auto 0.25rem;
}
.hero-subtitle.typing-text {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
    max-width: 640px;
}

/* ── Hero buttons — filled + ghost only ── */
.hero-links {
    display: flex;
    gap: 0.6rem;
    margin-top: 2.25rem;
    flex-wrap: wrap;
    justify-content: center;
}
.hero-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: 980px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s var(--ease), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
    border: 1px solid transparent;
    line-height: 1.2;
    cursor: pointer;
}
.hero-links a:active { transform: scale(0.97); }
.hero-links .btn-accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,113,227,0.15);
}
.hero-links .btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,113,227,0.28);
}
.hero-links .btn-accent-alt,
.hero-links .btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.hero-links .btn-accent-alt:hover,
.hero-links .btn-outline:hover {
    background: var(--accent-soft);
    border-color: var(--accent-ring);
    color: var(--accent);
}

/* ── Profile ring — subtle gradient halo ── */
.profile-ring {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent), #8ec4ff 60%, rgba(0,113,227,0.15));
    margin-bottom: 1.75rem;
    animation: float 8s ease-in-out infinite;
}
[data-theme="dark"] .profile-ring {
    background: linear-gradient(135deg, var(--accent), #6fb4ff 60%, rgba(41,151,255,0.15));
}
.profile-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg);
    display: block;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ── Scroll indicator ── */
.scroll-indicator {
    margin-top: 2.5rem;
    color: var(--text-tertiary);
    opacity: 0.5;
    font-size: 1rem;
    animation: bounce 2.2s ease-in-out infinite;
    transition: opacity var(--transition);
}
.scroll-indicator:hover { opacity: 0.9; }
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

/* ── Sticky header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}
.site-header.scrolled {
    background: rgba(251, 251, 253, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
}
[data-theme="dark"] .site-header.scrolled {
    background: rgba(0, 0, 0, 0.72);
    border-bottom-color: var(--hairline);
}

/* ── Navigation ── */
.nav-link-active,
.nav-link-inactive {
    border-radius: 980px;
    padding: 0.3rem 0.85rem !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    transition: background var(--transition), color var(--transition);
}
.nav-link-active {
    background: var(--accent-soft);
    color: var(--accent) !important;
    -webkit-text-fill-color: var(--accent);
}
.nav-link-inactive {
    color: var(--text-secondary);
}
.nav-link-inactive:hover {
    color: var(--text);
    background: var(--hairline);
}
[data-theme="dark"] .nav-link-inactive { color: var(--text-secondary); }
[data-theme="dark"] .nav-link-inactive:hover { color: var(--text); background: rgba(255,255,255,0.06); }

@media (max-width: 991.98px) {
    #mainNav { margin-top: 1rem; }
    #mainNav .d-flex { border-top: 1px solid var(--hairline); padding-top: 0.5rem; }
    #mainNav a { border-bottom: 1px solid var(--hairline); }
    #mainNav a:last-child { border-bottom: none; }
    .nav-link-active, .nav-link-inactive {
        border-radius: var(--radius-sm);
        padding: 0.55rem 0.85rem !important;
    }
}
@media (min-width: 992px) { #mainNav { display: flex !important; } }

/* ── Theme toggle ── */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.35rem;
    color: var(--text-secondary);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.theme-toggle:hover {
    background: var(--hairline);
    color: var(--text);
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s var(--ease);
}
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 360ms; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 420ms; }

.hero-fade {
    opacity: 0;
    transform: translateY(16px);
    animation: heroIn 0.8s var(--ease) forwards;
    position: relative;
    z-index: 2;
}
.hero-fade:nth-child(1) { animation-delay: 0.05s; }
.hero-fade:nth-child(2) { animation-delay: 0.2s; }
.hero-fade:nth-child(3) { animation-delay: 0.35s; }
.hero-fade:nth-child(4) { animation-delay: 0.5s; }
.hero-fade:nth-child(5) { animation-delay: 0.65s; }
@keyframes heroIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ── Cards — clean Apple surface ── */
.card {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    overflow: hidden;
    position: relative;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-ring) !important;
}
[data-theme="dark"] .card {
    background: var(--bg-elevated) !important;
    border-color: var(--border) !important;
    color: var(--text);
}
[data-theme="dark"] .card-text { color: var(--text-secondary) !important; }
[data-theme="dark"] .shadow-sm { box-shadow: var(--shadow-sm) !important; }

.card-research {
    padding-left: 0;
}
.card-research::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* ── Section titles ── */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 0;
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text);
}
.section-title::after { display: none; }
.section-eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
h2.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.028em;
}

.page-content h3,
.page-content h5 {
    position: relative;
    display: inline-block;
    padding-bottom: 0;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.page-content h3::after,
.page-content h5::after { display: none; }

.page-content {
    min-height: 60vh;
    padding-top: 2.5rem;
    padding-bottom: 5rem;
}

/* ── Hobby cards ── */
.hobby-card {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem !important;
    cursor: default;
    text-align: center;
    gap: 0.25rem;
}
.hobby-card .hobby-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
    transition: transform 0.4s var(--ease), background var(--transition);
}
.hobby-card:hover .hobby-icon {
    transform: scale(1.08);
    background: var(--accent);
    color: #fff;
}
.hobby-card h6 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
    color: var(--text);
}
.hobby-card small {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    letter-spacing: 0.01em;
}
/* Backward compat — older fs-1 icons */
.hobby-card .fs-1 {
    color: var(--accent);
    transition: transform 0.4s var(--ease);
    font-size: 1.5rem !important;
}
.hobby-card:hover .fs-1 { transform: scale(1.12); }

/* ── News card ── */
.news-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 1.75rem;
    box-shadow: var(--shadow-sm);
}
.news-card ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}
.news-card li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--hairline);
    font-weight: 400;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 1rem;
    line-height: 1.55;
}
.news-card li:last-child { border-bottom: none; }
.news-card li strong {
    color: var(--accent);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    min-width: 68px;
    flex-shrink: 0;
}

/* ── Section divider ── */
.section-divider {
    width: 40px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    margin: 3rem auto;
}

/* ── Footer ── */
.site-footer {
    margin-top: 5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--hairline);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.82rem;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.footer-links a {
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}
.footer-links a:hover {
    color: var(--accent);
    border-color: var(--accent-ring);
    background: var(--accent-soft);
}

/* ── Profile (About) ── */
.profile-img { max-width: 150px; width: 100%; height: auto; border-radius: 50%; }
.profile-info { text-align: center; }

/* ── Badges ── */
.badge {
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: 980px;
    padding: 0.3em 0.7em;
}
.badge.bg-primary { background-color: var(--accent) !important; }
.badge.bg-light.text-dark {
    background: var(--bg-subtle) !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
}
[data-theme="dark"] .badge.bg-light {
    background: var(--bg-subtle) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

/* ── Gallery ── */
.gallery-item img { transition: transform .4s var(--ease), filter .3s ease; display: block; width: 100%; height: auto; }
.gallery-item a { text-decoration: none; }
.gallery-item figure {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}
.gallery-item:hover figure { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gallery-item:hover img { transform: scale(1.04); filter: brightness(.95); }
.gallery-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease), filter .3s ease; }

/* ── Lightbox ── */
.lightbox { position: fixed; inset: 0; z-index: 1100; display: block; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.lightbox.d-none { display: none; }
.lightbox:not(.d-none) { opacity: 1; pointer-events: auto; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(10px); opacity: 0; transition: opacity .25s ease; }
.lightbox:not(.d-none) .lightbox-backdrop { opacity: 1; }
.lightbox-content {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    max-width: 90vw; max-height: 90vh;
    background: var(--bg-elevated);
    padding: 1rem 1.25rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: lb-pop .35s var(--ease);
}
.lightbox-content img { display: block; border-radius: var(--radius-sm); margin: 0 auto; }
#lightbox-caption { color: var(--text); font-size: 0.95rem; max-width: 70ch; margin: 0.75rem auto 0; }
.lightbox img { max-height: 80vh; width: auto; height: auto; }
@keyframes lb-pop { 0% { transform: translate(-50%,-50%) scale(.94); opacity: 0; } 100% { transform: translate(-50%,-50%) scale(1); opacity: 1; } }
@media (min-width: 992px) { .lightbox-content { max-width: 60vw; } }
@media (max-width: 576px) { .lightbox-content { max-width: 95vw; padding: .75rem .75rem 1rem; } .lightbox-content img { width: 100%; } }
.lb-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
    color: #fff; border: 1px solid rgba(255,255,255,0.2);
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.2rem; cursor: pointer;
    transition: background .25s ease;
    z-index: 5;
}
.lb-nav-btn:hover { background: rgba(255,255,255,0.25); }
.lb-prev { left: .75rem; }
.lb-next { right: .75rem; }

/* ── Dark mode overrides ── */
[data-theme="dark"] .lightbox-content { background: var(--bg-elevated); }
[data-theme="dark"] .talk-title { color: var(--accent); }
[data-theme="dark"] footer { border-top-color: var(--hairline) !important; }

/* ── Guestbook ── */
.guestbook-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.guestbook-mascot {
    width: 60px; height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    animation: float 7s ease-in-out infinite;
}
.guestbook-wrap {
    margin-top: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
}

/* ── Misc ── */
.home-news { list-style: none; padding-left: 0; }
.gradient-text { color: var(--text); }

/* ── Hidden-by-default FX canvases (opt-in via ?fx=full) ── */
#particle-canvas,
#wave3d-canvas,
#cursor-glow {
    display: none;
}
html.fx-full #particle-canvas,
html.fx-full #wave3d-canvas {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
html.fx-full #cursor-glow {
    display: block;
    position: fixed;
    width: 500px; height: 500px;
    margin-left: -250px; margin-top: -250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,113,227,0.10) 0%, rgba(0,113,227,0.04) 35%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    will-change: left, top;
}
[data-theme="dark"] html.fx-full #cursor-glow {
    background: radial-gradient(circle, rgba(41,151,255,0.18) 0%, rgba(41,151,255,0.08) 35%, transparent 65%);
}
@media (max-width: 768px) {
    html.fx-full #cursor-glow { display: none; }
}

/* ── Typing cursor ── */
.typing-text::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--accent);
    font-weight: 300;
    margin-left: 1px;
}
.typing-text.typing-done::after {
    animation: blinkFade 1s step-end forwards;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes blinkFade { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }

/* ── Talks (cards) ── */
.talk-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
}
.talk-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-ring);
}
.talk-card .talk-type {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.2em 0.7em;
    border-radius: 980px;
    margin-bottom: 0.6rem;
}
.talk-card .talk-title {
    display: block;
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.talk-card .talk-venue {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.talk-card .talk-note {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.82rem;
    margin-top: 0.4rem;
}

/* ── Publications placeholder ── */
.pub-empty {
    background: var(--bg-elevated);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}
.pub-empty .pub-empty-icon {
    font-size: 2rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
    display: block;
}

/* ── About contact row ── */
.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 980px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}
.contact-chip:hover {
    background: var(--accent-soft);
    border-color: var(--accent-ring);
    color: var(--accent);
}
.contact-chip i { color: var(--accent); }
.contact-chip:hover i { color: var(--accent); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .profile-ring,
    .guestbook-mascot,
    .scroll-indicator { animation: none; }
}
