/* Main Styles for Old-School Portfolio */
html, body {
    font-family: "Courier New", Courier, monospace;
    background-color: #000080;
    color: #ffffff;
    margin: 0;
    padding: 0;
    text-align: center;
    cursor: default;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    min-height: 100vh; /* Use full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 30px auto; /* Equal margin top and bottom */
    background-color: #000055;
    border: 2px solid #ffff00;
    padding: 20px;
    box-shadow: 10px 10px 0 #000033;
    box-sizing: border-box; /* Include padding and border in element's width */
}

header {
    margin-bottom: 30px;
}

h1 {
    color: #00ff00;
    text-shadow: 2px 2px #000000;
    font-size: 32px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    word-wrap: break-word;
    text-align: center;
    max-width: 100%; /* Ensure text doesn't overflow container */
}

.blinking {
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 0; }
    49% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 1; }
}

.avatar {
    width: 150px;
    height: 150px;
    background-color: #cccccc;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ff00ff;
}

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

.description {
    margin: 20px 0;
    font-size: 18px;
    line-height: 1.5;
    max-width: 100%; /* Ensure text doesn't overflow container */
}

.skills {
    background-color: #000066;
    padding: 15px;
    border: 1px dashed #ffffff;
    margin: 30px 0;
    box-sizing: border-box; /* Include padding and border in element's width */
    width: 100%;
}

.skills h2 {
    color: #ff00ff;
    margin-top: 0;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box; /* Include padding and border in element's width */
}

.skill {
    background-color: #000033;
    color: #00ffff;
    padding: 5px 10px;
    border: 1px solid #00ffff;
    margin-bottom: 5px;
    box-sizing: border-box; /* Include padding and border in element's width */
}

.projects {
    margin: 30px 0;
    width: 100%;
    box-sizing: border-box; /* Include padding and border in element's width */
}

.projects h2 {
    color: #ff00ff;
}

.project-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    box-sizing: border-box; /* Include padding and border in element's width */
}

.project-card {
    width: 100%;
    max-width: 230px;
    background-color: #000044;
    border: 2px solid #ffff00;
    padding: 15px;
    text-align: left;
    margin-bottom: 10px;
    box-sizing: border-box; /* Include padding and border in element's width */
}

.project-card h3 {
    color: #00ff00;
    margin-top: 0;
    word-wrap: break-word;
}

.project-links {
    margin-top: 15px;
    font-size: 14px;
}

.project-links a {
    color: #ff9900;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.project-links a:hover {
    text-decoration: underline;
    color: #ffcc00;
}

.marquee {
    background-color: #ff0000;
    color: #ffffff;
    padding: 5px 0;
    margin: 30px 0;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box; /* Include padding and border in element's width */
}

.marquee-content {
    display: inline-block;
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.visitor-counter {
    margin-top: 20px;
    font-family: "Digital", monospace;
    background-color: #000000;
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #00ff00;
    color: #00ff00;
    box-sizing: border-box; /* Include padding and border in element's width */
}

.counter-label {
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
}

/* Common Footer */
footer {
    margin-top: 30px;
    padding: 15px;
    border-top: 1px solid #ffffff;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box; /* Include padding and border in element's width */
}

footer a {
    color: #ffff00;
    margin: 0 10px;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Content Pages Styles */
.content {
    line-height: 1.6;
    margin: 30px 0;
    text-align: left;
    width: 100%;
    box-sizing: border-box; /* Include padding and border in element's width */
}

h2 {
    color: #ff00ff;
    border-bottom: 1px dashed #ffffff;
    padding-bottom: 5px;
    word-wrap: break-word;
    max-width: 100%; /* Ensure text doesn't overflow container */
}

h3 {
    color: #00ffff;
    word-wrap: break-word;
    max-width: 100%; /* Ensure text doesn't overflow container */
}

a {
    color: #ffff00;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.back-button {
    display: inline-block;
    margin-top: 30px;
    background-color: #000033;
    padding: 10px 20px;
    border: 1px solid #00ffff;
    color: #00ffff;
    text-align: center;
    box-sizing: border-box; /* Include padding and border in element's width */
}

.back-button:hover {
    background-color: #000066;
    text-decoration: none;
}

.last-updated {
    text-align: right;
    font-size: 12px;
    margin-top: 30px;
    color: #bbbbbb;
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
        box-shadow: 5px 5px 0 #000033;
    }

    h1 {
        font-size: 24px;
    }

    .description {
        font-size: 16px;
    }

    .content {
        font-size: 14px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    html, body {
        width: 100%;
        overflow-x: hidden; /* Double-ensure no horizontal scrolling */
    }

    .container {
        width: 95%; /* Slightly reduced from 100% to prevent edge touching */
        border-width: 1px;
        box-shadow: 3px 3px 0 #000033;
        padding: 10px;
    }

    h1 {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .avatar {
        width: 120px;
        height: 120px;
    }

    .skill-list {
        gap: 5px;
    }

    .skill {
        font-size: 14px;
    }

    .project-card {
        max-width: 100%;
    }

    .marquee {
        width: 100%;
    }

    footer {
        font-size: 12px;
        padding: 10px 0;
    }

    footer a {
        margin: 0 5px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 15px;
    }

    .back-button {
        padding: 8px 15px;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .last-updated {
        text-align: center;
    }
}