.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox-overlay.hidden { display: none; }

.lightbox-content img,
.lightbox-content video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}

.lightbox-content video::-webkit-media-controls-panel,
.lightbox-content video::-webkit-media-controls-enclosure,
.lightbox-content video::-webkit-media-controls {
    display: none !important;
}

.lightbox-content video {
    -webkit-media-controls: none !important;
}

.lightbox-close {
    position: fixed;
    top: 12px;
    right: 16px;
    font-size: 28px;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Instrument Sans', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #000000;
    line-height: 1.4;
    font-size: 14px;
    font-weight: 400;
}

/* Page Load Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.1s;
}

.fade-in-delay-2 {
    animation-delay: 0.2s;
}

.fade-in-delay-3 {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    background-color: transparent;
    padding: 20px 24px;
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.nav-left {
    justify-self: start;
}

.nav-right {
    justify-self: end;
}

nav h1 {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.nav-button {
    font-size: 14px;
    color: #ffffff;
    background: #00FF2F;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-button:hover {
    opacity: 0.8;
}

.view-toggle {
    font-size: 14px;
    color: #000000;
    background: none;
    border: none;
    cursor: pointer;
    text-transform: capitalize;
}

/* Sticky Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    background-color: #f5f5f5;
    z-index: 1000;
    padding: 8px 15%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav-left,
.nav-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-right {
    justify-content: flex-end;
}

.nav-title {
    text-align: center;
    font-size: 14px;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.nav-button {
    font-size: 14px;
    color: #ffffff;
    background: #00FF2F;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-button:not(.active) {
    background: #e0e0e0;
    color: #000000;
}

.nav-button:hover {
    opacity: 0.8;
}

.view-toggle {
    font-size: 14px;
    color: #000000;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-transform: capitalize;
}

.view-toggle:hover {
    opacity: 0.7;
}

/* Marquee */
.marquee {
    background-color: #ffffff;
    color: #000000;
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid #e0e0e0;
}

.marquee-content {
    display: inline-block;
    animation: marquee 15s linear infinite;
    font-size: 14px;
    font-family: 'IBM Plex Mono', monospace;
}

@keyframes marquee {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Sticky Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    background-color: #f5f5f5;
    z-index: 1000;
    padding: 16px 15%;
    mix-blend-mode: normal;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-container {
    max-width: none;
    margin: 0;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left, .nav-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-right .view-toggle {
    display: none; /* Hide List/Grid buttons */
}

.nav-title {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-button {
    font-size: 14px;
    color: #ffffff;
    background: #00FF2F;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    text-decoration: none;
}

.nav-button:hover {
    background-color: #00dd2a;
}

.nav-button.active {
    background-color: #00FF2F;
    color: #ffffff;
}

/* Right side LIST / GRID as plain text links */
.view-toggle {
    font-size: 14px;
    color: #666666;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.view-toggle:hover {
    color: #000000;
}

.view-toggle.active {
    text-decoration: underline;
}

.nav-link {
    font-family: 'Instrument Sans', Arial, sans-serif;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #f0f0f0;
    transition: all 0.2s ease;
}

.nav-link.active {
    color: #000000;
    background-color: #00FF2F;
}

.nav-link:hover:not(.active) {
    color: #000000;
    background-color: #e0e0e0;
}

.site-title {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    text-align: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.view-toggle {
    color: #000000;
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    text-transform: capitalize;
}

.view-toggle.active {
    text-decoration: underline;
}

.view-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 2px 4px;
}

.view-link.active {
    color: #00ff88;
    text-decoration: underline;
}

.view-link:hover:not(.active) {
    color: #000000;
}

/* Main Content */
.main-content {
    max-width: none;
    margin: 0;
    padding: 24px 24px 0 24px;
}

/* Bio Section */
.bio-section {
    margin-bottom: 16px;
}

.bio-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.bio-left {
    display: flex;
    align-items: flex-start;
}

.bio-label {
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin: 0;
}

.bio-right {
    display: flex;
    align-items: flex-start;
}

.bio-text {
    font-size: 14px;
    color: #000000;
    margin-bottom: 0;
    line-height: 1.5;
}

.filter-section {
    margin-bottom: 16px;
}

.filter-bar {
    background-color: #00FF2F;
    border-radius: 8px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-left {
    display: flex;
    align-items: center;
}

.selected-projects {
    font-family: 'Instrument Sans', Arial, sans-serif;
    color: #000000;
    font-size: 14px;
    font-weight: bold;
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-label {
    color: #000000;
    font-size: 14px;
    font-weight: 400;
}

.filter-link {
    font-family: 'Instrument Sans', Arial, sans-serif;
    color: #000000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: font-weight 0.2s ease;
}

.filter-link.active {
    font-weight: bold;
}

.filter-link:hover:not(.active) {
    font-weight: 400;
}

/* Projects Section */
.projects-section {
    margin-bottom: 16px;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Add spacing after last project section */
.projects-section {
    padding-bottom: 200px;
}

.project-card {
    background-color: #00FF2F;
    border: none;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 16px;
    align-items: start;
}

/* Project Left Column */
.project-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Project Center Column */
.project-center {
    display: flex;
    flex-direction: column;
}

.project-tags-text {
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    color: #000000;
    line-height: 1.4;
}

.project-year {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
    font-weight: 400;
    font-family: 'IBM Plex Mono', monospace;
}

.project-title {
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin-bottom: 0;
    line-height: 1.2;
    text-decoration: underline;
}

.sticky-card {
    position: sticky;
    top: 80px;
    z-index: 50;
}

.project-description {
    color: #000000;
    line-height: 1.5;
    margin-bottom: 16px;
}

.description-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.description-more {
    display: block;
}

.description-more.hidden {
    display: none !important;
}

.show-more-btn {
    background: none;
    border: none;
    color: #000;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
    margin-left: 0;
}

.show-more-btn:hover {
    opacity: 0.7;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.tag {
    background-color: #000000;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 400;
    font-family: 'IBM Plex Mono', monospace;
}

/* Project Right Column */
.project-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-description {
    color: #000000;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
}

.project-status {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
}

/* Project Media */
.project-media {
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    align-items: flex-start;
}

.media-container {
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    background-color: #000000;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.media-container.media-left {
    width: 50%;
    height: auto;
    flex: 1;
}

.media-container.media-right {
    width: 50%;
    height: auto;
    flex: 1;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border: none;
    outline: none;
    margin: 0;
    padding: 0;
    -webkit-playsinline: true;
    playsinline: true;
    controls: false;
    controlslist: nodownload nofullscreen noremoteplayback;
    disablepictureinpicture: true;
    -webkit-appearance: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Hide Safari's native video controls */
.project-video::-webkit-media-controls {
    display: none !important;
}

.project-video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.project-video::-webkit-media-controls-panel {
    display: none !important;
}

.project-video::-webkit-media-controls-play-button {
    display: none !important;
}

.project-video::-webkit-media-controls-timeline {
    display: none !important;
}

.project-video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.project-video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.project-video::-webkit-media-controls-mute-button {
    display: none !important;
}

.project-video::-webkit-media-controls-toggle-fullscreen-button {
    display: none !important;
}

.project-video::-webkit-media-controls-volume-slider {
    display: none !important;
}

/* Additional Safari control hiding */
.project-video::-webkit-media-controls-overlay-play-button {
    display: none !important;
}

.project-video::-webkit-media-controls-enclosure {
    display: none !important;
}

.project-video::-webkit-media-controls-return-to-realtime-button {
    display: none !important;
}

.project-video::-webkit-media-controls-rewind-button {
    display: none !important;
}

.project-video::-webkit-media-controls-toggle-closed-captions-button {
    display: none !important;
}

/* Force hide all media controls */
.project-video {
    -webkit-media-controls: none !important;
    -webkit-media-controls-panel: none !important;
    -webkit-media-controls-play-button: none !important;
    -webkit-media-controls-volume-slider: none !important;
    -webkit-media-controls-mute-button: none !important;
    -webkit-media-controls-timeline: none !important;
    -webkit-media-controls-current-time-display: none !important;
    -webkit-media-controls-time-remaining-display: none !important;
    -webkit-media-controls-fullscreen-button: none !important;
    /* Additional aggressive hiding */
    pointer-events: none !important;
}

/* Re-enable pointer events for the video element itself */
.project-video::-webkit-media-controls-start-playback-button {
    pointer-events: auto !important;
}

.project-video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* Specific fix for Various Flora project - both videos fill containers */
.projects-list .project-section:nth-child(6) .media-container.media-left {
    height: auto;
}

.projects-list .project-section:nth-child(6) .media-container.media-left .project-video {
    object-fit: cover;
}

.projects-list .project-section:nth-child(6) .media-container.media-right {
    height: auto;
}

.projects-list .project-section:nth-child(6) .media-container.media-right .project-video {
    object-fit: cover;
}

/* Info Page Styles */
.info-section {
    margin-bottom: 40px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    max-width: none;
    margin: 0;
    padding: 0 16px;
}

.info-column {
    display: flex;
    flex-direction: column;
}

.info-card {
    background-color: #00FF2F;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.info-card:last-child {
    margin-bottom: 0;
}

.info-section-heading {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin-bottom: 16px;
    margin-top: 0;
}

/* Profile Card */
.profile-content p {
    color: #000000;
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 14px;
}

.profile-content p strong {
    font-weight: 400;
}

.profile-image {
    margin-top: 20px;
}

.profile-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid #0066cc;
}

.image-caption {
    text-align: left;
    font-size: 14px;
    color: #000000;
    margin-top: 8px;
    font-style: italic;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #000000;
    text-decoration: underline;
}

.social-link:hover {
    text-decoration: underline;
}

.link-icon {
    font-size: 14px;
}

.email-copy {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #000000;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
}

.email-copy:hover {
    text-decoration: underline;
}

.email-copy:active {
    text-decoration: underline;
}

.copy-text {
    font-size: 14px;
}

/* Experience Cards */
.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.company-name {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin: 0;
    margin-bottom: 4px;
}

.location {
    color: #000000;
    font-size: 14px;
    font-style: italic;
    margin-bottom: 4px;
}

.role {
    font-size: 14px;
    color: #000000;
    margin-bottom: 8px;
}

.description {
    color: #000000;
    line-height: 1.5;
    font-size: 14px;
    margin: 0;
}

/* Past Heading */
.past-heading {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin: 16px 0 16px 0;
    padding: 0;
}

/* Past Experience Items */
.past-experience-item {
    margin-bottom: 20px;
}

.past-experience-item:last-child {
    margin-bottom: 0;
}

.past-experience-item .company-name {
    font-weight: 400;
    margin-bottom: 4px;
}

.past-experience-item .location {
    font-style: italic;
    margin-bottom: 4px;
}

.past-experience-item .role {
    margin-bottom: 8px;
}

/* Education Card */
.education-item {
    margin-bottom: 12px;
}

.education-item:last-child {
    margin-bottom: 0;
}

.degree {
    font-weight: 400;
    color: #000000;
    margin-bottom: 4px;
    font-size: 14px;
}

.school {
    color: #000000;
    font-size: 14px;
    margin-bottom: 2px;
}

/* Teaching Card */
.teaching-item {
    margin-bottom: 16px;
}

.teaching-item:last-child {
    margin-bottom: 0;
}

.teaching-role {
    font-weight: 400;
    color: #000000;
    margin-bottom: 8px;
    font-size: 14px;
}

.courses {
    color: #000000;
    font-size: 14px;
    margin-bottom: 2px;
}

/* Skills Card */
.skill-item {
    color: #000000;
    font-size: 14px;
    margin-bottom: 4px;
}

.skill-item:last-child {
    margin-bottom: 0;
}

/* Software Card */
.software-item {
    color: #000000;
    font-size: 14px;
    margin-bottom: 4px;
}

.software-item:last-child {
    margin-bottom: 0;
}


/* Mobile Responsive */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 16px;
    }
    
    .info-section-heading {
        margin-bottom: 16px;
    }
    
    .past-heading {
        margin: 16px 0 16px 0;
    }
}

/* Grid View */
.projects-list.grid-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.projects-list.grid-view .project-section {
    display: flex;
    flex-direction: column;
}

.projects-list.grid-view .project-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.projects-list.grid-view .project-media {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

.projects-list.grid-view .media-container {
    width: 50%;
}

/* New Index Design Styles */
.header-section {
    margin-bottom: 16px;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.intro-card {
    background-color: #00FF2F;
    border-radius: 8px;
    padding: 0;
}

.intro-paragraph {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #000000;
    line-height: 1.5;
    margin: 16px;
}

.underlined {
    text-decoration: underline;
}

.experience-section {
    margin-bottom: 16px;
}

.experience-card {
    background-color: #00FF2F;
    border-radius: 8px;
    padding: 16px;
}

.experience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.experience-column,
.education-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.section-heading {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin: 0;
}

.experience-item,
.education-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin: 0;
}

.year {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    min-width: 60px;
}

.role,
.degree {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
}

.profile-link {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #000000;
    text-decoration: underline;
    transition: color 0.2s ease;
    align-self: flex-start;
    margin-top: 0;
}

.profile-link:hover {
    color: #666666;
}

.logo {
    align-self: flex-start;
}

/* Sticky Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: transparent;
    padding: 20px 15% 0 15%;
}

.nav-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1002;
}

.nav-title {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    opacity: 1;
    pointer-events: none;
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
}

.nav-title.visible {
    opacity: 1;
    transform: translateX(0);
}

.hidden {
    display: none !important;
}

.logo-circle {
    width: 40px;
    height: 40px;
    background-color: #E100FF;
    border-radius: 50%;
    position: relative;
    z-index: 1001;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.logo-circle:hover {
    transform: scale(1.1);
}

.intro-text {
    width: 100%;
}

.intro-paragraph {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 16px;
    color: #000000;
    line-height: 1.5;
    margin: 16px;
}

.underlined {
    text-decoration: underline;
}

.profile-link {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #000000;
    text-decoration: none;
}

.profile-link:hover {
    text-decoration: underline;
}

.experience-section {
    margin-bottom: 16px;
}


.section-heading {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin: 0 0 24px 0;
}

.experience-item,
.education-item {
    display: flex;
    gap: 16px;
    margin: 0;
}

.year {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #000000;
    font-weight: 400;
    min-width: 80px;
}

.role,
.degree {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #000000;
    line-height: 1.4;
}

.projects-section {
    margin-bottom: 16px;
}

.projects-header {
    margin-bottom: 16px;
}

/* Projects Filter */
.projects-filter {
    background-color: #00FF2F;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}

.filter-option {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #666666;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    border-radius: 20px;
}

.filter-option:hover {
    color: #333333;
}

.filter-option.active {
    color: #000000;
    font-weight: 600;
}

/* Animated pill background */
.filter-pill {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}


.hidden {
    display: none !important;
}

.coming-soon {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #666666;
    text-align: center;
    padding: 48px 0;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.project-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    position: relative;
}

.project-content {
    background-color: #00FF2F;
    border-radius: 8px;
    padding: 16px;
    position: sticky;
    top: 60px; /* stay below sticky nav */
    z-index: 1;
}

.project-name {
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 400;
    color: #000000;
}

.project-tags {
    display: none;
}

.project-description {
    font-size: 12px;
}

.project-visual {
    width: 100%;
    order: 2;
    display: flex;
    flex-direction: row;
    gap: 16px;
}

/* Allow multi-row wrap after 3 items */
.media-grid {
    flex-wrap: wrap;
}

.media-grid > .media-item {
    flex: 1 1 calc((100% - 32px) / 3); /* 3 items per row accounting for 16px gaps */
    align-self: flex-start; /* allow taller portrait tiles without stretching row */
}

@media (max-width: 900px) {
    .media-grid > .media-item {
        flex: 1 1 calc((100% - 16px) / 2); /* 2 per row on medium */
    }
}

@media (max-width: 768px) {
    /* Simpler block layout on mobile to avoid flex/absolute quirks */
    .media-grid { display: block; }
    .media-grid > .media-item {
        width: 100%;
        aspect-ratio: auto;
        margin-bottom: 16px;
    }
    .media-grid > .media-item > img,
    .media-grid > .media-item > video {
        position: static !important;
        inset: auto !important;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    /* Also handle non-media-grid items (like in Instrument project) */
    .project-visual:not(.media-grid) {
        display: flex;
        flex-direction: column; /* stack vertically on mobile */
    }
    .project-visual:not(.media-grid) > .media-item {
        width: 100%;
        aspect-ratio: 16/9 !important; /* force aspect on mobile for non-grid */
    }
    .project-visual:not(.media-grid) > .media-item > img,
    .project-visual:not(.media-grid) > .media-item > video {
        position: static !important;
        inset: auto !important;
        width: 100%;
        height: auto;
    }
    .media-grid > .media-item.portrait > img,
    .media-grid > .media-item.portrait > video {
        object-fit: contain;
    }
}

@media (max-width: 768px) {
    .project-visual {
        flex-direction: column;
    }
    .project-content {
        position: static;
        top: auto;
    }
}

/* Hover caption overlay */
.media-item {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    /* Ensure all media tiles share the same height */
    aspect-ratio: 16/9;
}

.media-item::after {
    content: attr(data-caption);
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    font-size: 12px;
    line-height: 1.3;
    border-radius: 8px;
    padding: 8px 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 200ms ease, transform 200ms ease;
    pointer-events: none;
}

.media-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.project-placeholder {
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

.project-screenshot,
.project-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

/* Preserve portrait orientation inside fixed-aspect tiles */
.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Portrait tiles: keep same width as grid cell, allow taller height */
.media-item.portrait { 
    aspect-ratio: auto; /* let content dictate height */
}
.media-item.portrait img,
.media-item.portrait video {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Make media fill the tile to match video heights */
.media-item > img,
.media-item > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Override absolute fill for portrait tiles so container grows with media (desktop) */
.media-item.portrait > img,
.media-item.portrait > video {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.project-visual > * {
    flex: 1;
    min-width: 0;
}

.video-container-centered {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: none;
    outline: none;
}

.video-container-centered .project-screenshot {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
    outline: none;
    background-color: #000000;
}

.project-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    order: 1;
}

.project-tags {
    color: #000000;
    font-weight: 400;
}

.project-description {
    color: #000000;
    line-height: 1.6;
    margin: 0;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #000000;
    text-decoration: underline;
}

.social-link:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .experience-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .intro-card,
    .experience-card {
        padding: 16px;
    }
    
    .project-item {
        flex-direction: column;
        gap: 16px;
    }
    
    .project-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .project-visual {
        width: 100%;
    }
    
    .footer {
        padding: 32px 16px 32px 16px;
    }
    
    .sticky-nav {
        padding: 20px 16px 0 16px;
    }
}

/* Case Study Template Styles */
.case-study-header {
    margin-bottom: 32px;
}

.project-info-card {
    background-color: #00FF2F;
    border-radius: 8px;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: start;
}

.case-study-title {
    font-family: 'DM Mono', monospace;
    font-size: 24px;
    font-weight: 400;
    color: #000000;
    margin: 0 0 16px 0;
    text-decoration: underline;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-year {
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    color: #000000;
    font-weight: 400;
}

.project-tags {
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    color: #000000;
    font-weight: 400;
}

.project-overview {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #000000;
    line-height: 1.5;
    margin: 0;
}

.case-study-content {
    margin-bottom: 32px;
}

.content-section {
    margin-bottom: 48px;
}

.section-title {
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin: 0 0 16px 0;
    text-decoration: underline;
}

.section-text {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    color: #000000;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.media-gallery {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background-color: #000000;
}

.gallery-video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background-color: #000000;
}

.media-caption {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #666666;
    margin: 0;
    font-style: italic;
}

/* Mobile responsive for case study */
@media (max-width: 768px) {
    .project-info-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .case-study-title {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 16px;
    }
}

/* Footer */
.footer {
    padding: 24px;
    background-color: #f5f5f5;
}

/* --- Restored Nav from main branch --- */
.sticky-nav {
    position: sticky;
    top: 0;
    background-color: transparent;
    z-index: 1000;
    padding: 20px 0;
}

.nav-container {
    max-width: none;
    margin: 0;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left { display: flex; gap: 8px; }

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #f0f0f0;
    transition: all 0.2s ease;
}

.nav-link.active { color: #000; background-color: #00FF2F; }
.nav-link:hover:not(.active) { color: #000; background-color: #e0e0e0; }

.site-title {
    font-size: 14px;
    font-weight: 400;
    color: #000;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    text-align: center;
}

.nav-right { display: flex; align-items: center; }

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-top: 1px solid #e0e0e0;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-arrow {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.nav-arrow:hover {
    color: #000000;
}

.page-info {
    color: #666;
    font-size: 14px;
}

.restart-button {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.restart-button:hover {
    color: #000000;
}

.last-updated {
    color: #666;
    font-size: 14px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
}

.copyright {
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .view-toggle {
        display: none;
    }
    
    .project-tags {
        display: none;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 16px;
    }
    
    .nav-left,
    .nav-right {
        width: 100%;
        justify-content: center;
    }
    
    /* Reorder navigation elements on mobile */
    .nav-container {
        display: flex;
        flex-direction: column;
    }
    
    .nav-center {
        order: 1; /* Title first */
    }
    
    .nav-left {
        order: 2; /* Buttons second */
    }
    
    .nav-right {
        order: 3; /* Right nav last (empty on info page) */
    }
    
    .main-content {
        padding: 32px 16px 0 16px;
    }
    
    .info-card {
        width: 100%;
    }
    
    .projects-list {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .projects-list.hidden {
        display: none !important;
    }
    
    .projects-list.grid-view {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .project-section {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .project-card {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .project-media {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .media-container.media-left,
    .media-container.media-right {
        width: 100%;
    }
    
    .bio-card {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .bio-left,
    .bio-right {
        width: 100%;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .filter-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .projects-list {
        gap: 16px;
    }
    
    .project-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .project-media {
        flex-direction: column;
        gap: 16px;
    }
    
    .media-container.media-left,
    .media-container.media-right {
        width: 100%;
    }
    
}

@media (max-width: 480px) {
    .site-title {
        font-size: 14px;
    }
    
    .project-title {
        font-size: 14px;
    }
    
    .media-container {
        height: 200px;
    }
    
    .projects-list {
        gap: 16px;
    }
}