/* General Styles */
:root {
    --primary-green: #00FF00; /* New accent color for binary */
    --dark-grey: #333333; /* Dark background */
    --medium-grey: #555555; /* Secondary dark */
    --light-grey: #e0e0e0; /* For text and lighter backgrounds */
    --white: #ffffff;
    --black: #000000;
    --primary-blue: #0000FF; /* Re-introducing a blue color */
    --cta-green: #00CC00; /* Brighter green for CTA buttons */
    --text-dark: #1a1a1a; /* Darker text for better contrast */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif; /* Changed font */
    line-height: 1.6;
    color: var(--light-grey);
    background-color: var(--dark-grey);
    padding-top: 70px; /* offset for fixed header */
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

/* Header and Navigation */
.header {
    background-color: var(--black);
    color: var(--white);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.25s ease, border-color 0.25s ease;
    border-bottom: 2px solid transparent;
    padding-bottom: 4px;
}

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

.nav-links a.active {
    color: var(--primary-green);
    border-color: var(--primary-green);
}

/* CTA Button Styles */
.cta-button {
    background-color: var(--cta-green) !important;
    color: var(--white) !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    border: 2px solid var(--cta-green) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
}

.cta-button:hover {
    background-color: var(--white) !important;
    color: var(--cta-green) !important;
    border-color: var(--cta-green) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 204, 0, 0.3);
}

.cta-button:focus {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

/* Hero CTA Button */
.hero-cta-button {
    display: inline-block;
    background-color: var(--cta-green);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 30px;
    border: 2px solid var(--cta-green);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 204, 0, 0.2);
}

.hero-cta-button:hover {
    background-color: var(--white);
    color: var(--cta-green);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 204, 0, 0.4);
}

.hero-cta-button:focus {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

/* Hero Section */
.hero-section {
    background-color: var(--dark-grey);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 0;
    position: relative;
    overflow: hidden;
    height: 100vh; /* Make it full height */
}

.hero-background-binary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/landing.png'); /* Use the new landing image as background */
    background-size: cover;
    background-position: center;
    opacity: 0.2; /* Adjust opacity as needed */
    z-index: 0;
}

.hero-content {
    text-align: left;
    z-index: 1;
    padding-left: 10%;
    flex: 1;
}

.hero-greeting {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.hero-name {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--light-grey);
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-title-container {
    margin-bottom: 30px;
    min-height: 60px;
}

.hero-title {
    font-size: 1.4rem;
    color: var(--primary-green);
    font-weight: 600;
    line-height: 1.4;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

/* Decrypt Animation */
.hero-title.decrypting {
    animation: none;
}

.hero-title.decrypting span {
    display: inline-block;
    animation: decryptChar 0.1s ease forwards;
}

@keyframes decryptChar {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    50% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.hero-image-container {
    z-index: 1;
    padding-right: 10%;
}

.hero-image-container img {
    width: 350px; /* Adjust size as needed */
    height: 350px; /* Adjust size as needed */
    object-fit: cover;
    border-radius: 50%; /* Make it circular */
    border: 5px solid var(--primary-green); /* Green border */
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
}

.social-links a {
    display: inline-block;
    width: 40px; /* Larger icons */
    height: 40px;
    background-color: var(--light-grey);
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

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

.social-links img {
    width: 25px;
    height: 25px;
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease 1.2s forwards;
}

.hero-cta-button {
    display: inline-block;
    background-color: var(--cta-green);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid var(--cta-green);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 204, 0, 0.2);
}

.hero-cta-button:hover {
    background-color: var(--white);
    color: var(--cta-green);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 204, 0, 0.4);
}

.hero-cta-button.secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.hero-cta-button.secondary:hover {
    background-color: var(--white);
    color: var(--dark-grey);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.hero-cta-button:focus {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

/* Responsive adjustments for hero */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column-reverse;
        height: auto;
        padding: 30px 0;
    }

    .hero-content {
        padding: 20px;
        text-align: center;
    }

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

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

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta-button {
        width: 200px;
        text-align: center;
    }
}

/* About Section */
.about-section {
    padding: 50px 0;
    text-align: center;
    background-color: var(--light-grey);
    color: var(--text-dark);
}

.terminal-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 30px;
    font-family: 'Courier New', monospace;
    background-color: var(--black);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    min-width: 400px;
    transition: all 0.1s ease;
    overflow: hidden;
}

.terminal-prompt {
    color: var(--cta-green);
    font-weight: bold;
    font-size: 1.2rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.terminal-title {
    font-size: 1.8rem;
    margin: 0;
    color: var(--light-grey);
    font-weight: 400;
    font-family: 'Courier New', monospace;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    text-align: left;
    flex-grow: 1;
    white-space: nowrap;
    overflow: visible;
    min-width: 0;
    word-break: keep-all;
}

/* About section decrypt animation */
.terminal-title.decrypting {
    animation: none;
}

.terminal-title.decrypting span {
    display: inline-block;
    animation: decryptChar 0.1s ease forwards;
}

.about-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--medium-grey);
}

.btn-explore {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 50px;
    transition: background-color 0.3s ease;
}

.btn-explore:hover {
    background-color: #00cc00;
}

.services-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 50px;
}

.service-item {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    padding: 20px;
    border: 1px solid var(--medium-grey);
    text-align: center;
    background-color: var(--white);
    color: var(--dark-grey);
}

.service-item h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-green);
}

.service-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
    color: var(--medium-grey);
}

/* Skills Section */
.skills-section {
    padding: 50px 0;
    text-align: center;
    background-color: var(--dark-grey);
}

.skills-section h3,
.skills-section h4 {
    color: var(--light-grey);
    margin-bottom: 20px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100px;
}

.skill-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.skill-item span {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--light-grey);
}

.languages-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.language-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 120px;
}

.language-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.language-item span {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--light-grey);
}

/* Portfolio Section */
.portfolio-section {
    background-image: url('../img/Portfolio.png');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 100px 0;
    position: relative;
    background-color: var(--dark-grey); /* Fallback */
}

.portfolio-section .container {
    z-index: 1;
    position: relative;
}

.portfolio-section h3 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    display: inline-block; /* To allow background and padding */
    padding: 10px 30px; /* Adjust padding as needed */
    border: 2px solid var(--light-grey); /* Border from the image */
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
    color: var(--white); /* Text color */
}

.portfolio-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 30px;
}

.portfolio-nav-item {
    color: var(--light-grey);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 5px 10px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.portfolio-nav-item.active,
.portfolio-nav-item:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.portfolio-item {
    margin-top: 30px;
    display: flex;
    justify-content: center; /* Center the image */
}

.portfolio-item img {
    max-width: 800px; /* Adjust max-width to match resume.png scale */
    width: 90%; /* Responsive width */
    height: auto;
    border: 5px solid var(--light-grey);
    margin-bottom: 20px;
}

.btn-portfolio {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.btn-portfolio:hover {
    background-color: #00cc00;
}

/* Contact Section Improvements */
.contact-section {
    background-color: var(--light-grey); /* Changed background */
    color: var(--text-dark);
    padding: 50px 0;
    text-align: center;
}

.contact-section h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 700;
    text-align: center;
}

.contact-intro {
    font-size: 1.2rem;
    color: var(--medium-grey);
    text-align: center;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.contact-buttons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    max-width: 600px;
    margin: auto;
}

.contact-item-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border: 2px solid var(--medium-grey);
    border-radius: 8px;
    padding: 15px 20px;
    width: 100%;
    max-width: 450px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-item-wrapper:hover {
    background-color: var(--white);
    border-color: var(--cta-green);
    box-shadow: 0 4px 16px rgba(0, 204, 0, 0.2);
    transform: translateY(-2px);
}

.contact-item-wrapper:hover .contact-text {
    color: var(--cta-green);
}

/* Contact icons sizing and visibility */
.contact-icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-right: 20px;
    text-decoration: none;
    background-color: var(--dark-grey);
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.contact-icon-button:hover {
    background-color: var(--primary-blue);
    transform: translateY(-2px);
}

.contact-icon-button:focus {
    outline: 3px solid var(--cta-green);
    outline-offset: 2px;
}

.contact-icon-button img {
    width: 28px;
    height: 28px;
    filter: invert(100%);
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    flex-grow: 1;
    text-align: left;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Ensure consistent vertical spacing */
.contact-item-wrapper { padding: 18px 20px; }

/* Footer Improvements */
.footer {
    background-color: var(--black);
    color: var(--white);
    padding: 30px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: auto;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-cta-button {
    background-color: var(--cta-green);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid var(--cta-green);
    transition: all 0.3s ease;
}

.footer-cta-button:hover {
    background-color: var(--white);
    color: var(--cta-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 204, 0, 0.3);
}

.footer-cta-button:focus {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

.social-links-footer a img {
    width: 25px;
    height: 25px;
    margin-left: 15px;
    filter: invert(100%);
    transition: transform 0.3s ease;
}

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

/* Make anchored sections account for fixed header */
section { 
    scroll-margin-top: 80px; 
}

/* Section separation styles */
.about-section,
.skills-section,
.portfolio-section,
.contact-section {
    min-height: 60vh;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.about-section { background-color: var(--light-grey); color: var(--text-dark); }
.skills-section { background-color: var(--dark-grey); color: var(--light-grey); }
.portfolio-section { /* background image already set below; keep separator visible */ }
.contact-section { background-color: var(--light-grey); color: var(--text-dark); }

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }

    .nav-links {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links li {
        margin: 0 10px;
    }

    .hero-section {
        flex-direction: column-reverse;
        height: auto;
        padding: 30px 0;
    }

    .hero-content {
        padding: 20px;
        text-align: center;
    }

    .hero-image-container {
        padding: 20px;
    }

    .hero-image-container img {
        width: 200px;
        height: 200px;
    }

    .social-links {
        justify-content: center;
    }

    .services-grid {
        flex-direction: column;
        align-items: center;
    }

    .service-item {
        max-width: 90%;
    }

    .skills-grid, .languages-grid {
        gap: 20px;
    }

    .skill-item, .language-item {
        width: 80px;
    }

    .skill-item img, .language-item img {
        width: 40px;
        height: 40px;
    }

    .portfolio-section {
        padding: 50px 0;
    }

    .portfolio-nav {
        flex-direction: column;
        gap: 15px;
    }

    .contact-form {
        width: 90%;
    }

    .contact-buttons-container {
        width: 90%;
    }

    .contact-item-wrapper {
        flex-direction: row;
        text-align: left;
        padding: 12px 15px;
    }

    .contact-text {
        font-size: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .social-links-footer {
        margin-top: 10px;
    }

    .social-links-footer a {
        margin: 0 5px;
    }

    body { padding-top: 100px; }
}

.language-selector {
    margin-top: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.lang-button {
    background-color: var(--white);
    color: var(--black);
    padding: 10px 20px;
    border: 1px solid var(--black);
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.lang-button:hover,
.lang-button.active {
    background-color: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
} 

/* Computer hero inside About */
.computer-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.computer-container {
    position: relative;
    width: min(900px, 90vw);
    transform-origin: center center;
    transition: transform 0.3s ease;
}

.computer-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.25);
}

.charging-screen {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 2px;
    opacity: 0;
    visibility: hidden;
}

/* Make autoAlpha work visually */
.charging-screen[style*="opacity: 1"] {
    visibility: visible;
}

/* Terminal overlay */
.terminal {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 12%;
    height: 30%;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    overflow: hidden;
}

.terminal.visible {
    opacity: 1;
    transform: translateY(0);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    background: #1e1e1e;
    border-bottom: 1px solid #333;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.terminal-title { color: #bfbfbf; font-family: 'Courier New', monospace; font-size: 0.9rem; margin-left: auto; }

.terminal-body {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    color: #bfbfbf;
    font-family: 'Courier New', monospace;
    height: calc(100% - 34px);
}

.terminal-prompt { color: #00ff88; }
.terminal-text { color: #00ff88; white-space: pre; }
.terminal-caret { width: 10px; height: 18px; background: #00ff88; display: inline-block; }
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } } 

/* Landing animation wrapper on hero */
.landing-animation {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* prevent blocking hero links */
    z-index: 2; /* above hero content */
    background: transparent;
}

/* Ensure hero content can be hidden cleanly during animation */
.hero-content { position: relative; z-index: 1; }

.landing-animation .computer-container { pointer-events: none; }
.landing-animation .terminal { pointer-events: none; } 