/* Modern Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&family=Fira+Code:wght@400;500&display=swap');

:root {
    /* --- Exact Palette from Spec --- */
    --bg-primary: #020617;
    /* Deep navy background */
    --bg-secondary: #020617;
    /* Same base, layered gradients */
    --bg-card: #0B1220;
    /* Code card background */

    /* Accent Blues */
    --blue-primary: #3B82F6;
    /* Name highlight + buttons */
    --blue-secondary: #2563EB;
    /* Button hover / emphasis */
    --blue-soft: #60A5FA;
    /* Subtle highlights */

    /* Text Colors */
    --text-primary: #F8FAFC;
    /* Main headings */
    --text-secondary: #94A3B8;
    /* Body text */
    --text-muted: #64748B;
    /* Subtle UI labels */

    /* Code Syntax Highlighting */
    --code-pink: #EC4899;
    /* const, keywords */
    --code-green: #22C55E;
    /* strings */
    --code-purple: #A855F7;
    /* object keys */
    --code-blue: #38BDF8;
    /* comments / filenames */
    --code-gray: #9CA3AF;
    /* punctuation */

    /* Window Controls */
    --red: #EF4444;
    --yellow: #F59E0B;
    --green: #22C55E;

    /* Fonts */
    --font-sans: 'Inter',
        'SF Pro Display',
        system-ui,
        -apple-system,
        sans-serif;
    --font-mono: 'Fira Code',
        monospace;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Ensure smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue-primary);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-white);
    font-weight: 600;
    line-height: 1.1;
}

.section-heading {
    display: flex;
    align-items: center;
    font-size: clamp(26px, 5vw, 32px);
    white-space: nowrap;
    margin: 10px 0 40px;
}

.section-heading::before {
    content: attr(data-number);
    margin-right: 10px;
    color: #ffffff;
    /* White numbering */
    font-family: var(--font-mono);
    font-size: clamp(16px, 3vw, 20px);
    font-weight: 400;
    position: relative;
    bottom: 0px;
}

.section-heading::after {
    content: "";
    display: block;
    position: relative;
    top: -1px;
    width: 300px;
    height: 1px;
    margin-left: 20px;
    background-color: var(--bg-lightest-navy);
}

/* --- Layout Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

section {
    padding: 100px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Components --- */

/* Button */
.btn-primary {
    background-color: var(--blue-primary);
    color: var(--text-primary);
    border: none;
    border-radius: 4px;
    padding: 1rem 2rem;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--blue-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 1rem 2rem;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.btn-outline:hover {
    border-color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Cards (Projects/Certificates) */
.glass-card {
    background-color: var(--bg-light-navy);
    border-radius: 8px;
    /* Slightly rounded corners */
    padding: 2rem;
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    height: 100%;
}

.glass-card:hover {
    transform: translateY(-7px);
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    height: 100px;
    background-color: rgba(10, 25, 47, 0.85);
    /* Glass effect */
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    /* Ensure base text is white/light */
}

.nav-links li a {
    color: #ffffff !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links li a:hover {
    color: var(--blue-primary) !important;
}

.nav-links li a span {
    color: #ffffff !important;
    /* Make numbers white too */
    margin-right: 5px;
}

/* --- Hero Section --- */
#hero {
    display: flex;
    flex-direction: row;
    /* Side by side on desktop */
    justify-content: space-between;
    align-items: center;
    min-height: 100vh;
    padding-top: 0;
    gap: 50px;
    background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.15), transparent 60%);
}

.hero-text {
    flex: 1;
}

.hero-subtitle {
    margin: 0 0 10px 0;
    color: var(--blue-soft);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.05em;
}

.hero-title {
    margin: 0;
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    color: var(--blue-primary);
}

.hero-description {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 500px;
    line-height: 1.7;
}

/* --- Code Editor Visual (Glassmorphism) --- */
.code-editor {
    flex: 1;
    max-width: 500px;
    /* Limit width */
    background: rgba(11, 18, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 14px;
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.editor-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

.red {
    background-color: var(--red);
}

.yellow {
    background-color: var(--yellow);
}

.green {
    background-color: var(--green);
}

.file-name {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 10px;
}

.editor-content {
    padding: 25px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Syntax Highlighting - AZ-Dev Exact Colors */
.kwd {
    color: #ff79c6;
}

/* const/def - Pink */
.var {
    color: #8be9fd;
}

/* variable name - Cyan/Blue */
.str {
    color: #50fa7b;
}

/* Strings - Green */
.prop {
    color: #bd93f9;
}

/* Properties*/
/* Hero Name Highlight */
.hero-title .highlight {
    color: var(--blue-primary);
    /* Use variable for consistency */
}

.bool {
    color: #ffb86c;
}

/* Booleans - Orange */
.cmnt {
    color: #6272a4;
    font-style: italic;
}

/* Comments - GreyBlue */

@media (max-width: 1000px) {
    #hero {
        flex-direction: column;
        justify-content: center;
        text-align: left;
        /* Keep left align often looks better */
        align-items: flex-start;
    }

    .code-editor-container {
        width: 100%;
        margin-top: 50px;
    }
}

/* --- About Section --- */
.about-content {
    display: block;
    max-width: 800px;
    /* Optional: limit width for readability if it gets too wide */
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 15px;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 0 10px;
    padding: 0;
    margin: 20px 0 0 0;
    overflow: hidden;
    list-style: none;
}

.skills-list li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 20px;
    font-family: var(--font-mono);
    font-size: 13px;
}

.skills-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--blue-primary);
}


/* --- Experience Section --- */
.experience-timeline {
    border-left: 2px solid var(--bg-lightest-navy);
    padding-left: 20px;
    margin-left: 10px;
}

.job {
    margin-bottom: 40px;
    position: relative;
}

.job:last-child {
    margin-bottom: 0;
}

.job::before {
    content: "";
    position: absolute;
    left: -26px;
    /* Adjust to center on line */
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--blue-primary);
    background-color: var(--bg-navy);
}

.job-title {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.job-company {
    color: var(--blue-primary);
}

.job-period {
    font-family: var(--font-mono);
    font-size: 13px;
    margin-bottom: 20px;
}

.job-details li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    font-size: 15px;
}

.job-details li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--blue-primary);
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    background-color: var(--bg-light-navy);
    padding: 2rem;
    border-radius: 8px;
    transition: all 0.25s;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-7px);
}

.project-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.folder-icon {
    color: var(--blue-primary);
    width: 40px;
    height: 40px;
}

.project-links a {
    color: var(--text-primary);
    margin-left: 15px;
}

.project-links a:hover {
    color: var(--blue-primary);
}

.project-title {
    color: var(--text-primary);
    font-size: 22px;
    margin-bottom: 10px;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin-top: 20px;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 12px;
}

/* --- Certificates & Badges Grid --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.cert-card {
    background-color: var(--bg-light-navy);
    padding: 10px;
    border-radius: 4px;
    transition: transform 0.25s;
}

.cert-card:hover {
    transform: translateY(-5px);
}

.cert-card img {
    width: 100%;
    height: auto;
    border-radius: 2px;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.cert-card:hover img {
    filter: none;
}

.cert-caption {
    font-family: var(--font-mono);
    font-size: 13px;
    text-align: center;
    margin-top: 10px;
    color: var(--blue-primary);
}


/* --- Contact Section --- */
.contact-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 100px;
}

.contact-title {
    font-size: 50px;
    color: var(--text-white);
    margin-bottom: 20px;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-light-slate);
}

/* Media Queries */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 50px;
    }

    .section-heading::after {
        width: 100%;
    }

    nav {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
        /* Hide nav links on mobile for simplicity */
    }
}

/* --- Mobile Navigation --- */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    z-index: 1000;
}

.line {
    width: 100%;
    height: 3px;
    background-color: var(--accent-cyan);
    transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {

    /* Ensure nav items are visible when menu is active but hidden by default via transform */
    .nav-links {
        display: flex;
        /* Override display: none from previous rule */
        position: fixed;
        right: 0px;
        height: 100vh;
        top: 0vh;
        background-color: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.3s ease-in;
        z-index: 999;
        backdrop-filter: blur(10px);
        box-shadow: -10px 0px 30px -10px rgba(0, 0, 0, 0.5);
        padding-top: 0;
    }

    .hamburger {
        display: flex;
    }

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

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links.nav-active li {
        opacity: 1;
        transition: opacity 0.5s ease 0.3s;
    }
}

/* Hamburger Animation */
.hamburger.toggle .line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.toggle .line:nth-child(2) {
    opacity: 0;
}

.hamburger.toggle .line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* --- Project Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(2, 6, 23, 0.8);
    /* Dark overlay */
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--bg-card);
    margin: auto;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--code-pink);
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 28px;
    margin-bottom: 20px;
}

.modal-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: #000;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.modal-desc h3 {
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 20px;
}

.modal-desc ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.modal-desc li {
    margin-bottom: 5px;
}

.modal-footer {
    margin-top: 30px;
    text-align: right;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Make project cards clickable */
.project-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}