/* Hero section */
body, html {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

.portfolio-hero {
    padding: 4rem 2rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    position: relative;
    overflow: hidden;
    margin-top: -8rem;
    margin-bottom: -5rem;
}

.hero-content {
    z-index: 2;
    position: relative;
    max-width: 500px;
}

.main-title {
    font-size: 5rem;
    line-height: 1;
    margin: 0;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.5rem;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    margin-top: 1rem;
    letter-spacing: 3px;
}

.code-animation-container {
    position: relative;
    width: 350px;
    height: 305px;
    margin-right: 8rem;
    transform-style: preserve-3d;
    perspective: 1000px;
    margin-bottom: -2rem;
}

.code-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 30, 0.8);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-display {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #ac68ff;
    margin: 0;
    white-space: pre-wrap;
    height: 100%;
    overflow: hidden;
    text-align: left;
}

/* Ensure console text and elements are well-positioned */
.code-display pre {
    font-family: 'Courier New', monospace;
    line-height: 1;
    margin: 0;
    padding: 0;
    white-space: pre;
    color: #ac68ff;
}

.code-display div {
    text-align: center;
}

/* Skills section */
.portfolio-intro {
    padding: 2rem 2rem 4rem;
    margin-top: 0;
}

.section-header {
    text-align: left;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #fff;
    display: inline-block;
    white-space: nowrap;
    padding: 12px 30px;
    background-color: #0a0a0a;
    border: 1px solid white;
    border-radius: 8px;
    width: fit-content;
    position: relative;
}

.section-separator-right {
    height: 4px;
    background: linear-gradient(to right,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.8) 30%,
        rgba(255, 255, 255, 0.5) 70%,
        transparent 100%
    );
    flex-grow: 1;
}

.section-separator-left {
    height: 4px;
    background: linear-gradient(to left,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.8) 30%,
        rgba(255, 255, 255, 0.5) 70%,
        transparent 100%
    );
    width: 80%;
    margin: 0.5rem 0 0 auto;
}

.skills-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    width: 300px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.category-title {
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.skill-list {
    list-style: none;
    padding: 0;
}

.skill-list li {
    padding: 0.5rem 0;
    color: #fff;
    text-align: center;
    transition: color 0.3s ease;
}

.skill-list li:hover {
    color: #ac68ff;
}

/* Projects section */
.projects-section {
    padding: 4rem 2rem;
    background-color: transparent;
}

.project-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    max-width: 1200px;
    margin: 2rem auto 0;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.project-item:nth-child(even) {
    flex-direction: row-reverse;
}

.project-item .window {
    width: 400px;
    flex-shrink: 0;
}

.project-details {
    flex: 1;
}

/* Project title and tech */
.project-title {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
}

.project-tech {
    color: #e6e6e6;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    display: block;
    text-align: center;
    width: 100%;
}

/* Right align text for even-numbered projects (2 and 4) */
.project-item:nth-child(even) .project-description {
    text-align: center;
}

/* Left align text for odd-numbered projects (1 and 3) */
.project-item:nth-child(odd) .project-description {
    text-align: center;
}

/* Right align project links for even-numbered projects */
.project-item:nth-child(even) .project-links {
    justify-content: center;
}

/* Left align project links for odd-numbered projects */
.project-item:nth-child(odd) .project-links {
    justify-content: center;
}

.project-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(136, 0, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border: 1px solid #a600ff;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.project-link:hover {
    background: linear-gradient(45deg, #9e33e6, #505ed7);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(160, 74, 226, 0.3);
}

/* Updated CSS for window controls */
.window {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.window:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.window-header {
    background: rgba(40, 40, 50, 0.95);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 0 0;
}

.window-controls {
    display: flex;
    gap: 8px;
    margin-right: 12px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.red {
    background: #ff5f56;
}

.control.yellow {
    background: #ffbd2e;
}

.control.green {
    background: #27c93f;
}

.window-title {
    flex: 1;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-family: monospace;
    text-align: center;
    margin-right: 60px;
}

.window-smalltitle {
    position: relative;
    top: 10px;
}

.window-content {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.window:hover .window-content img {
    transform: scale(1.05);
}

.window-footer {
    background: rgba(40, 40, 50, 0.95);
    padding: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 12px 12px;
}

/* Resume section */
.resume-section {
    padding: 4rem 2rem;
    margin-top: -1rem;
    margin-bottom: -1rem;
}

.resume-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 3rem;
}

.resume-content {
    flex: 1;
}

.resume-content h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 1.5rem;
}

.resume-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.resume-download {
    width: 400px;
    flex-shrink: 0;
}

.resume-window {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.9));
    height: 250px;
}

.resume-preview {
    text-align: center;
}

.resume-preview h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.resume-preview p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.download-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: rgba(136, 0, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    border: 2px solid #a600ff;
}

.download-button:hover {
    background: linear-gradient(45deg, #9e33e6, #505ed7);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(160, 74, 226, 0.3);
}

/* Contact CTA section */
.contact-cta {
    padding: 4rem 0;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(45deg, rgba(24, 24, 24, 0.9), rgba(11, 11, 11, 0.9));
    border-radius: 12px;
    margin: 3rem auto;
    max-width: 1200px;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cta-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    font-size: 1.2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    padding: 0.8rem 1.5rem;
    background-color: rgba(136, 0, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border: 2px solid #a600ff;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.cta-button:hover {
    transform: translateY(-3px);
    background: linear-gradient(45deg, #9e33e6, #505ed7);
    box-shadow: 0 5px 15px rgba(160, 74, 226, 0.3);
}


/* AOS animation defaults */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

@media (min-width: 1440px) {
    .hero-content {
        margin-left: 100px !important;
    }

    .main-title {
        font-size: 8rem;
    }

    .subtitle {
        font-size: 1.7rem;
    }

    .code-animation-container {
        height: 500px;
        width: 500px;
    }
    
    .code-display pre {
        font-size: 0.9rem !important;
    }

    .code-display pre {
        transform: translateX(-2%) !important;
    }
}

@media screen and (min-width: 1920px) and (max-width: 1921px) {
    .portfolio-hero {
        padding: 0 6rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 80vh;
        position: relative;
        overflow: hidden;
        margin-top: -8rem;
        margin-bottom: -7rem;
    }

    .main-title {
        font-size: 6rem;
        white-space: nowrap;
        line-height: 1;
        margin: 0;
        font-weight: 900;
        color: #ffffff;
        letter-spacing: 2px;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .subtitle {
        font-size: 2rem;
        color: #ffffff;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        margin-top: 1rem;
        letter-spacing: 3px;
    }

    .code-animation-container {
        position: relative;
        width: 600px;
        height: 500px;
        margin-right: 8rem;
        transform-style: preserve-3d;
        perspective: 1000px;
        margin-bottom: -2rem;
    }

    .code-wrapper {
        overflow: visible !important;
    }

    .code-display {
        font-family: 'Courier New', monospace;
        font-size: 1.5rem;
        line-height: 1.4;
        color: #ac68ff;
        margin: 0;
        white-space: pre-wrap;
        height: 100%;
        overflow: hidden;
        text-align: left;
    }

    .code-display pre {
        font-family: 'Courier New', monospace;
        font-size: 0.9rem !important;
        line-height: 1;
        padding-bottom: 50px;
        white-space: pre;
        color: #ac68ff;
    }

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

    .skills-grid {
        transform: scale(125%);
    }

    .category-title {
        font-size: 2rem !important;
    }

    .skill-list li {
        font-size: 1.2rem;
    }

    .resume-container {
        transform: scale(125%);
    }
    
    .resume-content h3 {
        font-size: 2.5rem;
    }

    .resume-content p {
        font-size: 1.5rem;
    }

    .project-grid {
        margin-top: 275px;
        transform: scale(125%);
    }

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

    .project-tech {
        font-size: 1.5rem;
    }

    .project-description {
        font-size: 1.2rem;
    }

    .project-link {
        font-weight: 300;
        font-size: 1.5rem;
    }

    .contact-cta {
        margin-top: 350px;
        margin-bottom: 75px;
    }

    .cta-content p {
        font-size: 1.5rem;
    }

    .cta-button {
        font-size: 1.5rem;
        font-weight: 300;
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        flex-direction: column;
        text-align: center;
        padding: 8rem 1rem 2rem;
        margin-top: -100px;
        min-height: 30vh;
    }
    
    .main-title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    /* Code animation container */
    .code-animation-container {
        width: 100%;
        max-width: 320px;
        height: 305px;
        margin: 3rem auto 1rem;
    }
    
    .code-wrapper {
        margin-top: -25px;
        max-height: 85%;
        max-width: 88%;
        padding: 12px;
    }
    
    .code-display {
        font-size: 0.8rem;
    }
    
    /* Fix for ASCII art */
    .code-display pre {
        font-size: 0.35rem !important;
        transform: scale(0.95);
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 280px;
        display: inline-block !important;
        text-align: center !important;
    }
    
    .code-display div {
        text-align: center !important;
        width: 100% !important;
    }

    .resume-section {
       margin-top: -3rem;
    }
    
    /* Project items */
    .projects-section {
        margin-top: -3rem;
    }

    .project-item, .project-item:nth-child(even) {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    
    .project-item .window {
        width: 95%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .window-content {
        height: auto;
        min-height: 180px;
    }
    
    /* Section headers */
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
        max-width: 90%;
        white-space: wrap;
        text-align: center;
    }
    
    /* Text alignment */
    .project-description {
        text-align: center !important;
        padding: 0 10px;
    }
    
    .project-links {
        justify-content: center !important;
    }
    
    /* Resume section */
    .resume-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .resume-download {
        width: 95%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .resume-window {
        height: auto;
        min-height: 200px;
    }
    
    /* Skills grid */
    .skills-grid {
        gap: 1.5rem;
    }
    
    .skill-category {
        width: 100%;
        max-width: 300px;
    }

    .contact-cta {
        padding: 3rem 1rem;
        margin: 2rem 1rem;
        max-width: calc(100% - 2rem);
        border-radius: 8px;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .cta-content p {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }
    
    .cta-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.8rem;
    }
    
    .skills-grid {
        gap: 1rem;
    }
    
    .skill-category {
        width: 100%;
    }
    
    .code-animation-container {
        height: 300px;
        max-width: 300px;
    }
    
    .code-display {
        font-size: 0.7rem;
    }
    
    .code-display pre {
        font-size: 0.35rem !important;
    }
    
    .window-content {
        height: 180px;
    }
}