* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(to right bottom, #eaf0f6 0%, #e8eef4 25%, #eef2f6 60%, #f1f3f6 100%);
    background-attachment: fixed;
    color: #3B4D50;
    line-height: 1.6;
    padding: 2rem 1rem;
    min-height: 100vh;
    letter-spacing: -0.02em;
}

/* Make all strong/bold text semibold instead */
strong {
    font-weight: 600;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Hero Card */
.hero-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 153, 231, 0.15);
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.profile-section {
    display: flex;
    gap: 0;
    align-items: stretch;
    width: 100%;
}

.profile-image {
    width: 250px;
    height: auto;
    border-radius: 12px 0 0 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: block;
    align-self: flex-start;
}

.profile-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
}

.name {
    font-size: 24px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: #3B4D50;
}

.bio {
    font-size: 0.95rem;
    color: rgba(59, 77, 80, 0.8);
    line-height: 1.7;
}


/* Navigation */
.main-nav, .footer-nav {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.footer-nav {
    margin-top: 4rem;
    margin-bottom: 0;
}

.nav-link {
    color: #3B4D50;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0099E7;
    transition: width 0.3s ease;
}

.nav-link:hover:not(.active) {
    color: #0099E7;
    transform: translateY(-1px);
}

.nav-link:hover:not(.active)::after {
    width: 100%;
}

.nav-link:active {
    transform: translateY(0);
}

/* Active state for current section */
.nav-link.active {
    color: #0099E7;
    cursor: default;
    pointer-events: none;
    transition: none;
}

.nav-link.active::after {
    width: 100%;
    transition: none;
}

.nav-link.active:hover {
    transform: none !important;
    color: #0099E7 !important;
    cursor: default;
    pointer-events: none;
}

.nav-link.active:hover::after {
    width: 100% !important;
    transition: none;
}

/* Layout Toggle */
.layout-toggle {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 2rem;
    margin-top: 32px;
    padding: 0;
}

.layout-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: white;
    border: 2px solid rgba(0, 153, 231, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: content-box;
}

.layout-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
    color: #0099E7;
    transition: transform 0.3s ease;
}

.layout-icon-wrapper:hover {
    border-color: #0099E7;
    background: rgba(0, 153, 231, 0.05);
}

.layout-icon-wrapper.rotating .layout-icon {
    transform: rotate(180deg);
}

.layout-btn span {
    line-height: 1;
}

/* Project Cards */
.projects-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 530px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.projects-section.grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
}

.projects-section.grid-layout .project-card {
    display: flex;
    flex-direction: column;
}

.projects-section.grid-layout .project-image {
    height: 110px;
}

.projects-section.grid-layout .project-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.projects-section.grid-layout .project-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.projects-section.grid-layout .project-description {
    display: none;
}

.projects-section.grid-layout .expand-btn {
    margin-top: auto;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
    position: relative;
}

/* Gradient background system for project images - color progression */
/* Card 1: Blue */
.project-image-gradient-1 {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3) 0%, rgba(74, 144, 226, 0.15) 100%);
}

/* Card 2: Blue to Purple transition */
.project-image-gradient-2 {
    background: linear-gradient(135deg, rgba(99, 124, 232, 0.3) 0%, rgba(99, 124, 232, 0.15) 100%);
}

/* Card 3: Purple */
.project-image-gradient-3 {
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.3) 0%, rgba(123, 104, 238, 0.15) 100%);
}

/* Card 4: Purple to Red transition */
.project-image-gradient-4 {
    background: linear-gradient(135deg, rgba(189, 106, 173, 0.3) 0%, rgba(189, 106, 173, 0.15) 100%);
}

/* Card 5: Red */
.project-image-gradient-5 {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.3) 0%, rgba(255, 107, 107, 0.15) 100%);
}

/* Card 6: Red to Orange transition */
.project-image-gradient-6 {
    background: linear-gradient(135deg, rgba(255, 136, 54, 0.3) 0%, rgba(255, 136, 54, 0.15) 100%);
}

/* Card 7: Orange */
.project-image-gradient-7 {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.3) 0%, rgba(255, 165, 0, 0.15) 100%);
}

/* Card 8: Orange to Blue transition (cycle back) */
.project-image-gradient-8 {
    background: linear-gradient(135deg, rgba(164, 154, 113, 0.3) 0%, rgba(164, 154, 113, 0.15) 100%);
}

/* Card 9: Blue (cycle repeats) */
.project-image-gradient-9 {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3) 0%, rgba(74, 144, 226, 0.15) 100%);
}

/* Hide overlay and placeholder for all gradient images */
.project-image-gradient-1::after,
.project-image-gradient-1::before,
.project-image-gradient-2::after,
.project-image-gradient-2::before,
.project-image-gradient-3::after,
.project-image-gradient-3::before,
.project-image-gradient-4::after,
.project-image-gradient-4::before,
.project-image-gradient-5::after,
.project-image-gradient-5::before,
.project-image-gradient-6::after,
.project-image-gradient-6::before,
.project-image-gradient-7::after,
.project-image-gradient-7::before,
.project-image-gradient-8::after,
.project-image-gradient-8::before,
.project-image-gradient-9::after,
.project-image-gradient-9::before {
    display: none;
}

/* Title text inside gradient */
.project-title-in-gradient {
    position: absolute;
    top: calc(50% - 15px);
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0 2rem;
    color: #3B4D50;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    z-index: 2;
    width: calc(100% - 4rem);
    max-width: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.project-image .project-info-line {
    position: absolute;
    top: calc(50% + 20px);
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 400;
    color: rgba(59, 77, 80, 0.8);
    margin: 0;
    padding: 0;
    line-height: 1.2;
    display: block;
    text-align: center;
    white-space: nowrap;
    z-index: 2;
    z-index: 2;
    width: 100%;
    pointer-events: none;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Zoom effect for large layout cards only */
.projects-section:not(.grid-layout) .project-image img {
    transform: scale(1.1);
}

.projects-section:not(.grid-layout) .project-card:hover .project-image img {
    transform: scale(1.15);
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(to bottom, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.15) 20%, rgba(255, 255, 255, 0.05) 35%, transparent 50%),
        radial-gradient(ellipse 100% 100% at center, transparent 80%, rgba(255, 255, 255, 0.02) 90%, rgba(255, 255, 255, 0.04) 96%, rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(0.5px);
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.project-card.expanded .project-image::after {
    opacity: 0;
}

.project-image:has(img[src=""])::before,
.project-image:not(:has(img[src]))::before {
    content: "Project Image";
    position: absolute;
    z-index: 2;
}

.project-content {
    padding: 24px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #3B4D50;
}

.project-description {
    font-size: 16px;
    color: rgba(59, 77, 80, 0.8);
    margin-bottom: 0;
    line-height: 1.7;
}

.expand-btn, .close-btn {
    background: #0099E7;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: 24px;
}

.expand-btn:hover, .close-btn:hover {
    background: #0077b3;
}

/* Project Details (Expanded) - Hidden, using modal instead */
.project-details {
    display: none;
}

/* Project Modal Dialog */
.project-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.project-view.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-dialog {
    position: relative;
    width: 800px;
    max-width: 100%;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #999;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #666;
}

.modal-close svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.modal-content-wrapper {
    flex: 1;
    position: relative;
    min-height: 0; /* Allow flex child to shrink */
    display: flex;
    flex-direction: column;
}

.modal-content {
    padding: 2rem;
    padding-bottom: 3rem; /* Extra padding at bottom to ensure all content is visible */
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    position: relative;
    /* Custom scrollbar - always visible */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

/* Show scrollbar on hover or when scrolling for Firefox */
.modal-content-wrapper.hovering .modal-content,
.modal-content-wrapper.scrolling .modal-content {
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

/* Webkit scrollbar styling (Chrome, Safari, Edge) */
.modal-content::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    border: none;
    min-height: 40px;
    opacity: 0.7; /* Always visible but subtle */
    transition: opacity 0.2s ease;
}

/* Show scrollbar more prominently when hovering or scrolling */
.modal-content-wrapper.hovering .modal-content::-webkit-scrollbar-thumb,
.modal-content-wrapper.scrolling .modal-content::-webkit-scrollbar-thumb,
.modal-content:hover::-webkit-scrollbar-thumb {
    opacity: 1;
    transition: opacity 0.15s ease 0s;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #3B4D50;
    padding-right: 2rem;
}

.modal-body {
    color: rgba(59, 77, 80, 0.8);
    line-height: 1.8;
}

.modal-body p {
    margin-bottom: 1rem;
}

/* Project View Structure */
.project-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 14px;
    font-weight: 400;
    color: rgba(59, 77, 80, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-meta-item {
    display: inline-block;
}

/* Project Title Banner (Gradient) - matches project card */
.project-view-title-banner {
    width: 100%;
    height: 180px;
    overflow: hidden;
    margin: 0 0 32px 0;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-sizing: border-box;
}

.project-view-title-banner {
    flex-direction: column;
    justify-content: center;
}

.project-view-title-banner .project-view-title {
    position: absolute;
    top: calc(50% - 15px);
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    color: #3B4D50;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    text-transform: none;
    letter-spacing: -0.02em;
}

.project-view-title-banner .project-info-line {
    position: absolute;
    top: calc(50% + 20px);
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 400;
    color: rgba(59, 77, 80, 0.8);
    margin: 0;
    padding: 0;
    line-height: 1.2;
    display: block;
    text-align: center;
    white-space: nowrap;
}

.project-card .project-info-line {
    font-size: 16px;
    font-weight: 400;
    color: rgba(59, 77, 80, 0.8);
    margin: 0 0 8px 0;
    padding: 0;
    line-height: 1.2;
    display: block;
}

.project-view-header {
    margin: 0 0 1.5rem 0;
    padding: 0;
}

.project-view-description {
    font-size: 20px;
    font-weight: 300;
    color: rgba(59, 77, 80, 0.8);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

.project-view-hero {
    width: 100%;
    height: 200px;
    margin-top: 40px;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

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

.project-view-header {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-top: 0;
}

.project-view-title {
    font-size: 24px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    margin-top: 0;
    color: #3B4D50;
}

.project-view-description {
    font-size: 20px;
    font-weight: 300;
    color: rgba(59, 77, 80, 0.8);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

/* Methods Section - Image Background with Icons */
.methods-section {
    width: 100%;
    margin-bottom: 2.5rem;
    margin-left: -2rem;
    margin-right: -2rem;
    position: relative;
    border-radius: 0;
    overflow: hidden;
}

.methods-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100px;
}

.methods-background {
    width: auto;
    height: 100px;
    display: block;
    object-fit: contain;
}

.methods-icons {
    position: absolute;
    top: 50%;
    left: 85px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}

.method-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.method-icon {
    max-width: 50px;
    max-height: 36px;
    width: auto;
    height: auto;
    display: block;
    opacity: 1;
    flex-shrink: 0;
    object-fit: contain;
}

.method-label {
    font-size: 12px;
    font-weight: 500;
    color: #3B4D50;
    text-align: center;
    line-height: 1.2;
}

.project-view-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 2rem;
}

.project-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: calc(4px + 4px + 1rem);
    margin-bottom: 24px;
}

.project-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background-color 0.3s ease;
}

/* Color coding for different sections */
.project-section[data-section="discovery"]::before {
    background: #008BD2;
    border-radius: 2px;
    left: 0;
}

.project-section[data-section="discovery"] {
    background: rgba(0, 139, 210, 0.08);
    padding: 16px 1.5rem;
    padding-left: calc(4px + 2px + 1.5rem);
    border-radius: 2px 8px 8px 2px;
    margin-bottom: 0;
}

.project-section[data-section="ideation"]::before {
    background: #BE00F3;
    border-radius: 2px;
    left: 0;
}

.project-section[data-section="ideation"] {
    background: rgba(0, 139, 210, 0.08);
    padding: 16px 1.5rem;
    padding-left: calc(4px + 2px + 1.5rem);
    border-radius: 2px 8px 8px 2px;
    margin-bottom: 0;
}

.project-section[data-section="validation"]::before {
    background: #EF911D;
    border-radius: 2px;
    left: 0;
}

.project-section[data-section="validation"] {
    background: rgba(0, 139, 210, 0.08);
    padding: 16px 1.5rem;
    padding-left: calc(4px + 2px + 1.5rem);
    border-radius: 2px 8px 8px 2px;
    margin-bottom: 0;
}

.project-section[data-section="results"]::before {
    background: #56C97B;
    border-radius: 2px;
    left: 0;
}

.project-section[data-section="results"] {
    background: rgba(0, 139, 210, 0.08);
    padding: 16px 1.5rem;
    padding-left: calc(4px + 2px + 1.5rem);
    border-radius: 2px 8px 8px 2px;
    margin-bottom: 0;
}

.project-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #3B4D50;
    margin: 0;
    margin-bottom: 0;
}

.project-section-content {
    font-size: 16px;
    font-weight: 400;
    color: rgba(59, 77, 80, 0.8);
    line-height: 1.7;
    margin-top: 0;
}

.project-section-content p {
    margin: 0 0 1rem 0;
}

.project-section-content p:last-child {
    margin-bottom: 0;
}

/* Key Findings Section */
.key-findings-section {
    margin-top: 20px;
    margin-bottom: 20px;
    padding-left: 0;
    padding-right: 0;
    text-align: left;
}

.key-findings-title {
    font-size: 12px;
    font-weight: 500;
    color: #3B4D50;
    margin: 0;
    margin-bottom: 12px;
    padding: 0;
    line-height: 1.2;
}

.key-findings-content {
    font-size: 14px;
    font-weight: 600;
    color: rgba(59, 77, 80, 0.8);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

.key-findings-content p {
    margin: 0 0 0.5rem 0;
    padding: 0;
    color: rgba(59, 77, 80, 0.8);
}

.key-findings-content p:first-child {
    margin-top: 0;
    padding-top: 0;
}

.key-findings-content p:last-child {
    margin-bottom: 0;
}

/* Project Thumbnails */
.project-thumbnails {
    display: flex;
    gap: 1rem;
    margin-top: 20px;
    margin-bottom: 20px;
    padding-left: 0;
    padding-right: 0;
}

.project-thumbnail {
    width: 160px;
    height: 130px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: #f0f0f0;
    flex-shrink: 0;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                top 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
    border-radius: 8px;
    position: relative;
    will-change: width, height, left, top;
}

.thumbnail-image[src=""],
.thumbnail-image:not([src]),
.thumbnail-image[src="undefined"] {
    display: none;
}

.project-thumbnail:empty,
.project-thumbnail:has(.thumbnail-image[src=""]),
.project-thumbnail:has(.thumbnail-image:not([src])),
.project-thumbnail:has(.thumbnail-image[src="undefined"]) {
    display: none;
}

/* Ensure modal-content is positioned for absolute children */
.modal-content {
    position: relative;
}

.project-thumbnail:hover,
.project-thumbnail.expanded {
    overflow: visible;
    z-index: 100;
}

/* Base styles for expanded image - will be overridden by inline styles initially */
.project-thumbnail:hover .thumbnail-image,
.project-thumbnail.expanded .thumbnail-image {
    position: fixed;
    transform: translate(-50%, -50%);
    z-index: 10001;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    object-fit: cover;
    pointer-events: none;
    /* Smooth, subtle transition from thumbnail position to center */
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                top 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset position when not expanded (for mobile closing) */
@media (max-width: 768px) {
    .project-thumbnail:not(.expanded) .thumbnail-image {
        position: relative !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .project-thumbnail:not(.expanded) .thumbnail-description {
        display: none !important;
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
    }
}

/* Thumbnail description text overlay */
.thumbnail-description {
    display: none;
    position: fixed;
    padding: 4px;
    font-size: 12px;
    font-weight: 400;
    color: #3B4D50;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
    z-index: 10002;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 4px 0 0;
    transition: opacity 0.3s ease, bottom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
}

.project-thumbnail:hover .thumbnail-description,
.project-thumbnail.expanded .thumbnail-description {
    display: block;
    opacity: 1;
}

/* Position description at bottom-left of expanded image (680px × 560px) */
.project-thumbnail:hover .thumbnail-description,
.project-thumbnail.expanded .thumbnail-description {
    bottom: calc(50vh - 280px + 4px); /* Center minus half height plus padding */
    left: calc(50vw - 340px + 4px); /* Center minus half width plus padding */
}

/* Mobile tap support */
@media (max-width: 768px) {
    .project-thumbnail.expanded .thumbnail-image {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        object-fit: contain;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-radius: 0;
        z-index: 10001;
    }
    
    .project-thumbnail.expanded::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.9);
        z-index: 10000;
        pointer-events: auto;
    }
    
    .project-thumbnail.expanded .thumbnail-description {
        bottom: 2rem;
        left: 1rem;
        right: 1rem;
        max-width: calc(100vw - 2rem);
        background: rgba(255, 255, 255, 0.95);
        padding: 8px 12px;
        border-radius: 4px;
        z-index: 10002;
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Hide description when not expanded on mobile */
    .project-thumbnail:not(.expanded) .thumbnail-description {
        display: none !important;
    }
    
    /* Hide modal close button when image is expanded */
    .project-view:has(.project-thumbnail.expanded) .modal-close {
        display: none !important;
        pointer-events: none;
    }
    
    /* Close button for expanded image */
    .thumbnail-close-btn {
        display: none;
        position: fixed;
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        padding: 0;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        color: #333;
        z-index: 10003;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .project-thumbnail.expanded .thumbnail-close-btn {
        display: flex;
    }
    
    /* Hide modal close button when image is expanded on mobile */
    .project-view:has(.project-thumbnail.expanded) .modal-close {
        display: none !important;
        pointer-events: none;
    }
    
    .thumbnail-close-btn svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
    }
}

.project-view-final {
    width: 100%;
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

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

/* Reference Cards Carousel */
.references-section {
    margin-top: 1rem;
    margin-bottom: 3rem;
}

.references-carousel {
    position: relative;
    overflow-x: hidden;
    overflow-y: hidden;
    width: 100%;
    padding-right: 86px; /* Show 80% of 3rd card (428px * 0.2 = 86px hidden) */
}

.carousel-gradient-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(234, 240, 246, 0.4) 40%,
        rgba(238, 242, 246, 0.8) 80%,
        rgba(241, 243, 246, 1) 100%);
    pointer-events: none;
    z-index: 5;
}

.carousel-arrow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 153, 231, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0099E7;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-arrow:hover {
    background: white;
    border-color: #0099E7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow svg {
    width: 20px;
    height: 20px;
}

.references-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.5s ease;
    will-change: transform;
    padding-top: 20px;
    padding-bottom: 20px;
}

.reference-card {
    width: 428px;
    flex-shrink: 0;
    background: #f6f9fc;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.0646), 0 2px 8px rgba(0, 0, 0, 0.0323);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 20px;
    margin-bottom: 20px;
    height: auto;
    align-self: flex-start;
}

.reference-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1026), 0 3px 10px rgba(0, 0, 0, 0.0513);
}

.reference-content {
    padding: 24px;
}

.reference-text {
    font-size: 14px;
    color: rgba(59, 77, 80, 0.95);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Reduce spacing between text columns ONLY in Feedback from colleagues cards (cards with multiple reference-text elements) */
.reference-content:has(.reference-text + .reference-text) .reference-text {
    margin-bottom: 0;
}

.reference-content:has(.reference-text + .reference-text) .reference-text + .reference-text {
    margin-top: 16px;
}

.reference-content:has(.reference-text + .reference-text) .reference-text:last-of-type {
    margin-bottom: 1.5rem;
}

.reference-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reference-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reference-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reference-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c8dff0 0%, #b3d4e5 50%, #a0c9dd 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reference-avatar-placeholder .colleague-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.reference-avatar-placeholder .heart-icon {
    width: 16px;
    height: 16px;
    color: #c85a6b;
    opacity: 0.85;
    animation: heartPulse 2s ease-in-out infinite;
    transform-origin: center;
}

@keyframes heartPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.reference-author-info {
    flex: 1;
}

.reference-author-name {
    font-size: 0.95rem;
    color: rgba(59, 77, 80, 0.95);
    margin-bottom: 0.25rem;
}

.reference-author-title {
    font-size: 0.85rem;
    color: rgba(59, 77, 80, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hide layout toggle on mobile */
    .layout-toggle {
        display: none;
    }
    
    .hero-card {
        padding: 16px;
    }

    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-image {
        width: 170px;
        height: 170px;
        border-radius: 50%;
        align-self: center;
    }

    .profile-info {
        padding: 2rem 1.5rem;
    }

    .main-nav, .footer-nav {
        flex-direction: row;
        gap: 2rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .project-image {
        height: 80px;
    }

    /* Force large layout on mobile - grid layout doesn't apply */
    .projects-section.grid-layout {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        max-width: 530px;
    }
    
    .projects-section.grid-layout .project-image {
        height: 180px;
    }
    
    .projects-section.grid-layout .project-content {
        padding: 1.5rem;
    }
    
    .projects-section.grid-layout .project-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .projects-section.grid-layout .project-description {
        display: block;
    }
    
    .projects-section.grid-layout .expand-btn {
        margin-top: 1rem;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .projects-section.grid-layout .project-image {
        height: 120px;
    }

    .layout-btn span {
        display: none;
    }

    .layout-btn {
        padding: 0.5rem;
    }
    
    /* Reference cards mobile - full width with same padding as hero */
    .references-carousel {
        padding-left: 0; /* Carousel itself has no padding */
        padding-right: 0;
        overflow-x: hidden !important;
        overflow-y: visible;
        position: relative;
        width: 100vw; /* Full viewport width */
        max-width: 100vw;
    }
    
    .references-track {
        gap: 1rem; /* 16px gap between cards */
        padding-left: 1rem; /* 16px padding to align with body */
        padding-right: 3rem; /* Space for arrow (48px) */
    }
    
    .reference-card {
        width: calc(100vw - 5rem) !important; /* 1rem left padding + 1rem gap + 3rem right arrow space */
        max-width: calc(100vw - 5rem) !important;
        min-width: calc(100vw - 5rem) !important;
        flex-shrink: 0;
    }
    
    /* Hide gradient overlay on mobile */
    .carousel-gradient-overlay {
        display: none;
    }
    
    /* Position arrow properly on mobile */
    .carousel-arrow {
        right: 1rem;
    }

}

@media (max-width: 768px) {
    .project-view {
        padding: 0;
    }
    
    .modal-overlay {
        display: none; /* Hide overlay on mobile for full screen */
    }
    
    .modal-dialog {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        margin: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .modal-content {
        padding: 1.5rem;
        padding-top: calc(24px + 1.5rem);
        height: 100%;
        overflow-y: auto;
    }
    
    .project-view-title-banner {
        width: calc(100% + 3rem);
        margin: calc(-24px - 1.5rem - 1.5rem) -1.5rem 20px -1.5rem;
        border-radius: 0;
    }
    
    .project-view-title-banner .project-view-title {
        white-space: nowrap;
        max-width: calc(100vw - 3rem);
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    .methods-section {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        width: calc(100% + 3rem);
    }
    
    .methods-container {
        width: 100%;
    }
    
    .methods-background {
        width: 100%;
        height: auto;
        min-height: 100px;
    }
    
    .methods-icons {
        left: 3rem;
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .method-group {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .method-icon {
        width: 32px;
        height: 32px;
    }
    
    .method-label {
        font-size: 11px;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        z-index: 1003;
    }
    
    .project-title-in-gradient {
        font-size: 0.85rem;
        padding: 0 1rem;
        width: calc(100% - 2rem);
    }
    
    /* Mobile font size adjustments */
    .project-view-title-banner .project-view-title {
        font-size: 15px;
        font-weight: 600; /* SemiBold */
        white-space: nowrap;
        max-width: calc(100vw - 3rem);
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 1rem;
        box-sizing: border-box;
        width: 100%;
    }
    
    .project-view-title-banner .project-info-line {
        font-size: 12px;
        font-weight: 400; /* Regular */
    }
    
    .project-view-description {
        font-size: 14px;
        font-weight: 400; /* Regular */
        margin-bottom: 20px;
    }
    
    .project-view-header {
        margin-bottom: 20px;
    }
    
    .project-section-title {
        font-size: 15px;
        font-weight: 600; /* SemiBold */
    }
    
    .project-section-content {
        font-size: 14px;
        font-weight: 400; /* Regular */
    }
    
    /* Key Findings mobile font sizes */
    .key-findings-title {
        font-size: 12px;
        font-weight: 500; /* Medium */
    }
    
    .key-findings-content {
        font-size: 12px;
        font-weight: 700; /* Bold */
    }
    
    .key-findings-content p {
        font-size: 12px;
        font-weight: 700; /* Bold */
    }
}

@media (max-width: 480px) {
    .projects-section.grid-layout {
        grid-template-columns: 1fr;
    }
}

