/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6E90AF;
    --secondary-color: #8BA8C4;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-alt: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

.theme-dark {
    --text-color: #f9fafb;
    --text-light: #d1d5db;
    --bg-color: #111827;
    --bg-alt: #1f2937;
    --border-color: #374151;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.theme-dark .navbar {
    background: rgba(17, 24, 39, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 24px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.theme-icon-img {
    width: 24px;
    height: 24px;
    display: block;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-mobile-buttons {
    display: none;
    gap: 0.75rem;
    align-items: center;
}

.nav-emoji-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    background: transparent;
    border: none;
    transition: var(--transition);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
}

.nav-emoji-btn:hover {
    transform: scale(1.15);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 1.5rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
}

.hero-title-wrapper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-color);
    letter-spacing: -0.02em;
    grid-column: span 3;
    text-align: left;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
}

.hero-title .name-wrap {
    white-space: nowrap;
    display: inline-block;
    font-size: 0.75em;
}

.hero-title .highlight-name {
    padding: 0.1em 0.3em;
    border-radius: 4px;
    display: inline-block;
    position: relative;
}

.hero-title .title-role-wrapper {
    display: inline-block;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
}

.hero-title .title-role {
    font-size: 0.85em;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

.hero-title .typing-cursor {
    display: inline-block;
    font-size: 0.85em;
    font-family: 'Montserrat', sans-serif;
    margin-left: 2px;
    animation: blink 1s infinite;
    opacity: 1;
    transition: opacity 0.3s ease;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.hero-title .location-wrap {
    white-space: nowrap;
    display: inline-block;
    font-size: 0.75em;
}

.hero-title .highlight-name::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #FFF9C4;
    border-radius: 4px;
    z-index: -1;
    animation: highlight-draw 1.2s ease-in-out forwards;
    box-shadow: 0 0 10px rgba(255, 249, 196, 0.5);
}

.theme-dark .hero-title .highlight-name::before {
    background: #D4A017;
    box-shadow: 0 0 10px rgba(212, 160, 23, 0.5);
}

@keyframes highlight-draw {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

.hero-title .city-name {
    background: linear-gradient(135deg, #9B59B6 0%, #F1C40F 50%, #9B59B6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 3rem;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border-color: var(--primary-color);
}

.theme-dark .btn-secondary {
    border-color: #c5c5c5;
}

.btn-secondary:hover {
    background: var(--bg-alt);
    border-color: var(--primary-color);
}

.gradient-orb {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    filter: blur(80px);
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(calc(-50% + 30px), calc(-50% - 30px)) scale(1.1);
    }
}

/* Sections */
.section {
    padding: 4rem 0;
    overflow: visible;
}

.section-alt {
    background: var(--bg-color);
}

#portfolio {
    overflow: visible;
    position: relative;
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
}

#portfolio .container {
    overflow: visible;
    max-width: 100%;
    position: relative;
}

.section-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

/* Highlights Section - Apple Style Gallery */
.highlights-section {
    padding: 6rem 0;
    background: var(--bg-color);
    position: relative;
}

.highlights-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

/* Navigation Triggers */
.highlights-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.highlight-trigger {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.highlight-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.highlight-trigger:hover {
    border-color: var(--primary-color);
    color: var(--text-color);
}

.highlight-trigger:hover::before {
    opacity: 0.1;
}

.highlight-trigger.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.highlight-trigger.active::before {
    opacity: 0;
}

.highlight-trigger span {
    position: relative;
    z-index: 1;
}

/* Gallery Container */
.card-set {
    list-style: none;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 600px;
}

.card-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(50px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.card-container.current {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
    z-index: 2;
}

.card {
    width: 100%;
    height: 100%;
    background: var(--bg-alt);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.media-block {
    width: 100%;
    height: 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.highlight-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(110, 144, 175, 0.1), rgba(139, 168, 196, 0.1));
}

.highlight-visual {
    width: 200px;
    height: 200px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.highlight-visual svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 20px rgba(110, 144, 175, 0.2));
}

.caption-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(10px);
}

.theme-dark .caption-container {
    background: linear-gradient(to top, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.95));
}

.caption {
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
    text-align: center;
    letter-spacing: -0.01em;
}

/* About Section */
.about-text {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.text-spacer {
    /* Empty spacer to match stat grid - intentionally left empty for grid alignment */
    min-width: 0;
}

.text-content-wrapper {
    grid-column: span 3;
    text-align: left;
}

.text-content-wrapper p {
    margin-bottom: 1.5rem;
}

.text-content-wrapper p:last-child {
    margin-bottom: 0;
}

.text-content-wrapper a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.text-content-wrapper a:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.ladder-link {
    font-weight: 700;
    font-style: italic;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: var(--bg-alt);
    border-radius: 12px;
    transition: var(--transition);
    text-align: left;
    height: 140px;
    justify-content: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: 0;
}

.stat-note {
    display: none;
}

.stat-tooltip {
    position: fixed;
    padding: 0.5rem 0.75rem;
    background: var(--bg-color);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--text-color);
    font-weight: 500;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 10000;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.stat-tooltip.visible {
    opacity: 1;
}

/* Mobile stat note display within box */
@media (max-width: 768px) {
    .stat-item {
        position: relative;
        overflow: hidden;
    }

    .stat-item .stat-note {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(2px);
        padding: 1rem;
        font-size: 0.775rem;
        color: #ffffff;
        line-height: 1.5;
        text-align: center;
        z-index: 10;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        border-radius: 12px;
    }

    .stat-item.active .stat-note {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Portfolio Carousel */
.portfolio-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 0.25rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    position: relative;
    min-height: 600px;
    overflow: visible;
}

.portfolio-item {
    position: absolute;
    top: 0;
    left: 0;
    grid-column: 1 / 7;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
    z-index: 0;
    cursor: default;
    visibility: hidden;
    overflow: visible;
}

.portfolio-item.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
    pointer-events: auto;
    visibility: visible;
}

.portfolio-item.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
}

.portfolio-item.slide-out-right {
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
}

.portfolio-item.slide-in-from-right {
    transform: translateX(100%);
    opacity: 0;
    visibility: visible;
}

.portfolio-item.slide-in-from-left {
    transform: translateX(-100%);
    opacity: 0;
    visibility: visible;
}

/* No animations - instant transitions */
.portfolio-item:not(.active) .portfolio-content {
    opacity: 0;
    transform: translateX(-30px);
}

.portfolio-item.active .portfolio-content {
    opacity: 1;
    transform: translateX(0);
}

.portfolio-item:not(.active) .portfolio-image {
    opacity: 0;
    transform: translateX(30px);
}

.portfolio-item.active .portfolio-image {
    opacity: 1;
    transform: translateX(0);
}

/* Portfolio Labels */
.portfolio-labels {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    padding: 0 1.5rem;
}

.portfolio-label {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
    transition: var(--transition);
}

.portfolio-label:hover {
    background: var(--border-color);
    transform: scale(1.1);
}

.portfolio-label.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.portfolio-label.active:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.portfolio-next-btn:hover {
    background: var(--border-color);
    transform: scale(1.1);
}

.portfolio-next-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .portfolio-next-btn {
        display: none;
    }
}


.portfolio-content {
    grid-column: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 2rem;
    overflow: visible;
    min-height: 0;
}

.portfolio-image {
    grid-column: 3 / 7;
    width: 100%;
    height: 100%;
    min-height: 500px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.portfolio-image img,
.portfolio-image .portfolio-placeholder {
    transition: transform 0.3s ease;
}

.portfolio-image:hover img,
.portfolio-image:hover .portfolio-placeholder {
    transform: scale(1.1);
}

.portfolio-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 100%);
}

.portfolio-placeholder {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    z-index: 1;
}

.portfolio-content h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 0;
    color: var(--text-color);
    line-height: 1.5;
    letter-spacing: -0.01em;
    overflow: visible;
    padding-top: 0;
    margin-top: 0;
    padding-bottom: 0.2em;
}

.portfolio-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1rem;
    overflow: visible;
}

.portfolio-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.portfolio-case-study-link {
    display: none;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition);
    margin-top: 1rem;
}

.portfolio-case-study-link:hover {
    color: var(--secondary-color);
}

@media (min-width: 769px) {
    .portfolio-case-study-link {
        display: inline-block;
    }
}

.portfolio-metric {
    padding: 1.25rem;
    background: rgba(110, 144, 175, 0.08);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.theme-dark .portfolio-metric {
    background: rgba(110, 144, 175, 0.15);
}

.portfolio-metric:hover {
    border-color: var(--primary-color);
    background: rgba(110, 144, 175, 0.12);
    transform: translateY(-2px);
}

.theme-dark .portfolio-metric:hover {
    background: rgba(110, 144, 175, 0.2);
}

.portfolio-metric-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.portfolio-metric-label {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tag {
    padding: 0.375rem 0.875rem;
    background: var(--bg-alt);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--text-color);
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tag:hover {
    border-color: var(--primary-color);
    background: rgba(110, 144, 175, 0.1);
}

.portfolio-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.portfolio-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
    position: relative;
}

.portfolio-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.portfolio-link:hover {
    color: var(--secondary-color);
}

.portfolio-link:hover::after {
    width: 100%;
}

/* Portfolio Carousel Indicators */
.portfolio-indicators {
    display: none;
}

.portfolio-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.5;
}

.portfolio-indicator.active {
    width: 24px;
    height: 8px;
    border-radius: 4px;
    background: var(--primary-color);
    opacity: 1;
}

.portfolio-indicator:hover {
    opacity: 0.8;
    background: var(--primary-color);
}


/* Contact Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-color);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 2001;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-close:hover {
    background: var(--border-color);
    transform: scale(1.1);
}

.modal-content .section-title {
    margin-bottom: 2rem;
    text-align: center;
}

/* Project Page Styles */
.project-page {
    padding: 8rem 0 4rem;
    min-height: calc(100vh - 200px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 3rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.project-header {
    text-align: center;
    margin-bottom: 4rem;
}

.project-emoji-large {
    font-size: 6rem;
    display: block;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.project-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.project-content {
    max-width: 800px;
    margin: 0 auto;
}

.project-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.project-description p {
    margin-bottom: 1.5rem;
}

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

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.fun-fact-callout {
    background: #FFF9C4;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: 0 4px 12px rgba(255, 249, 196, 0.3);
    border: 2px solid rgba(255, 249, 196, 0.5);
}

.theme-dark .fun-fact-callout {
    background: #D4A017;
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.3);
    border-color: rgba(212, 160, 23, 0.5);
}

.fun-fact-title {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-dark .fun-fact-title {
    color: #1f2937;
}

.fun-fact-callout p,
.fun-fact-callout .fun-fact-text {
    margin: 0;
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(110, 144, 175, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236E90AF' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--bg-color);
    padding: 0.5rem 0 2rem 0;
}

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

.footer p {
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a svg {
    width: 24px;
    height: 24px;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
}

.social-links a:hover svg {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .nav-mobile-buttons {
        display: flex;
    }
    
    .nav-right-group {
        margin-left: auto;
    }

    .hero {
        padding: 6rem 1.5rem 4rem;
    }

    .gradient-orb {
        width: 300px;
        height: 300px;
    }

    .hero-title-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-title {
        grid-column: span 1;
        font-size: 2.5rem;
        text-align: center;
    }

    .about-text {
        grid-template-columns: 1fr;
    }

    .text-content-wrapper {
        grid-column: span 1;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 1rem;
        margin-top: 1rem;
    }

    .stat-spacer {
        display: none;
    }

    .stat-item {
        height: 120px;
        padding: 1rem;
        flex-direction: column;
        justify-content: center;
    }

    .stat-item:nth-child(2),
    .stat-item:nth-child(3) {
        height: 120px;
    }

    .stat-item {
        cursor: pointer;
    }

    .stat-item:nth-child(4) {
        grid-column: span 2;
        height: 120px;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .stat-item:nth-child(4) .stat-number {
        margin-bottom: 0;
    }

    .stat-number {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .stat-label {
        font-size: 0.8125rem;
    }

    .card-set {
        height: 500px;
    }

    .highlights-nav {
        gap: 0.75rem;
    }

    .highlight-trigger {
        padding: 0.6rem 1.2rem;
        font-size: 0.875rem;
    }

    .caption-container {
        padding: 2rem 1.5rem;
    }

    #portfolio {
        padding-top: 4rem !important;
    }

    #portfolio .container {
        padding: 0;
    }

    #portfolio .section-title,
    #portfolio .section-subtitle {
        padding: 0 1.5rem;
    }
    
    .portfolio-labels {
        margin-bottom: 3rem;
        margin-top: 0;
        padding: 0 1.5rem;
    }
    
    .portfolio-wrapper {
        position: relative;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1.5rem 0.25rem;
        overflow: visible;
    }

    .portfolio-grid {
        display: block;
        overflow: visible;
        gap: 0;
        padding: 0;
        max-width: 100%;
        box-sizing: border-box;
        height: auto;
        position: relative;
    }

    .portfolio-item {
        position: relative;
        width: 100%;
        height: auto;
        display: none;
        flex-direction: column;
        background: var(--bg-alt);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        opacity: 0;
        transition: opacity 0.3s ease;
        margin-bottom: 0;
    }
    
    .portfolio-item.active {
        display: flex;
        opacity: 1;
    }
    
    .portfolio-image {
        height: 200px;
        min-height: 200px;
        order: 1;
        border-radius: 16px 16px 0 0;
        transition: none;
    }
    
    .portfolio-content {
        padding: 1.75rem;
        max-width: 100%;
        order: 2;
        background: var(--bg-alt);
        transition: none;
    }

    .portfolio-content h3 {
        margin-bottom: 32px;
    }

    .portfolio-content p {
        margin-bottom: 32px;
    }

    .portfolio-metrics {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
        margin-top: 0;
    }

    .portfolio-metric {
        padding: 1rem;
    }

    .portfolio-metric-number {
        font-size: 1rem;
    }

    .portfolio-metric-label {
        font-size: 0.8125rem;
    }

    .portfolio-item:hover {
        transform: none;
    }

    .portfolio-item.active,
    .portfolio-item.prev,
    .portfolio-item.next {
        transform: none;
        background: var(--bg-alt);
        filter: none;
        opacity: 1;
    }
    
    /* Remove desktop animations on mobile */
    .portfolio-item:not(.active) .portfolio-content,
    .portfolio-item.active .portfolio-content {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .portfolio-item:not(.active) .portfolio-image,
    .portfolio-item.active .portfolio-image {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 393px) {
    .hero-title .name-prefix {
        display: none;
    }

    .hero-title {
        text-align: left;
    }
}

