/* Fix for Mobile UI,etc*/ 
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* === 1. GLOBAL & THEME SETUP === */
:root {
    --bg-dark: #0f172a;      /* Darkest blue-gray */
    --bg-medium: #1e293b;    /* Medium blue-gray (cards) */
    --bg-light: #334155;     /* Light blue-gray (borders) */
    --text-light: #e2e8f0;   /* Main text */
    --text-bright: #ffffff;  /* Headlines */
    --text-muted: #94a3b8;   /* Subtitles */
    --accent: #3b82f6;       /* Bright blue */
    --accent-hover: #2563eb; /* Darker blue */
    --green: #16a34a;        /* Copied button */
    --linkedin: #0a66c2;     /* LinkedIn button */
    --linkedin-hover: #004182;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-bright);
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--accent-hover);
}

/* === 2. HEADER & NAVIGATION === */
.main-header {
    width: 100%;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--bg-light);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-bright);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-bright);
}

.nav-link.active {
    color: var(--text-bright);
    border-bottom-color: var(--accent);
}

/* === 3. MAIN CONTENT & PAGE STYLES === */
main {
    padding: 100px 2rem 4rem; /* Adjusted top padding */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align content to the top for better flow */
    min-height: 100vh;
    box-sizing: border-box;
}

.page-content {
    width: 100%;
    max-width: 1000px;
}

.page-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem); /* Responsive font size */
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.cta-button {
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;

}


.cta-button.primary {
    background-color: var(--accent);
    color: var(--text-bright);
}
.cta-button.primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}
.cta-button:not(.primary) {
    background-color: var(--bg-medium);
    color: var(--text-light);
    border: 1px solid var(--bg-light);
}
.cta-button:not(.primary):hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
}

.skills-section {
    max-width: 800px;
    margin: 4rem auto 0 auto;
    text-align: center;
}

.skills-section h3 {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.skills-grid span {
    background-color: var(--bg-medium);
    border: 1px solid var(--bg-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

/* === 5. PROJECTS PAGE === */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background-color: var(--bg-medium);
    border: 1px solid var(--bg-light);
    border-radius: 12px;
    overflow: hidden; /* To contain the image */
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.project-card.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-style: dashed;
    min-height: 250px; /* Give placeholder a minimum height */
}

.project-image {
    width: 100%;
    height: 200px; /* Fixed height for uniformity */
    object-fit: cover; /* Scales image to fit */
    border-bottom: 1px solid var(--bg-light);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-top: 0;
    font-size: 1.25rem;
}

.project-content p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    background-color: var(--bg-dark);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* === 6. PROJECT DETAILS PAGE (Windows Utility) === */
/* This re-uses your old styles, now scoped to this page */
.download-container {
    max-width: 600px;
    margin: 0 auto;
}
.download-container header {
    text-align: center;
    margin-bottom: 2rem;
}
.download-container header h1 {
    font-size: clamp(1.8rem, 5vw, 2.2rem); /* Responsive font size */
}
.download-container header p {
    font-size: 1rem;
    max-width: 50ch;
    margin-left: auto;
    margin-right: auto;
}
.version-tag {
    display: inline-block;
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 20px;
}
.download-box {
    background-color: var(--bg-medium);
    border: 1px solid var(--bg-light);
    border-radius: 12px;
    padding: 24px 32px;
    text-align: center;
}
.admin-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    background-color: var(--bg-dark);
    padding: 12px;
    border-radius: 6px;
    margin-top: 20px;
    border: 1px dashed var(--bg-light);
    line-height: 1.5;
    text-align: left;
}
.admin-note strong {
    color: var(--text-light);
    display: block;
    margin-bottom: 5px;
}
.code-block {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: "Courier New", Courier, monospace;
    padding: 16px;
    border-radius: 6px;
    margin: 24px 0;
    text-align: left;
    overflow-x: auto;
    border: 1px solid var(--bg-light);
    display: flex;
    align-items: center;
    position: relative;
}
#typewriter-command {
    white-space: nowrap;
}
.cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: var(--text-light);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    from, to { background-color: transparent; }
    50% { background-color: var(--text-light); }
}
.copy-button {
    background-color: var(--accent);
    color: var(--text-bright);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.copy-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}
.copy-button.copied {
    background-color: var(--green);
    transform: translateY(0);
}

/* === 7. FOOTER / CONTACT === */
.main-footer {
    width: 100%;
    background-color: var(--bg-dark);
    border-top: 1px solid var(--bg-light);
    padding: 3rem 1rem; /* Adjusted padding */
    box-sizing: border-box;
    margin-top: auto;
}

.about-me {
    max-width: 600px;
    margin: 0 auto 40px auto;
    text-align: center;
}
.about-me h3 {
    font-size: 1.5rem;
    color: var(--text-bright);
    margin-bottom: 10px;
}
.about-me p {
    color: var(--text-muted);
    max-width: 450px;
    margin: 0 auto 25px auto;
    font-size: clamp(0.9rem, 2vw, 1rem); /* Responsive font size */
}
.contact-links {
    display: flex;
    justify-content: center;
    align-items: center; /* Align items vertically */
    gap: 1rem;
    flex-wrap: wrap; /* Allow buttons to wrap */
}
.connect-button {
    background-color: var(--linkedin);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}
.connect-button:hover {
    background-color: var(--linkedin-hover);
}
.connect-button:last-child {
    background-color: var(--bg-medium);
    color: var(--text-light);
}
.connect-button:last-child:hover {
    background-color: var(--bg-light);
}

/* Style for the new GitHub button in the connect section */
.connect-button.github {
    background-color: var(--bg-medium);
    color: var(--text-light);
    padding: 10px; /* Adjust padding for icon */
    display: flex;
    align-items: center;
    justify-content: center;
}
.connect-button.github:hover {
    background-color: var(--bg-light);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.github-link {
    display: inline-block;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.github-link:hover {
    color: var(--text-bright);
    transform: scale(1.1);
}
.main-footer > p {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* === 8. RESPONSIVE (Mobile) === */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem; /* Reduce padding on mobile */
        justify-content: center; /* Center nav items */
    }
    .nav-menu {
        display: flex; /* Ensure nav menu is visible */
    }
    main {
        padding-top: 80px 1rem 4rem; /* Adjust padding for mobile header */
    }
    .page-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .project-grid {
        /* On mobile, force one column for project cards */
        grid-template-columns: 1fr;
    }
}

/* Add a new breakpoint for very small screens */
@media (max-width: 480px) {
    .hero-cta-group {
        flex-direction: column; /* Stack CTA buttons vertically */
        align-items: center;
    }
    .cta-button {
        width: 100%;
        max-width: 320px; /* Prevent buttons from being too wide */
        text-align: center;
    }
    .download-box {
        padding: 24px; /* Reduce padding */
    }
}