html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: #0a0a0a;
    color: #e5e5e5;
    overflow-x: hidden;
}
.font-mono {
    font-family: 'Roboto Mono', monospace;
}
#plexus-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
}

/* Nav Bar */
nav {
    background-color: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
nav.visible {
     opacity: 1;
     transform: translateY(0);
}
nav a {
    position: relative;
    color: #a1a1aa; /* zinc-400 */
    transition: color 0.3s;
}
nav a:hover {
    color: #e5e5e5; /* neutral-200 */
}
nav a.social-icon:hover {
    color: #4ade80; /* green-400 */
}
nav a:not(.social-icon)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #4ade80; /* green-400 */
    transition: all 0.3s ease-in-out;
}
nav a:not(.social-icon):hover::after {
    width: 100%;
    left: 0;
}

/* --- Mobile Menu Panel Styles --- */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(15px);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    padding: 6rem 2rem 2rem;
}
.mobile-menu-panel.open {
    transform: translateX(0);
}
.mobile-menu-link {
    color: #d1d5db;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1rem 0;
    text-align: right;
    transition: color 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-menu-link:hover {
    color: #4ade80;
}
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}
.mobile-menu-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}
body.no-scroll {
    overflow: hidden;
}

/* --- Hero Section --- */
#hero-section {
    height: 100vh;
    width: 100vw;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: white;
}
/* UPDATED: Combined styles for video and image background */
#hero-video, #hero-image {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}
#hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.7);
    z-index: -1;
}
#hero-content {
    position: relative;
    z-index: 1;
    max-width: 90%;
    margin-top: -10%;
}

/* --- Animation & Section Styles --- */
.stream-section {
    padding-top: 80px;
    margin-top: -80px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
#hero-section.stream-section {
    padding-top: 0;
    margin-top: 0;
}
.stream-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* MODIFIED: VIM-style underline cursor */
.typing-cursor {
    display: inline-block;
    width: 12px;
    height: 3px;
    background-color: #4ade80;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    vertical-align: -0.2em; /* Nudges the cursor to sit below the text */
}

@keyframes blink {
    50% { opacity: 0; }
}
.section-title {
    border-bottom: 2px solid #4ade80;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* --- Timeline / Experience --- */
.timeline {
    padding-left: 0.75rem;
}
.company-group {
    position: relative;
    padding: 1rem 0 2rem 0;
}
.company-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    margin-bottom: 1.5rem;
}
.company-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: #1f2937;
    border: 3px solid #4ade80;
    z-index: 5;
    flex-shrink: 0;
    margin-left: -1rem;
}
.roles-container {
    position: relative;
    padding-left: 2.5rem;
    border-left: 2px solid #374151;
    margin-left: 0;
}
.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 2.5rem;
}
.timeline:has(.company-group) .timeline-item:last-child {
    padding-bottom: 0;
}
.roles-container .timeline-item:last-child {
     padding-bottom: 0;
     border-left: 2px solid transparent;
}
 .timeline-dot {
    position: absolute;
    left: -0.5rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    background-color: #4ade80;
    border: 2px solid #1f2937;
}

/* --- General Content Styles --- */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.4s ease-in-out;
}
.image-gallery .image-container:hover {
    transform: scale(1.05);
}
.diffusion-media {
    opacity: 0;
    filter: blur(20px) saturate(0);
    transform: scale(1.1);
    transition: opacity 2s ease, filter 1.5s ease, transform 0.4s ease-in-out;
}
.diffusion-media.visible {
    opacity: 1;
    filter: blur(0) saturate(1);
    transform: scale(1);
}
.custom-card {
    background-color: rgba(31, 41, 55, 0.5);
    border: 1px solid #4b5563;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    overflow: hidden;
}
.custom-card:hover {
    border-color: #4ade80;
    transform: translateY(-5px);
}
.patent-plaque {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background-color: rgba(31, 41, 55, 0.2);
    border: 1px solid #374151;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}
.patent-plaque.is-link {
    cursor: pointer;
}
.patent-plaque.is-link:hover {
    background-color: rgba(74, 222, 128, 0.1);
    border-color: #4ade80;
}
.patent-icon {
    color: #9ca3af; /* gray-400 */
    flex-shrink: 0;
    transition: color 0.3s, transform 0.3s;
    opacity: 0.7;
}
.patent-plaque.is-link:hover .patent-icon {
    color: #4ade80; /* green-400 */
    transform: scale(1.1);
    opacity: 1;
}
.patent-text {
    flex-grow: 1;
}

/* --- Masonry Grid (Used by Moments & GenAI) --- */
.masonry-grid {
    column-count: 2;
    column-gap: 1.5rem;
}
@media (max-width: 768px) {
    .masonry-grid {
        column-count: 1;
    }
}
.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #1f2937; /* Placeholder background */
}

/* --- Lazy Loading Styles --- */
.lazy-image {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.lazy-image.loaded {
    opacity: 1;
}

.carousel {
    position: relative;
}
.carousel:hover .carousel-btn {
    opacity: 1;
}
.carousel-slides {
    display: grid;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    z-index: 5;
    transition: box-shadow 0.3s ease-out;
    border: 1px solid #4b5563;
}
.carousel:hover .carousel-slides {
    border-color: #4ade80;
}
.carousel-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    visibility: hidden;
    position: relative;
    z-index: 1;
}
.carousel-slide[data-active] {
    opacity: 1;
    visibility: visible;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(10, 10, 10, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    border-radius: 50%;
    z-index: 30;
    opacity: 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-btn:hover {
    background-color: rgba(74, 222, 128, 0.3);
    border-color: #4ade80;
}
.carousel-btn.prev { left: 0.75rem; }
.carousel-btn.next { right: 0.75rem; }

.masonry-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 2rem 1rem 1rem;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    z-index: 10;
    pointer-events: none;
}
.masonry-caption.caption-top {
    bottom: auto;
    top: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    padding: 1rem 1rem 2rem;
}

.stack-indicator {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 20;
    background-color: rgba(10, 10, 10, 0.7);
    color: #e5e5e5;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}
.carousel:hover .stack-indicator {
    background-color: rgba(74, 222, 128, 0.2);
    border-color: rgba(74, 222, 128, 0.5);
}

.tag {
    background-color: #374151;
    color: #d1d5db;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.image-credit-icon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: rgba(10, 10, 10, 0.7);
    color: #e5e5e5;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

.masonry-item:hover .image-credit-icon {
    opacity: 1;
    pointer-events: auto;
}

.image-credit-icon:hover {
    background-color: rgba(74, 222, 128, 0.2);
    border-color: rgba(74, 222, 128, 0.5);
    color: #4ade80;
    transform: scale(1.1);
}
