/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-height) + 32px);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 50% at 20% 40%, var(--gradient-teal), transparent),
        radial-gradient(ellipse 50% 40% at 80% 60%, var(--gradient-purple), transparent);
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    column-gap: 48px;
    row-gap: 32px;
    align-items: center;
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-image {
    flex-shrink: 0;
    margin-bottom: 16px;
}

.hero-text {
    flex: 1;
}

.hero-name {
    font-size: var(--h2-size);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.03em;
}

.hero-title {
    font-size: var(--small-size);
    color: var(--accent-light);
    font-weight: 500;
    margin-bottom: 16px;
    min-height: 1.4em;
}

.typing-cursor {
    animation: blink-cursor 0.8s step-end infinite;
    color: var(--accent-light);
    font-weight: 300;
}

.hero-bio {
    font-size: var(--body-size);
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.hero-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
}

.btn--cv {
    font-size: 1.05rem;
    padding: 12px 32px;
    border-radius: 9999px;
    margin-top: 4px;
}

.hero-interests {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.hero-interests-title {
    font-size: var(--small-size);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-interests-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-interests-list li {
    font-size: var(--small-size);
    color: var(--accent-light);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 9999px;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.hero-interests-list li:hover {
    border-color: var(--accent);
    background-color: var(--accent-bg-subtle);
}

/* Section dividers */
.section + .section::before {
    content: '';
    display: block;
    width: 60%;
    max-width: 400px;
    height: 1px;
    margin: 0 auto 0;
    background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
    opacity: 0.3;
}

/* News */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: flex;
    gap: 20px;
    align-items: baseline;
    padding: 20px 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    transition: border-color var(--transition-fast);
}

.news-item:hover {
    border-color: var(--border-hover);
}

.news-item--highlight {
    border-left: 3px solid var(--accent-light);
}

.news-date {
    flex-shrink: 0;
    font-size: var(--small-size);
    font-weight: 600;
    color: var(--accent-light);
    min-width: 110px;
}

.news-text {
    color: var(--text-secondary);
    font-size: var(--body-size);
    line-height: 1.6;
}

/* Publications */
.pub-subsection-title {
    font-size: var(--h3-size);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    margin-top: 8px;
}

.pub-selected {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.pub-featured {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pub-featured:hover {
    transform: none;
}

.pub-featured-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    margin: calc(-1 * var(--card-padding));
    margin-bottom: 0;
}

.pub-featured-image img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.pub-image-credit {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: var(--xs-size);
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 6px 0 0 0;
}

.pub-featured-body {
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pub-featured-body .pub-venue {
    margin-bottom: 16px;
}

.pub-featured-body .pub-links {
    margin-top: auto;
}

.pub-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pub-card {
    padding: 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    transition: border-color var(--transition-fast);
    border-left: 3px solid var(--text-muted);
    position: relative;
}

.pub-card--conference {
    border-left-color: var(--accent-light);
}

.pub-card--poster {
    border-left-color: var(--accent);
}

.pub-card:hover {
    border-color: var(--border-hover);
}

.pub-year-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: var(--xs-size);
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 10px;
    border-radius: 6px;
}

.pub-type {
    display: inline-block;
    font-size: var(--xs-size);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-light);
    margin-bottom: 8px;
}

.pub-title {
    font-size: var(--body-size);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.pub-authors {
    font-size: var(--small-size);
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.pub-venue {
    font-size: var(--small-size);
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 12px;
}

.pub-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-card .card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card-title {
    font-size: var(--body-size);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.project-card-title a {
    color: var(--text-primary);
}

.project-card-title a:hover {
    color: var(--accent-light);
}

.project-card-desc {
    font-size: var(--small-size);
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex: 1;
    line-height: 1.6;
}

.project-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}

.project-card-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.project-hidden {
    display: none;
}

.show-more-btn {
    margin-top: 32px;
    text-align: center;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background-color: var(--accent);
    border-radius: 1px;
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.2s ease-out;
}

.timeline.timeline-visible::before {
    transform: scaleY(1);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 2px solid var(--accent-light);
    z-index: 1;
    transform: scale(0);
    transition: transform 0.4s ease;
}

.timeline-item.timeline-item-visible::before {
    transform: scale(1);
    animation: dot-pulse 0.6s ease forwards;
}

.timeline-year {
    font-size: var(--small-size);
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 4px;
}

.timeline-title {
    font-size: var(--body-size);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.timeline-org {
    font-size: var(--small-size);
    color: var(--text-muted);
    margin-bottom: 6px;
}

.timeline-desc {
    font-size: var(--small-size);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Open Source */
.opensource-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.opensource-card .card {
    display: flex;
    flex-direction: column;
}

.opensource-name {
    font-size: var(--h3-size);
    font-weight: 600;
    margin-bottom: 4px;
}

.opensource-name a {
    color: var(--text-primary);
}

.opensource-name a:hover {
    color: var(--accent-light);
}

.opensource-role {
    font-size: var(--xs-size);
    color: var(--accent-light);
    font-weight: 500;
    margin-bottom: 12px;
}

.opensource-desc {
    font-size: var(--small-size);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Demos */
.demos-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

.demos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.demo-card {
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    transform: none;
}

.demo-card:hover::before {
    animation: shimmer 2s linear forwards;
}

.demo-card-title {
    font-size: var(--h3-size);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.demo-card-desc {
    font-size: var(--small-size);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.demo-card-desc a {
    color: var(--accent-light);
}

.demo-card-desc a:hover {
    text-decoration: underline;
}

.np-canvas-wrap {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

#np-canvas {
    display: block;
    width: 100%;
    height: 500px;
    border-radius: 8px;
}

.np-ce-display {
    font-family: var(--font-mono);
    font-size: var(--small-size);
    color: var(--accent-light);
    background: var(--bg-tertiary);
    padding: 6px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
}

.demo-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.btn--sm {
    padding: 8px 18px;
    font-size: var(--small-size);
}

.np-legend {
    display: flex;
    gap: 14px;
    font-size: var(--small-size);
    color: var(--text-secondary);
}

.np-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.np-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

/* Depth demo */
.depth-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 16px;
    border: 2px dashed var(--accent);
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
    text-align: center;
    font-size: var(--small-size);
}

.depth-drop-zone:hover,
.depth-drop-zone.drag-over {
    background-color: var(--accent-bg-subtle);
    border-color: var(--accent-light);
    color: var(--text-secondary);
}

.depth-spinner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    font-size: var(--small-size);
    color: var(--text-secondary);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.depth-comparison {
    position: relative;
    margin-top: 14px;
    border-radius: 8px;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    max-width: 100%;
}

.depth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    overflow: hidden;
    border-right: 3px solid #fff;
    box-shadow: 2px 0 6px rgba(0,0,0,0.5);
}

.depth-comparison > .depth-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.depth-overlay .depth-canvas {
    position: absolute;
    top: 0;
    left: 0;
}

.depth-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    pointer-events: none;
}

/* Contact */
.contact-content {
    text-align: center;
    padding-top: 24px;
}

.contact-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.contact-email {
    margin-bottom: 48px;
}

.contact-email .btn {
    font-size: 1.125rem;
    padding: 16px 36px;
}

.contact-social {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-text {
    font-size: var(--small-size);
    color: var(--text-muted);
}
