@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@300;400;600;700&display=swap');

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: "Ubuntu", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #000;
    background: #F2F2F3; /* page background: light gray */
    overflow-x: hidden;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* === HEADER === */
.site-header {
    padding: 20px 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #E9E9DD; /* header background: warm off-white */
    overflow: visible;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.site-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2.4em;
    font-weight: bold;
    color: #111827; /* name: blue */
    margin: 0;
    line-height: 1.1;
    letter-spacing: 1px;
}

.site-name a {
    color: #111827;
    text-decoration: none;
}

.site-name a:hover {
    color: #374151; /* name hover: darker blue */
}

/* === NAVIGATION === */
.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 200;
    padding: 30px 20px 20px;
    margin: 0 -20px;
    background: linear-gradient(to bottom, #E9E9DD 50%, #F2F2F3 50%); /* half header color, half page bg */
    overflow: visible;
}

/* full-width horizontal rule behind nav links */
.nav-line {
    position: absolute;
    left: -9999px;
    right: -9999px;
    top: 50%;
    height: 1px;
    background: #000;
    z-index: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    background: #111827; /* nav bar: medium blue */
    position: relative;
    z-index: 2;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(2, 95, 182, 0.3), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    font-family: Arial, sans-serif;
    font-size: 0.85em;
    white-space: nowrap;
    background: #111827;
    transition: background 0.2s ease;
    text-transform: uppercase;
    border-right: 1px solid #374151; /* link divider: lighter blue */
    position: relative;
}

.nav-links a:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.nav-links a:last-child {
    border-right: none;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.nav-links a:hover,
.nav-links a.active {
    background: #1f2937 ; /* nav hover/active: dark blue */
}

/* downward triangle indicator */
.nav-links a:hover::after,
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #fff;
    z-index: 10;
}

/* === MOBILE NAV BUTTON === */
.nav-mobile-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    width: 40px;
    height: 40px;
    background: #111827;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 2;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(2, 95, 182, 0.3), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.nav-mobile-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
}

/* === MOBILE DROPDOWN MENU === */
.nav-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    flex-direction: column;
    min-width: 180px;
    z-index: 3;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(2, 95, 182, 0.3), 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
}

.nav-mobile-menu.open {
    display: flex;
}

.nav-mobile-menu a {
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    font-family: Arial, sans-serif;
    font-size: 0.85em;
    text-transform: uppercase;
    border-bottom: 1px solid #374151;
    position: relative;
}

.nav-mobile-menu a:first-child {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.nav-mobile-menu a:last-child {
    border-bottom: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
    background: #1f2937;
}

/* upward triangle indicator for mobile */
.nav-mobile-menu a:hover::after,
.nav-mobile-menu a.active::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 12px solid #fff;
    z-index: 10;
    filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.2));
}

/* === PAGE CONTAINER === */
.page-container {
    max-width: 900px;
    margin: 170px auto 0;
    padding: 0 20px 25px;
    flex: 1;
}

/* === MAIN CONTENT BOX === */
.main-content {
    background: #fff;
    border: #374151; /* content border: cool gray-blue */
    padding: 40px 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 1px 5px rgba(6, 185, 255, 0.1);
}

.content-section {
    margin-bottom: 40px;
}

.content-section:last-child {
    margin-bottom: 0;
}

/* === SECTION HEADINGS === */
.section-heading {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.5em;
    font-weight: bold;
    color: #111827; /* heading: teal-blue */
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #111827; /* heading underline: medium blue */
}

/* === ABOUT === */
.about-text {
    font-size: 1em;
    color: #000;
    line-height: 1.7;
    margin-bottom: 15px;
    text-align: justify;
}

.about-contact {
    font-size: 1em;
    color: #000;
}

.about-contact a {
    color: #111827;
    text-decoration: none;
}

.about-contact a:hover {
    text-decoration: underline;
}

/* === SOCIAL LINKS (icon row) === */
.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.links-list li {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.links-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #f5f5f5; /* icon bg: light gray */
    border-radius: 8px;
    border: 1px solid #e0e0e0; /* icon border: lighter gray */
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.links-list a:hover {
    transform: translateY(-2px);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.link-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* === PROJECT CARDS === */
.project-card {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #ddd; /* card divider: light gray */
}

.project-card:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.project-card h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.2em;
    font-weight: bold;
    color: #111827;
    margin-bottom: 8px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tech-tag {
    display: inline-block;
    background: #E8E8E8; /* tag bg: light gray */
    color: #333;
    font-size: 0.75em;
    font-family: "Courier New", Courier, monospace;
    padding: 3px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.project-card > p {
    font-size: 1em;
    color: #000;
    line-height: 1.6;
    margin-bottom: 10px;
}

.project-card > p:last-child {
    margin-bottom: 0;
}

.project-link {
    display: inline-block;
    background: #111827; /* project link button: green */
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background 0.2s ease;
}

.project-link:hover {
    background: #1f2937; /* project link hover: darker green */
    color: #fff;
}

/* === ACHIEVEMENTS === */
.achievement-item {
    margin-bottom: 20px;
}

.achievement-item:last-child {
    margin-bottom: 0;
}

.achievement-item h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    color: #111827;
    margin-bottom: 5px;
}

.achievement-item p {
    font-size: 1em;
    color: #000;
    line-height: 1.6;
}

/* === SKILLS === */
.skills-category {
    margin-bottom: 12px;
}

.skills-category:last-child {
    margin-bottom: 0;
}

.skills-category h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    color: #111827;
    margin-bottom: 2px;
}

.skills-text {
    font-size: 1em;
    color: #333;
    line-height: 1.5;
}

/* === ARTICLES === */
.coming-soon {
    font-size: 1em;
    color: #666;
    font-style: italic;
}

#articles-list ul {
    list-style: none;
}

#articles-list li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.file-icon {
    font-size: 1.2em;
    margin-right: 8px;
    flex-shrink: 0;
}

#articles-list a {
    color: #111827;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

#articles-list a:hover {
    color: #374151;
    text-decoration: underline;
}

/* === LAST MODIFIED === */
.last-modified {
    text-align: right;
    padding: 3px 0 0;
}

.last-modified p {
    font-size: 13px;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
}

/* === FOOTER === */
footer {
    padding: 20px 0;
    background: #111827; /* footer: dark blue */
    text-align: center;
    margin-top: auto;
}

footer p {
    color: #fff;
    font-size: 0.9em;
    font-family: Arial, Helvetica, sans-serif;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

footer a:hover {
    color: #ccc;
}

/* === TERMINAL === */
#terminal-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background: #000; /* terminal bg: black */
}

#terminal-wrapper {
    display: flex;
    gap: 30px;
    width: 90%;
    max-width: 1400px;
    height: 85%;
}

#terminal-commands {
    width: 260px;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #00ff00; /* terminal border: green */
    color: #00ff00; /* terminal text: green */
    font-family: monospace;
}

.cmd-title {
    font-size: 18px;
    margin-bottom: 12px;
    border-bottom: 1px solid #00ff00;
    padding-bottom: 6px;
}

#terminal-commands td {
    padding: 6px 4px;
}

#terminal-window {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #00ff00;
    font-family: monospace;
    color: #00ff00;
    background: #000;
}

#terminal-output {
    flex: 1;
    padding: 20px;
    font-size: 17px;
    line-height: 1.7;
    overflow-y: auto;
}

#terminal-input-bar {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid #00ff00;
    font-size: 18px;
}

#terminal-input {
    flex: 1;
    background: #000;
    color: #00ff00;
    border: none;
    outline: none;
    font-size: 17px;
    font-family: monospace;
}

/* === RESPONSIVE: TABLET (<=768px) === */
@media (max-width: 768px) {
    .site-header {
        padding: 15px 15px 0;
    }

    .site-name {
        font-size: 1.8em;
    }

    .nav-links {
        display: none;
    }

    .nav-mobile-btn {
        display: flex;
    }

    .main-nav {
        margin: 0 -15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-container {
        margin-top: 160px;
        padding: 0 15px 20px;
    }

    .main-content {
        padding: 30px 25px;
    }

    .section-heading {
        font-size: 1.4em;
    }

    .project-card h3 {
        font-size: 1.1em;
    }

    .achievement-item h3 {
        font-size: 1em;
    }

    .links-list {
        gap: 10px;
    }

    .links-list a {
        padding: 8px;
    }

    .link-icon {
        width: 22px;
        height: 22px;
    }
}

/* === RESPONSIVE: MOBILE (<=480px) === */
@media (max-width: 480px) {
    .site-header {
        padding: 12px 12px 0;
    }

    .site-name {
        font-size: 1.5em;
    }

    .main-nav {
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-container {
        margin-top: 150px;
        padding: 0 10px 20px;
    }

    .main-content {
        padding: 25px 18px;
    }

    .section-heading {
        font-size: 1.3em;
    }

    .about-text {
        font-size: 0.95em;
    }

    .links-list {
        gap: 8px;
    }

    .links-list a {
        padding: 7px;
    }

    .link-icon {
        width: 20px;
        height: 20px;
    }

    .project-card h3 {
        font-size: 1.05em;
    }

    .project-card > p {
        font-size: 0.95em;
    }

    .tech-tags {
        gap: 4px;
    }

    .tech-tag {
        font-size: 0.7em;
        padding: 2px 6px;
    }

    .achievement-item h3 {
        font-size: 1em;
    }

    .achievement-item p {
        font-size: 0.95em;
    }

    .skills-text {
        font-size: 0.95em;
    }
}

/* === PRINT === */
@media print {
    body {
        background: #fff;
    }

    .site-header {
        position: static;
    }

    .main-nav {
        display: none;
    }

    .page-container {
        margin-top: 0;
        max-width: 100%;
        padding: 0;
    }

    .main-content {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}