/* ============================================================
   Zixuan (Vicky) Lu — personal homepage
   Clean single-file stylesheet inspired by ruixu.me
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
    --fg: #111827;
    --fg-muted: #4b5563;
    --fg-subtle: #6b7280;
    --bg: #ffffff;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --red: #dc2626;
    --border: #e5e7eb;
    --card-bg: #ffffff;
    --surface: #f9fafb;
    --gradient: linear-gradient(90deg, #06b6d4 0%, #10b981 40%, #6366f1 80%, #ec4899 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
    --radius: 14px;
    --max-w: 960px;
}

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--fg);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

b, strong { color: var(--fg); font-weight: 600; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header / nav ---------- */
.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}
.site-header .brand {
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -0.01em;
}
.site-header nav a {
    color: var(--fg-muted);
    margin-left: 22px;
    font-size: 0.95em;
    font-weight: 500;
}
.site-header nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 40px;
    padding: 56px 0 32px;
}
@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; padding: 36px 0 16px; }
}

.hero h1 {
    font-size: 3.4em;
    font-weight: 800;
    line-height: 1.05;
    margin: 0 0 22px 0;
    letter-spacing: -0.02em;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.hero h1 .wave {
    display: inline-block;
    -webkit-text-fill-color: initial;
    color: initial;
    margin-left: 6px;
    animation: wave 2.4s ease-in-out infinite;
    transform-origin: 70% 70%;
}
@keyframes wave {
    0%, 60%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
}

.hero .intro p {
    margin: 0 0 14px 0;
    color: var(--fg);
    font-size: 1.02em;
}
.hero .intro .accent-red {
    color: var(--red);
    font-weight: 500;
}

/* ---------- Profile card ---------- */
.profile-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    align-self: start;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.3s ease;
}
.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.05);
}
.profile-card .photo {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
    background: #fff;
    transition: transform 0.5s ease;
}
.profile-card:hover .photo {
    transform: scale(1.03);
}
.profile-card .body {
    padding: 14px 16px 12px;
}
.profile-card .name {
    font-size: 1.08em;
    font-weight: 700;
    margin: 0 0 2px 0;
}
.profile-card .role {
    color: var(--fg-subtle);
    font-size: 0.88em;
    margin: 0 0 10px 0;
}
.profile-card ul.info {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}
.profile-card ul.info li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--fg-muted);
    font-size: 0.84em;
    padding: 3px 0;
}
.profile-card ul.info li svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: var(--fg-subtle);
}
.profile-card .links {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--fg-muted);
}
.profile-card .links a {
    display: inline-flex;
    align-items: center;
    color: var(--fg-muted);
}
.profile-card .links a:hover { color: var(--accent); }
.profile-card .links svg { width: 20px; height: 20px; }
.profile-card .links .sep { color: var(--border); user-select: none; }
.profile-card .gradient-bar {
    height: 4px;
    width: 100%;
    background: var(--gradient);
}

/* ---------- Generic section ---------- */
section {
    padding: 28px 0;
    border-top: 1px solid var(--border);
}
section:first-of-type { border-top: none; }
section h2 {
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 18px 0;
    color: var(--fg);
}

/* ---------- News ---------- */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-list li {
    padding: 6px 0;
    color: var(--fg-muted);
    font-size: 0.96em;
}
.news-list li .date {
    color: var(--fg);
    font-weight: 600;
    margin-right: 4px;
}
.news-list li.highlight { color: var(--red); font-weight: 500; }
.news-list li.highlight .date { color: var(--red); }

/* ---------- Experience ---------- */
.exp-list {
    list-style: none;
    padding: 0;
    margin: 0 0 26px 0;
}
.exp-list li {
    padding: 8px 0;
    color: var(--fg-muted);
}
.exp-list li .date {
    color: var(--fg);
    font-weight: 600;
    margin-right: 6px;
}
.exp-list li .pos { color: var(--fg); }

.logo-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 8px 0 0;
    overflow: visible;
}
.logo-grid .logo {
    flex: 1 1 0;
    min-width: 0;
    max-width: 16.66%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    padding: 0 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: transform 0.2s ease;
    overflow: visible;
    text-decoration: none;
}
.logo-grid .logo:hover {
    transform: translateY(-4px);
    box-shadow: none;
}
.logo-grid .logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
/* MCAS circle — narrower tile to reduce side gaps */
.logo-grid .logo:nth-child(5) { max-width: 6%; padding: 0; }

/* ---------- Publications ---------- */
.pub-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.pub {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: flex-start;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}
.pub:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.09), 0 4px 10px rgba(0, 0, 0, 0.04);
    border-color: #d1d5db;
}
@media (max-width: 640px) {
    .pub { grid-template-columns: 1fr; }
}
.pub .thumb {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
}
.pub .thumb img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}
.pub:hover .thumb img {
    transform: scale(1.04);
}
.pub .title {
    font-size: 1.05em;
    font-weight: 600;
    color: var(--fg);
    margin: 0 0 4px 0;
    line-height: 1.35;
}
.pub .title a { color: var(--fg); }
.pub .title a:hover { color: var(--accent); }
.pub .authors { color: var(--fg-muted); font-size: 0.93em; margin: 2px 0; }
.pub .venue { color: var(--fg-subtle); font-size: 0.92em; margin: 2px 0 6px; }
.pub .badge-new {
    display: inline-block;
    background: var(--red);
    color: #fff;
    font-size: 0.7em;
    padding: 1px 7px;
    border-radius: 10px;
    vertical-align: middle;
    margin-right: 6px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.pub .links {
    margin-top: 4px;
    font-size: 0.9em;
    color: var(--fg-subtle);
}
.pub .links a { margin-right: 2px; }
.pub .note { color: var(--fg-subtle); font-size: 0.86em; font-style: italic; margin-top: 4px; }

/* ---------- Footer ---------- */
footer.site-footer {
    margin-top: 40px;
    padding: 24px 0 32px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--fg-subtle);
    font-size: 0.88em;
}
footer.site-footer a { color: var(--fg-muted); }

/* Small helper */
.small { font-size: 0.88em; color: var(--fg-subtle); }
