/* CSS Custom Properties */
:root {
    --global-padding: 20px;
    --section-padding: 40px;
    --container-padding: 120px;
    --mobile-padding: 30px;
    --mobile-container-padding: 40px;
    
    /* Font Sizes */
    --font-size-xs: 0.9rem;
    --font-size-sm: 1.1rem;
    --font-size-base: 1.3rem;
    --font-size-lg: 1.6rem;
    --font-size-xl: 2.2rem;
    --font-size-2xl: 2.8rem;
    --font-size-3xl: 3.5rem;
}

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

body {
    font-family: 'Poor Story', cursive;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: #363732;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    background: #f8f9fa;
}

.creative-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Creative Section */
#creative-section {
    margin-top: 80px;
    padding: var(--section-padding) 0;
    background: #f8f9fa;
}

.creative-description {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 100px 0px 100px;
}

.creative-featured-projects {
    text-align: center;
}

.creative-featured-projects .section-title {
    text-align: center;
}

.creative-projects-description {
    text-align: center;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.creative-projects-description p {
    font-size: var(--font-size-base);
    color: #363732;
    line-height: 1.6;
    margin: 0;
}

.toggle-visuals-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    color: #66C3FF;
    border: none;
    padding: 0;
    font-size: var(--font-size-base);
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poor Story', cursive;
    margin-left: 0px;
    vertical-align: baseline;
}

.toggle-visuals-btn:hover {
    color: #5AB3EF;
}

.toggle-visuals-btn:active {
    color: #4A9FD9;
}

.toggle-visuals-btn.visuals-off {
    color: #666;
}

.toggle-visuals-btn.visuals-off:hover {
    color: #888;
}

.toggle-icon {
    font-size: 0.8rem;
}

.visuals-toggle-container {
    display: inline;
    margin-top: 16px;
}

.visuals-toggle-text {
    font-size: var(--font-size-base);
    color: #363732;
    font-weight: 400;
    margin-right: 4px;
}

.hydra-canvas.hidden {
    display: none !important;
}

canvas.hidden {
    display: none !important;
}



/* Main Content */
.main {
    margin-top: 0;
    padding: 0 var(--global-padding);
    background: #f8f9fa;
}

/* Main Content Section */
.main-content {
    background: #f8f9fa;
    color: #363732;
    padding: 60px 0;
    position: relative;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Allow flex item to shrink */
}





.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--font-size-2xl);
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: -1px;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 20px;
    color: #363732;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
}

.hero-text {
    max-width: 700px;
    margin: 0 auto 20px auto;
    position: relative;
    z-index: 2;
}

.hero-text p {
    font-size: var(--font-size-base);
    margin-bottom: 20px;
    color: #363732;
    line-height: 1.7;
    font-weight: 400;
}

.hero-text p:first-child {
    color: #363732;
    font-size: var(--font-size-base);
    margin-bottom: 20px;
}

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





/* Sections */
.section {
    padding: var(--section-padding) var(--global-padding);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #363732;
    letter-spacing: 0.5px;
}

/* About Section */
.about-content {
    display: flex;
    justify-content: center;
    align-items: start;
}

.about-text {
    max-width: 800px;
    text-align: center;
}

.about-text p {
    font-size: var(--font-size-base);
    margin-bottom: 24px;
    color: #363732;
    line-height: 1.7;
    font-weight: 400;
}

.skills h3 {
    font-size: var(--font-size-xl);
    margin-bottom: 24px;
    color: #363732;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.skill-tag {
    background: #f8f8f8;
    color: #363732;
    padding: 10px 18px;
    border-radius: 0;
    font-size: var(--font-size-xs);
    font-weight: 400;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.skill-tag:hover {
    background: #363732;
    color: #ffffff;
    border-color: #363732;
}

/* Featured Repositories Section */
.featured-repositories-section {
    padding: var(--section-padding) 0;
    background: #f8f9fa;
}

.projects-description {
    text-align: center;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.projects-description p {
    font-size: var(--font-size-base);
    color: #363732;
    line-height: 1.6;
    margin: 0;
}



/* Projects Section */
.projects-grid {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}



.project-card {
    background: #f8f9fa;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.project-card:hover {
    transform: translateY(-2px);
    border-color: #66C3FF;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.project-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.project-image {
    height: 60px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #363732;
    font-size: 1.5rem;
    font-weight: 300;
}

#photon-mosaic-canvas-container {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

#derotation-canvas-container {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

/* p5.js canvas styling */
#photon-mosaic-canvas-container canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
}

#derotation-canvas-container canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
}

.project-content {
    padding: 12px var(--global-padding) var(--global-padding) var(--global-padding);
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(1px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: var(--font-size-base);
    margin-bottom: 8px;
    color: #363732;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.project-content p {
    color: #363732;
    margin-bottom: 12px;
    line-height: 1.7;
    font-size: var(--font-size-base);
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.tag {
    background: #DCE1E9;
    color: #66C3FF;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: var(--font-size-xs);
    font-weight: 500;
    letter-spacing: 0.3px;
}



/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: var(--font-size-base);
    color: #363732;
    margin-bottom: 48px;
    line-height: 1.7;
    font-weight: 400;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #66C3FF;
    font-weight: 400;
    padding: 16px var(--global-padding);
    background: #f8f8f8;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    font-size: var(--font-size-xs);
    letter-spacing: 0.3px;
}

.contact-link:hover {
    background: #66C3FF;
    color: #ffffff;
    border-color: #66C3FF;
    transform: translateX(4px);
}

/* SWC Link styling to match social media links */
.swc-link {
    color: #8B5CF6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.swc-link:hover {
    color: #7C3AED;
}

.contact-icon {
    font-size: var(--font-size-base);
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: var(--global-padding) var(--global-padding);
    text-align: center;
    color: #363732;
    font-size: var(--font-size-sm);
    letter-spacing: 0.3px;
    margin-top: auto;
    flex-shrink: 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

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

.footer-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(60%) sepia(100%) saturate(1000%) hue-rotate(200deg) brightness(1) contrast(1);
    transition: filter 0.3s ease;
}

.footer-link:hover .footer-icon {
    filter: brightness(0) saturate(100%) invert(60%) sepia(100%) saturate(1000%) hue-rotate(200deg) brightness(1) contrast(1);
}

/* Creative Mode Placeholder */
.creative-placeholder {
    text-align: center;
    padding: 60px var(--global-padding);
    max-width: 600px;
    margin: 0 auto;
}

.creative-placeholder h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #363732;
    margin-bottom: 20px;
}

.creative-placeholder p {
    font-size: var(--font-size-sm);
    color: #363732;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}





/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 40px 0;
    }
    
    .container {
        padding: 0 var(--mobile-container-padding);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .section-title {
        text-align: center;
    }
    
    .creative-content {
        padding: 20px 0;
    }
    
    .creative-description {
        margin-bottom: 40px;
    }
    
    .paintings-section,
    .posters-section,
    .creative-projects-section,
    .tree-animation-section {
        padding: 30px 0;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 30px 0;
    }
    
    .container {
        padding: 0 var(--mobile-padding);
    }
    
    .tree-animation-container {
        height: 300px;
    }
    
    .tree-animation-section {
        padding: 30px 0;
    }
    
    .tree-animation-description {
        padding: 0 10px;
    }
}

/* Creative Project Cards - Circular Design */
.creative-project-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.creative-project-image {
    width: 350px;
    height: 220px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #363732;
    border: 3px solid #f0f0f0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.hydra-canvas {
    width: 100%;
    height: 100%;
    border-radius: 9px;
}



.creative-project-card:active .creative-project-image {
    border-color: #66C3FF;
    box-shadow: 0 8px 25px rgba(102, 195, 255, 0.2);
    transform: scale(0.98);
}



/* Creative projects section */
.creative-projects-section {
    padding: var(--section-padding) 0;
    background: #f8f9fa;
}

.creative-projects-section .container {
    max-width: 1400px;
    text-align: center;
}

.creative-projects-section .section-title {
    text-align: center;
    margin-bottom: 40px;
}

/* Tree Animation Section */
.tree-animation-section {
    padding: var(--section-padding) 0;
    background: #f8f9fa;
    position: relative;
    min-height: 600px;
}

.tree-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.tree-background-container canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
}

.tree-animation-section .container {
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.tree-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.tree-animation-section .section-title {
    text-align: center;
    margin-bottom: 20px;
}

.tree-animation-description {
    text-align: center;
    margin-bottom: 40px;
}

.tree-animation-description p {
    font-size: var(--font-size-base);
    color: #363732;
    line-height: 1.6;
    margin: 0;
}

.tree-animation-container {
    width: 100%;
    height: 600px;
    background: transparent;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Creative projects grid layout */
#creative-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 15px;
    justify-items: center;
    margin-top: 30px;
}

@media (max-width: 1400px) {
    #creative-projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 1000px) {
    #creative-projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 700px) {
    #creative-projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 15px;
    }
    
    .creative-project-image {
        width: 300px;
        height: 190px;
        font-size: 2.5rem;
    }
    

    
    .tree-animation-container {
        height: 400px;
    }
    
    .tree-animation-section {
        padding: 40px 0;
    }
}

/* Copy message animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Paintings Gallery Styles */
.paintings-section {
    padding: var(--section-padding) 0;
    background: #f8f9fa;
}



.paintings-content {
    text-align: center;
}

.paintings-section .section-title {
    text-align: center;
}

.paintings-description {
    margin-bottom: 50px;
}

.paintings-description p {
    font-size: 1.1rem;
    color: #363732;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 600px;
}

.paintings-gallery {
    position: relative;
    min-height: 600px;
    background: transparent;
    padding: var(--section-padding);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}

.painting-frame {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

.painting-frame:hover {
    transform: scale(1.05) !important;
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.frame-border {
    background: #8B4513;
    padding: 8px;
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
}

.frame-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #D2691E, #CD853F);
    z-index: -1;
}

.painting-image {
    width: 160px;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.painting-frame:hover .painting-image {
    transform: scale(1.02);
}

/* Posters/Banners Gallery Styles */
.posters-section {
    padding: var(--section-padding) 0;
    background: #f8f9fa;
}



.posters-content {
    text-align: center;
}

.posters-section .section-title {
    text-align: center;
    margin-bottom: 20px;
}

.posters-description {
    margin-bottom: 50px;
}

.posters-description p {
    font-size: 1.1rem;
    color: #363732;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 600px;
}

.posters-gallery {
    position: relative;
    background: transparent;
    padding: var(--global-padding) var(--section-padding);
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

.poster-frame {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    scroll-snap-align: start;
    flex: 0 0 auto;
}

.poster-frame:hover {
    transform: scale(1.05) !important;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.poster-image {
    height: 300px;
    width: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.poster-frame:hover .poster-image {
    transform: none;
}

/* Removed poster info */
.poster-info { display: none; }
.poster-title { display: none; }
.poster-event { display: none; }

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #DA70D6;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Lightbox animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive design for featured repositories */
@media (max-width: 768px) {
    .featured-repositories-section {
        padding: 40px 0;
    }
    
    .projects-grid {
        flex-direction: column;
        gap: 15px;
    }
    
    .project-card {
        min-width: auto;
        max-width: none;
    }
}

/* Responsive design for paintings gallery */
@media (max-width: 768px) {
    .paintings-gallery {
        padding: var(--global-padding);
        min-height: 400px;
        gap: 15px;
    }
    
    .painting-image {
        width: 120px;
        height: 120px;
    }
    
    .paintings-section {
        padding: 40px 0;
    }
    
    .painting-frame {
        margin: 5px;
    }
    
    .posters-gallery {
        padding: var(--global-padding);
        min-height: 300px;
        gap: 20px;
    }
    
    .poster-image {
        width: 45vw;
        height: auto;
        max-height: 280px;
        object-fit: contain;
    }
    
    .posters-section {
        padding: 60px 0;
    }
    
    .poster-frame {
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .painting-image {
        width: 100px;
        height: 100px;
    }
    
    .paintings-gallery {
        padding: 15px;
        min-height: 300px;
        gap: 10px;
    }
    
    .painting-frame {
        margin: 3px;
    }
    
    .poster-image {
        width: 80vw;
        height: auto;
        max-height: 240px;
        object-fit: contain;
    }
    
    .posters-gallery {
        padding: 15px;
        min-height: 250px;
        gap: 15px;
    }
    
    .poster-frame {
        margin: 8px;
    }
    
    .posters-section {
        padding: 40px 0;
    }
}

@media (max-width: 768px) {
    .posters-gallery {
        padding: 10px var(--global-padding);
        gap: 16px;
    }
    
    .poster-image {
        height: 240px;
        width: auto;
        max-height: 240px;
        object-fit: contain;
    }
}