.contact-container {
    max-width: 112rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-description {
    font-size: clamp(0.875rem, 2vw, 1.25rem);
    color: var(--gray-80);
    line-height: 1.6;
    margin-bottom: 32px;
}

.contact-description-secondary {
    font-size: clamp(0.75rem, 1.5vw, 1.125rem);
    color: var(--gray-70);
    line-height: 1.6;
}

.contact-title {
    font-family: var(--font-header);
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: 700;
    margin-bottom: 32px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInLeft 0.6s ease-out forwards;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }

.contact-item:hover { transform: translateX(8px); }

.contact-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon { transform: scale(1.1); }

.contact-text {
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: var(--gray-80);
    transition: color 0.3s ease;
}

.contact-item:hover .contact-text { color: var(--black); }

/* ========================================
   TABLET STYLES (769px - 1200px)
   ======================================== */
@media (max-width: 1200px) and (min-width: 769px) {

    .about-container {
        gap: 40px;
        padding: 0 40px;
    }
    
    .skills-list {
        gap: 20px;
    }
    
    .about-description {
        font-size: 1.125rem;
    }
    
    /* Portfolio tablet fixes */
    .portfolio-mobile {
        display: none;
    }
    
    .portfolio-desktop {
        display: flex !important;
    }
    
    .portfolio-grid-container {
        padding-right: 20px;
    }
    
    .project-tile {
        padding: 20px;
        min-height: 200px;
    }
    
    .project-icon svg {
        max-width: 100px;
        max-height: 100px;
    }

    .nav-name { display: block; }
    
    .nav {
        gap: 20px;
    }
    
    .nav-line {
        height: 40px;
        margin-left: 20px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .project-tile {
        padding: 24px;
    }
    
    .project-icon svg {
        max-width: 120px;
        max-height: 120px;
    }
    
    .about-container,
    .contact-container {
        max-width: 90%;
        gap: 48px;
    }
    
    .portfolio-grid-container.collapsed {
        width: 35%;
    }
    
    .project-detail-panel.active {
        width: 65%;
    }
    
    .project-detail-content {
        padding: 24px;
    }
    
    .project-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .project-detail-header h2 {
        font-size: 2rem;
    }
}

/* ========================================
   MOBILE STYLES (≤768px)
   ======================================== */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }
    
    .main-container {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        scroll-snap-type: none;
        height: auto;
    }

    .section {
        width: 100vw;
        height: auto;
        min-height: 100vh;
        padding-top: 80px;
        padding-bottom: 40px;
        scroll-snap-align: none;
    }

    .header {
        padding: 12px 16px;
        background: rgba(0, 0, 0, 0.95);
        mix-blend-mode: normal;
    }
    
    .logo {
        color: var(--white);
    }

    .logo h1 {
        font-size: 1rem;
    }

    .nav {
        gap: 8px;
    }
    
    .nav-button {
        font-size: 0.65rem;
        color: var(--white);
    }

    .nav-name {
        display: none;
    }

    .nav-line {
        height: 24px;
        margin-left: 8px;
    }

    .hero-section {
        min-height: 100vh;
        padding-top: 0;
        padding-bottom: 0;
    }

    .hero-content {
        padding: 0 20px;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-notice {
        font-size: 0.5rem;
    }




    .about-section,
.contact-section {
    padding: 100px 20px 60px;
    min-height: 100vh;
    height: auto;
}

.about-section .section-header,
.contact-section .section-header {
    margin-bottom: 24px;
}

    .about-container {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0;
    max-width: 100%;
    width: 100%;
}

.about-text {
    width: 100%;
}

.skills-section {
    width: 100%;
}

    .skills-list {
    gap: 12px;
}

.skill-item {
    gap: 12px;
    flex-wrap: wrap;
}

.skill-number {
    min-width: 40px;
}

.skill-name {
    flex: 1;
    font-size: 0.875rem;
}
    
    .section-title {
    font-size: 2.5rem;
    line-height: 1.1;
    word-break: break-word;
}

.about-description,
.contact-description {
    font-size: 1rem;
    margin-bottom: 24px;
}

.about-description-secondary,
.contact-description-secondary {
    font-size: 0.875rem;
}
    
    .section-line {
        width: 64px;
        height: 3px;
        margin-bottom: 24px;
    }

    /* Portfolio Mobile */
    /* Portfolio Mobile */
.portfolio-section {
    padding: 100px 20px 60px;
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
}

.portfolio-section .section-header {
    position: sticky;
    top: 80px;
    background: var(--black);
    z-index: 10;
    padding-bottom: 16px;
}

    .portfolio-desktop {
        display: none !important;
    }

    .portfolio-mobile {
        display: block;
        width: 100%;
    }

    .portfolio-header.mobile {
        margin-bottom: 32px;
        text-align: center;
    }
    
    .portfolio-header.mobile .section-line {
        margin-left: auto;
        margin-right: auto;
    }

    .portfolio-mobile-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mobile-project-tile {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--black);
    margin-bottom: 16px;
    touch-action: manipulation;
}

@media (hover: hover) {
    .mobile-project-tile:hover {
        transform: scale(1.02);
    }
}

    .mobile-project-tile:active {
        background: var(--white);
        color: var(--black);
    }
    
    .mobile-project-tile .project-icon {
        flex: 1;
        min-height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white-70);
    }
    
    .mobile-project-tile:active .project-icon {
        color: var(--black);
    }
    
    .mobile-project-tile .project-icon svg {
        max-width: 100px;
        max-height: 100px;
    }
    
    .mobile-project-tile .project-category {
        color: var(--white-60);
    }
    
    .mobile-project-tile:active .project-category {
        color: rgba(0, 0, 0, 0.6);
    }

    .mobile-project-detail {
    background: var(--white);
    color: var(--black);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease-in-out, 
                margin 0.3s ease;
    margin-top: 0;
    margin-bottom: 0;
}

.mobile-project-detail * {
    box-sizing: border-box;
}

    .mobile-project-detail.active {
        max-height: 10000px;
        opacity: 1;
        margin-top: -16px;
        margin-bottom: 16px;
        border: 2px solid var(--white);
        border-top: none;
    }

    .mobile-project-detail-content {
        padding: 24px;
    }
    
    .mobile-project-detail .back-button {
        color: var(--black);
        margin-bottom: 24px;
        font-size: 0.9rem;
    }
    
    .mobile-project-detail .project-detail-header h2 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .mobile-project-detail .detail-section {
        margin-bottom: 24px;
    }
    
    .mobile-project-detail .detail-section h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .mobile-project-detail .tech-tags,
    .mobile-project-detail .research-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .mobile-project-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.mobile-project-detail .project-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.mobile-project-detail .project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f5f5f5;
}
    
    .mobile-project-detail .project-image {
        aspect-ratio: 16/9;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0;
    }

    .contact-list {
        gap: 20px;
    }

    .contact-item {
        gap: 12px;
    }

    .contact-icon {
        width: 44px;
        height: 44px;
    }
    
    .contact-content {
        gap: 12px;
    }
}
/* ========================================
   SMALL MOBILE (≤480px)
   ======================================== */
@media (max-width: 480px) {
    .section {
        padding-top: 70px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .about-section,
    .contact-section,
    .portfolio-section {
        padding: 90px 16px 50px;
    }
    
    .about-container,
    .contact-container {
        gap: 24px;
    }
    
    .about-description {
        font-size: 0.9375rem;
        margin-bottom: 20px;
    }

    .mobile-project-tile {
        padding: 16px;
        min-height: 160px;
    }
    
    .mobile-project-tile .project-icon svg {
        max-width: 70px;
        max-height: 70px;
    }
    
    .mobile-project-detail-content {
        padding: 16px;
    }
    
    .mobile-project-detail .project-detail-header h2 {
        font-size: 1.5rem;
    }
    
    .tech-tag,
    .research-tag {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .view-project-btn {
        padding: 10px 16px;
        font-size: 0.875rem;
        width: 100%;
        justify-content: center;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .skill-item {
        gap: 8px;
    }
    
    .skill-number {
        min-width: 35px;
        font-size: 0.9rem;
    }
    
    .skill-name {
        font-size: 0.8125rem;
    }
}

/* Desktop Navigation Enhancement */
@media (min-width: 769px) {
    .nav-name {
        display: block;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .nav-button {
        font-size: 1rem;
    }
    
    .nav {
        gap: 32px;
    }
    
    .nav-line {
        height: 48px;
        margin-left: 32px;
    }
}




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

:root {
    --font-header: 'Space Grotesk', sans-serif;
    --font-body: 'JetBrains Mono', monospace;
    --black: #000000;
    --white: #f9f9f9;
    --light-purple: #4F58BA;
    --dark-purple: #2E0782;
    --gray-80: rgba(0, 0, 0, 0.8);
    --gray-70: rgba(0, 0, 0, 0.7);
    --gray-60: rgba(0, 0, 0, 0.6);
    --white-80: rgba(255, 255, 255, 0.8);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-60: rgba(255, 255, 255, 0.6);
    --white-30: rgba(255, 255, 255, 0.3);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-10: rgba(255, 255, 255, 0.1);
}

/* Mobile Blocker Styles */
.mobile-blocker {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--black);
    color: var(--white);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 32px;
}

.mobile-blocker-content {
    text-align: center;
    max-width: 400px;
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.blocker-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    color: var(--white);
}

.blocker-icon svg {
    width: 100%;
    height: 100%;
}

.mobile-blocker-content h1 {
    font-family: var(--font-header);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

.mobile-blocker-content p {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--white-80);
    line-height: 1.6;
    margin-bottom: 12px;
}

.blocker-subtext {
    font-size: 0.875rem;
    color: var(--white-60);
    margin-top: 24px;
}

/* Show blocker on mobile only (allow tablets) */
@media (max-width: 768px) {
    .mobile-blocker {
        display: flex;
    }
    
    /* Hide all other content when blocker is active */
    body {
        overflow: hidden;
    }
    
    .header,
    .main-container {
        display: none;
    }
}

/* Optional: Adjust breakpoint for tablets */
@media (max-width: 768px) {
    .mobile-blocker-content h1 {
        font-size: 1.75rem;
    }
    
    .blocker-icon {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .mobile-blocker {
        padding: 24px;
    }
    
    .mobile-blocker-content h1 {
        font-size: 1.5rem;
    }
    
    .mobile-blocker-content p {
        font-size: 0.9375rem;
    }
    
    .blocker-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 24px;
    }
}

/* Smooth transitions for all viewport changes */
* {
    transition: none !important;
}

body.transitioning * {
    transition: all 0.3s ease !important;
}


html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 12px 24px;
    mix-blend-mode: difference;
    animation: slideDown 1s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
    }
    to {
        transform: translateY(0);
    }
}

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

.logo {
    color: var(--white);
    cursor: pointer;
    font-family: var(--font-header);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo h1 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

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

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

.nav-button {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.75rem;
    opacity: 0.6;
    transition: all 0.3s ease;
    position: relative;
}

.nav-button:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.nav-button.active {
    opacity: 1;
}

.nav-button.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--white);
}

.nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-number {
    font-weight: 700;
}

.nav-name {
    font-size: 0.75rem;
    margin-top: 4px;
    display: none;
}

.nav-line {
    width: 1px;
    height: 32px;
    background: var(--white-30);
    margin-left: 12px;
}

.nav-item:last-child .nav-line {
    display: none;
}

/* Main Container */
.main-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    will-change: scroll-position;
}

.main-container::-webkit-scrollbar {
    display: none;
}

.section {
    flex-shrink: 0;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw;
    min-height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero-section {
    background: var(--black);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
}

.animated-dots {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: fadeIn 2s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.hero-content {
    text-align: center;
    z-index: 10;
    max-width: 64rem;
    padding: 0 32px;
}

.hero-title {
    font-family: var(--font-header);
    font-size: clamp(3rem, 8vw, 9rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 16px;
    animation: slideUp 1s ease-out 0.5s both;
}

.hero-subtitle {
    font-family: var(--font-header);
    font-size: 50px;
    font-weight: 100;
    letter-spacing: 0.05em;
    line-height: 1.2;
    animation: slideUp 1s ease-out 0.7s both;
}

.hero-notice {
    font-family: var(--font-header);
    font-size: 20px;
    font-weight: 80;
    letter-spacing: 0.05em;
    line-height: 2;
    animation: slideUp 1s ease-out 0.7s both;
    text-transform: uppercase;
    color: #3fdecc;
}



/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10;
    opacity: 0;
    animation: fadeInRight 1s ease-out 1.5s forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.scroll-indicator-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--white-70);
    text-transform: uppercase;
}

.scroll-indicator-arrow {
    width: 32px;
    height: 32px;
    color: var(--white);
    animation: bounceRight 2s ease-in-out infinite;
}

@keyframes bounceRight {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

.scroll-indicator-arrow svg {
    width: 100%;
    height: 100%;
}

/* Hide scroll indicator on mobile */
@media (max-width: 768px) {
    .scroll-indicator {
        display: none;
    }
}

/* Adjust position on tablets */
@media (max-width: 1200px) and (min-width: 769px) {
    .scroll-indicator {
        right: 24px;
    }
    
    .scroll-indicator-text {
        font-size: 0.65rem;
    }
}



@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* About Section */
.about-section {
    background: var(--white);
    color: var(--black);
    padding: 24px 32px;
}

.about-container {
    max-width: 112rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.section-header {
    margin-bottom: 32px;
}

.section-title {
    font-family: var(--font-header);
    font-size: clamp(2rem, 5vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 24px;
}

.section-line {
    width: 96px;
    height: 4px;
    background: var(--black);
    margin-bottom: 32px;
}

.about-description {
    font-size: clamp(0.875rem, 2vw, 1.25rem);
    color: var(--gray-80);
    line-height: 1.6;
    margin-bottom: 32px;
}

.about-description-secondary {
    font-size: clamp(0.75rem, 1.5vw, 1.125rem);
    color: var(--gray-70);
    line-height: 1.6;
}

.skills-title {
    font-family: var(--font-header);
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: 700;
    margin-bottom: 32px;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 24px;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInLeft 0.6s ease-out forwards;
}

.skill-item:nth-child(1) { animation-delay: 0.1s; }
.skill-item:nth-child(2) { animation-delay: 0.2s; }
.skill-item:nth-child(3) { animation-delay: 0.3s; }
.skill-item:nth-child(4) { animation-delay: 0.4s; }
.skill-item:nth-child(5) { animation-delay: 0.5s; }
.skill-item:nth-child(6) { animation-delay: 0.6s; }
.skill-item:nth-child(7) { animation-delay: 0.7s; }
.skill-item:nth-child(8) { animation-delay: 0.8s; }
.skill-item:nth-child(9) { animation-delay: 0.9s; }
.skill-item:nth-child(10) { animation-delay: 1s; }

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.skill-number {
    font-family: var(--font-header);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
    min-width: 48px;
}

.skill-name {
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: var(--gray-80);
}

/* Portfolio Section */
.portfolio-section {
    background: var(--black);
    color: var(--white);
    padding: 64px 32px;
    overflow: hidden;
}

.portfolio-container {
    max-width: 100%;
    height: 100%;
}

.portfolio-desktop {
    display: flex;
    height: 100%;
}

.portfolio-mobile {
    display: none;
}

/*.portfolio-grid-container {
    width: 100%;
    overflow-y: auto;
    transition: width 0.5s ease-in-out;
    padding-right: 16px;
}*/

.portfolio-grid-container {
    width: 100%;
    overflow-y: auto;
    transition: width 0.5s ease-in-out;
    padding-right: 16px;
    padding-top: 80px;
    box-sizing: border-box;
}

.portfolio-grid-container.collapsed {
    width: 33.333333%;
}

.portfolio-header {
    margin-bottom: 64px;
    text-align: center;
}

.portfolio-header.mobile {
    text-align: center;
    margin-bottom: 24px;
}

.portfolio-description {
    font-size: clamp(0.75rem, 1.5vw, 1.25rem);
    color: var(--white-80);
    max-width: 32rem;
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    transition: all 0.3s ease;
}

@media (min-width: 1400px) {
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1000px) and (max-width: 1399px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 999px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


.portfolio-grid.collapsed {
    grid-template-columns: 1fr;
}

.project-tile {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(100px);
    animation: slideUpFade 0.6s ease-out forwards;
}


.project-tile:hover {
    background: var(--white);
    color: var(--black);
    /*transform: scale(1.02);*/
}

.project-tile:nth-child(1) { 
    animation-delay: 0.1s;  }

.project-tile:nth-child(2) { 
    animation-delay: 0.2s; }

.project-tile:nth-child(3) { 
    animation-delay: 0.3s; }

.project-tile:nth-child(4) { 
    animation-delay: 0.4s; }

.project-tile:nth-child(5) { 
    animation-delay: 0.5s; }

.project-tile:nth-child(6) { 
    animation-delay: 0.6s; }

.project-tile:nth-child(7) { 
    animation-delay: 0.7s; }

.project-tile:nth-child(8) { 
    animation-delay: 0.8s; }

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

.project-tile.collapsed {
    aspect-ratio: auto;
    padding: 16px;
}

.project-tile.collapsed .project-icon {
    height: 64px;
}

.project-icon {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-70);
    transition: color 0.3s ease;
}

.project-tile:hover .project-icon {
    color: var(--black);
}

.project-icon svg {
    width: 100%;
    height: 100%;
    max-width: 150px;
    max-height: 150px;
}

.project-info {
    margin-top: 16px;
}

.project-category {
    font-size: 0.875rem;
    color: var(--white-60);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.project-tile:hover .project-category {
    color: rgba(0, 0, 0, 0.6);
}

.project-title {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.125rem;
}

.project-detail-panel {
    width: 0;
    background: var(--white);
    color: var(--black);
    overflow: hidden;
    /*transition: width 0.5s ease-in-out;*/

    margin-left: 16px;
}

.project-detail-panel.active {
    width: 66.666667%;
}

.project-detail-content {
    padding: 32px;
    height: 100%;
    overflow-y: auto;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--gray-60);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 32px;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: var(--black);
    transform: scale(1.05);
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.project-detail-header h2 {
    font-family: var(--font-header);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.project-detail-category {
    color: var(--gray-60);
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.detail-section h3 {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 12px;
}

.detail-section p {
    color: var(--gray-80);
    line-height: 1.6;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: var(--black);
    color: var(--white);
    padding: 4px 12px;
    font-size: 0.875rem;
}

/* Product images */
.project-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.project-image {
    aspect-ratio: 1;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

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

/* Research images */
.research-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.research-image {
    aspect-ratio: 1;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.research-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.research-tags .research-tag {
  border: 1px solid black;
  background: transparent;
  color: black;
  padding: 4px 8px;
  border-radius: 4px;
  margin: 2px;
  display: inline-block;
}

.references-list {
  color: #777;          /* lighter grey */
  font-size: 0.9rem;
  margin-left: 1rem;
  list-style-type: disc;
}

.references-list li {
  margin-bottom: 4px;
}


/*
.image-modal {
  display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;  
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.image-modal-content {
  position: relative;
}
.image-modal-content img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
}
.image-modal-content .close {
  position: absolute;
  top: -30px; right: -30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}
.image-caption {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 6px;
  color: #555;
}
*/

















.view-project-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--black);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.3s ease;
}

.view-project-btn:hover {
    background: var(--gray-80);
}

/* Contact Section */
.contact-section {
    background: var(--white);
    color: var(--black);
    padding: 24px 32px;
}

.contact-container {
    max-width: 112rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.contact-description {
    font-size: clamp(0.875rem, 2vw, 1.25rem);
    color: var(--gray-80);
    line-height: 1.6;
    margin-bottom: 32px;
}

.contact-description-secondary {
    font-size: clamp(0.75rem, 1.5vw, 1.125rem);
    color: var(--gray-70);
    line-height: 1.6;
}

.contact-title {
    font-family: var(--font-header);
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: 700;
    margin-bottom: 32px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInLeft 0.6s ease-out forwards;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }

.contact-item:hover {
    transform: translateX(8px);
}

.contact-number {
    font-family: var(--font-header);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
    min-width: 48px;
}

.contact-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
}

.contact-text {
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: var(--gray-80);
    transition: color 0.3s ease;
}

.contact-item:hover .contact-text {
    color: var(--black);
}



/* Project Pages */
.projectpage {
    background: var(--white);
    color: var(--black);
    padding: 24px 32px;
}


.projectpage-container {
    max-width: 112rem;
    width: 100%;
    display: flex;
    margin-inline: auto;
    padding-left: 10%;
    padding-right:10%;
    padding-top: 5%;
    align-items: center;

}

.projectpage-description {
    font-size: clamp(0.875rem, 2vw, 1.25rem);
    color: var(--gray-80);
    line-height: 1.6;
    margin-bottom: 32px;
}

.projectpage-description-secondary {
    font-size: clamp(0.75rem, 1.5vw, 1.125rem);
    color: var(--gray-70);
    line-height: 1.6;
}

.projectpage-title {
    font-family: var(--font-header);
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: 700;
    margin-bottom: 32px;
}

.projectpage-text {
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: var(--gray-80);
    transition: color 0.3s ease;
}

.projectpage-header h2 {
    font-family: var(--font-header);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.projectpage-subheading h3 {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 12px;
}
.projectpage body {
    overflow: auto;
}

.projectpage-body p {
    color: var(--gray-80);
    line-height: 1.6;
}

.projectpage-tech-tag {
    background: var(--black);
    color: var(--white);
    padding: 4px 12px;
    font-size: 0.875rem;
}

.projectpage-images {
    /*display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;*/
    max-width: 1200px;
}












/* Mobile Styles */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        scroll-snap-type: y mandatory;

    .section-title {

    }
    }

    @media (max-width: 768px) {
    .main-content,
    .section,
    .intro-section {
        padding-top: 100px; /* More space on mobile if needed */
    }

    .section {
        width: 100vw;
        height: 100vh;
        padding-top: 80px;
    }

    .header {
        padding: 12px;
    }

    .logo h1 {
        font-size: 1rem;
    }

    .nav {
        gap: 12px;
    }

    .nav-name {
        display: none;
    }

    .nav-line {
        height: 32px;
        margin-left: 12px;
    }

    .hero-content {
        padding: 0 16px;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 0 12px;
    }

    .skills-list {
        gap: 16px;
    }

    .skill-item {
        gap: 16px;
    }

    .portfolio-desktop {
        display: none;
    }

    .portfolio-mobile {
        display: block;
    }

    .portfolio-mobile-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mobile-project-tile {
        border: 2px solid var(--white);
        color: var(--white);
        padding: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
        aspect-ratio: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .mobile-project-tile:hover {
        background: var(--white);
        color: var(--black);
    }

    .mobile-project-detail {
        background: var(--white);
        color: var(--black);
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.5s ease-in-out;
    }

    .mobile-project-detail.active {
        max-height: 1000px;
    }

    .mobile-project-detail-content {
        padding: 16px;
    }

    .mobile-project-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 0 12px;
    }

    .contact-list {
        gap: 16px;
    }

    .contact-item {
        gap: 16px;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .section {
        padding-top: 80px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-container,
    .contact-container {
        padding: 0 12px;
    }
}

/* Scrollbar Hide */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

/* Navigation Responsive */
@media (min-width: 768px) {
    .nav-name {
        display: block;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .nav-button {
        font-size: 1rem;
    }
    
    .nav {
        gap: 32px;
    }
    
    .nav-line {
        height: 48px;
        margin-left: 32px;
    }
}