@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Press+Start+2P&display=swap');

/* Add new styles for the redesigned header */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 70px 100px 70px;
    transform: scale(1.4);
}

.header-left {
    text-align: left;
    flex: 1;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    padding-left: 2rem;
}

.portfolio-title {
    font-family: "Press Start 2P", system-ui;
    color: #f0f0f0;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 8px rgba(0, 0, 19, 0.3);
    letter-spacing: 1px;
    margin-left: 2rem;
}

.skills-container {
    display: flex;
    align-items: center;
    font-family: "Press Start 2P", system-ui;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-left: 2rem;
}

.skills-prefix {
    color: #f0f0f0;
    margin-right: 10px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 19, 0.1);
}

.typewriter-container {
    display: flex;
    align-items: center;
    height: 40px;
    overflow: hidden;
    color: var(--text-ghost);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.typewriter-prefix {
    color: #f0f0f0;
    margin-right: 6px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 19, 0.1);
}

.description {
    font-family: "Courier Prime", system-ui;
    color: #f0f0f0;
    font-size: 1.3rem;
    line-height: 1.5;
    margin-top: 1rem;
    text-shadow: 0 0 5px rgba(0, 0, 19, 0.1);
}

.typewriter-text {
    font-family: 'Courier New', Courier, monospace;
    white-space: nowrap;
    color: #f0f0f0;
    text-shadow: 0 0 5px rgba(0, 0, 19, 0.1);
    min-height: 1.2em;
    display: inline-block;
    font-size: 0.9rem;
}

.typewriter-cursor {
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    color: #f0f0f0;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(0, 0, 19, 0.1);
}

.site-header {
    grid-column: 1 / -1;
    background-color: var(--void-primary);
    padding: 2rem 1rem 4rem 1rem;
    border-bottom: 1px solid var(--border-shade);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.site-header .typewriter-container {
    height: auto;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.polaroid {
    background: #fff;
    padding: 1rem 1rem 2rem 1rem;
    margin: 1rem auto;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transform: rotate(3deg);
    transition: all 0.3s ease;
    display: inline-block;
    width: auto;
    max-width: 300px; /* Set a maximum width */
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.polaroid-image {
    width: 180px;
    height: 180px; /* Fixed height */
    background-color: #333;
    background-image: url("../img/bocchi-the-rock-bocchi.gif");
    background-size: contain; /* Ensures the whole GIF is visible */
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 0.5rem;
}

.polaroid-caption {
    text-align: center;
    font-family: 'Courier New', monospace;
    color: #333;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.polaroid-caption span {
  display: block;
  text-align: center;
}

.site-header .typewriter-text,
.site-header .typewriter-prefix,
.site-header .typewriter-cursor {
    font-size: 1.5rem;
    text-shadow: 0 0 8px rgba(0, 0, 19, 0.1);
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.projects-divider {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 7rem;
    margin-bottom: 3rem;
    height: 0;
    border: none;
}

.hidden-section {
  opacity: 1;
  transform: translateY(0);
}

.show-section {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
    .site-header .typewriter-container {
        font-size: 1.2rem;
    }

    .site-header .typewriter-text,
    .site-header .typewriter-prefix,
    .site-header .typewriter-cursor {
        font-size: 1rem;
    }

    .header-content {
        flex-direction: column;
    }

    .header-left, .header-right {
        width: 100%;
        text-align: center;
        padding: 0;
    }

    .header-right {
        margin-top: 2rem;
        justify-content: center;
    }

    .portfolio-title {
        font-size: 1.2rem;
    }

    .skills-container {
        justify-content: center;
        font-size: 0.8rem;
    }

    .polaroid {
        max-width: 180px;
    }

    .polaroid-image {
        height: 160px;
    }
}

/* Projects Section Styles */
.projects-section {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 2rem 0;
}

.project-card {
    padding: 5rem 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: "Courier Prime", system-ui;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    opacity: 1;
    transform: translateY(0);
    border: 2px solid #fffdfd;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10rem;
    align-items: start;
}

/* Only apply initial hidden state when JS is enabled */
.js-enabled .project-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2.0s ease-out, transform 2.0s ease-out;
}

.js-enabled .project-card.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.card-content-left {
    display: flex;
    flex-direction: column;
}

.card-content-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    text-align: right;
}

.card-status::before {
    content: "● ";
    color: #00ff00;
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.card-title {
    font-family: "Press Start 2P", system-ui;
    color: #f0f0f0;
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    text-shadow: 0 0 5px rgba(0, 0, 19, 0.1);
}

.card-description {
    color: var(--text-ghost);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tech-tag {
    font-family: "Press Start 2P", system-ui;
    font-size: 0.5rem;
    color: var(--text-whisper);
    background: rgba(66, 66, 66, 0.3);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--accent-dream);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    color: #f0f0f0;
    border-color: rgba(0, 255, 204, 0.5);
    background: rgba(0, 255, 204, 0.1);
}

.card-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.card-link {
    font-family: "Press Start 2P", system-ui;
    font-size: 0.6rem;
    color: var(--text-ghost);
    text-decoration: none;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-shade);
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link:hover {
    color: #f0f0f0;
    border-color: rgba(0, 255, 204, 0.5);
    background: rgba(0, 255, 204, 0.1);
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.3);
}

.card-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.card-link.disabled:hover {
    color: var(--text-ghost);
    border-color: var(--border-shade);
    background: transparent;
    text-shadow: none;
}

.card-link span {
    color: rgba(0, 255, 204, 0.7);
}

@media (max-width: 768px) {
    .projects-divider {
        padding: 1rem;
    } 

    .projects-section {
        padding: 1rem;
    }

    .project-card {
        padding: 1rem;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card-content-right {
        align-items: flex-start;
        text-align: left;
    }

    .card-links {
        justify-content: flex-start;
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .projects-title {
        font-size: 1rem;
    }
    
    .card-link {
        justify-content: center;
    }
}