/* =========================================
   VARIABLES & THEMING
   ========================================= */
:root {
    /* DEFAULT DARK MODE */
    --bg-color: #0a0a0a;
    --bg-alt: #111111;
    --card-bg: #151515;
    --text-main: #f8fafc;
    --text-muted: #a1a1aa;
    
    /* Accents  */
    --accent-color: #00bfa5; 
    --accent-hover: #00897b;
    --border-color: #27272a;
    
    /* Skill Colors */
    --cyan: #06b6d4;
    --purple: #a855f7;
    --green: #10b981;
    --orange-glow: #f59e0b;

    /* Global Settings */
    --font-stack: 'Inter', sans-serif;
    --max-width: 1200px;
    --nav-height: 80px;
    --transition: 0.3s ease;
}

/* LIGHT MODE OVERRIDES */
[data-theme="light"] {
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --border-color: #e5e7eb;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: var(--nav-height); 
}

body {
    font-family: var(--font-stack);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
}

/* Prevents images from breaking layout */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

a { 
    text-decoration: none; 
    color: inherit; 
}

ul { 
    list-style: none; 
}

/* Accessibility Focus States */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
textarea:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

/* =========================================
   UTILITIES
   ========================================= */
.section-container { 
    max-width: var(--max-width); 
    margin: 0 auto; 
    padding: 5rem 2rem; 
}

.section-title { 
    font-size: 2.5rem; 
    margin-bottom: 3rem; 
    text-align: center; 
    color: var(--text-main); 
}

.bg-alt { 
    background-color: var(--bg-alt); 
}

.accent { 
    color: var(--accent-color); 
}

/* =========================================
   BUTTONS
   ========================================= */
.btn { 
    display: inline-block; 
    padding: 0.8rem 1.5rem; 
    border-radius: 6px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: var(--transition); 
    border: 2px solid transparent; 
}

.btn-primary { 
    background-color: var(--accent-color); 
    color: #fff; 
}

.btn-primary:hover { 
    background-color: var(--accent-hover); 
    transform: translateY(-2px);
}

.btn-secondary { 
    background-color: transparent; 
    color: var(--accent-color); 
    border-color: var(--accent-color); 
}

.btn-secondary:hover { 
    background-color: var(--accent-color); 
    color: #fff; 
    transform: translateY(-2px);
}

/* =========================================
   HEADER & NAV
   ========================================= */
header {
    position: fixed; 
    top: 0; 
    width: 100%; 
    height: var(--nav-height);
    background-color: var(--bg-color); 
    border-bottom: 1px solid var(--border-color);
    z-index: 1000; 
    transition: background-color var(--transition);
}

.nav-container { 
    max-width: var(--max-width); 
    margin: 0 auto; 
    padding: 0 2rem; 
    height: 100%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo a { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--text-main); 
}

.nav-links { 
    display: flex; 
    gap: 2rem; 
}

.nav-link { 
    font-weight: 600; 
    font-size: 1rem; 
    color: var(--text-muted); 
    transition: color var(--transition); 
}

.nav-link:hover, 
.nav-link.active { 
    color: var(--accent-color); 
}

.nav-actions { 
    display: flex; 
    align-items: center; 
    gap: 1.5rem; 
}

#theme-toggle { 
    background: none; 
    border: none; 
    color: var(--text-main); 
    font-size: 1.2rem; 
    cursor: pointer; 
}

.hamburger { 
    display: none; 
    font-size: 1.5rem; 
    cursor: pointer; 
    color: var(--text-main); 
}

/* =========================================
   HERO & ABOUT
   ========================================= */
.hero { 
    height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    padding: 0 2rem; 
}

.hero h1 { 
    font-size: clamp(2.5rem, 5vw, 4.5rem); 
    margin-bottom: 1rem; 
}

.hero .tagline { 
    font-size: clamp(1.1rem, 2vw, 1.5rem); 
    color: var(--text-muted); 
    margin-bottom: 2rem; 
}

.hero-buttons { 
    display: flex; 
    gap: 1rem; 
    justify-content: center; 
}

.about-content { 
    display: grid; 
    grid-template-columns: 1fr 2fr; 
    gap: 3rem; 
    align-items: center; 
}

.photo-placeholder { 
    width: 100%; 
    aspect-ratio: 1/1; 
    background-color: var(--card-bg); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--text-muted); 
    border: 2px solid var(--border-color); 
}

.about-text p { 
    color: var(--text-muted); 
    margin-bottom: 1.5rem; 
    font-size: 1.1rem; 
}

/* =========================================
   NEW STATS SECTION
   ========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.stat-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.stat-card p {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1rem;
}

/* =========================================
   MY SKILLS
   ========================================= */
.skills-columns { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 3rem; 
}

.skill-col { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.col-title { 
    font-size: 1.2rem; 
    margin-bottom: 1.5rem; 
    padding-bottom: 5px; 
    color: var(--text-main); 
}

.underline-cyan { border-bottom: 3px solid var(--cyan); }
.underline-purple { border-bottom: 3px solid var(--purple); }
.underline-green { border-bottom: 3px solid var(--green); }

.skill-box {
    background-color: var(--card-bg); 
    width: 100%; 
    text-align: center;
    padding: 1rem; 
    margin-bottom: 0.8rem; 
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem; 
}

.skill-box:hover {
    transform: translateX(5px);
}

.skill-name {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
}

.skill-level {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
}

.border-cyan { border-left: 4px solid var(--cyan); }
.border-purple { border-left: 4px solid var(--purple); }
.border-green { border-left: 4px solid var(--green); }

/* =========================================
   TECH STACK 
   ========================================= */
.tech-title-wrap { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    margin-bottom: 1rem; 
}

.code-tag { 
    color: var(--orange-glow); 
    font-family: monospace; 
    font-size: 1.1rem; 
}

.tech-title-wrap .line { 
    flex-grow: 1; 
    height: 1px; 
    background-color: var(--border-color); 
    max-width: 200px; 
}

.tech-heading { 
    text-align: center; 
    color: var(--orange-glow); 
    font-size: 1.5rem; 
    margin-bottom: 2rem; 
}

.tech-grid { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 1.5rem; 
}

.tech-icon {
    width: 70px; 
    height: 70px; 
    background-color: var(--card-bg);
    border: 1px solid var(--orange-glow); 
    border-radius: 12px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 2rem; 
    color: var(--text-muted);
    transition: box-shadow var(--transition), transform var(--transition);
}

.tech-icon:hover { 
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); 
    transform: translateY(-5px); 
    color: var(--orange-glow); 
}

/* =========================================
   PROJECTS PAGE
   ========================================= */
.page-header { 
    text-align: left; 
    margin-bottom: 3rem; 
}

.page-header .code-tag { 
    color: var(--orange-glow); 
    font-family: monospace; 
    font-size: 1.5rem; 
}

.project-list { 
    display: flex; 
    flex-direction: column; 
    gap: 2rem; 
}

.project-card-h {
    display: flex; 
    background-color: var(--card-bg);
    border: 1px solid var(--orange-glow); 
    border-radius: 16px;
    padding: 2rem; 
    gap: 2rem; 
    align-items: center;
    transition: box-shadow var(--transition);
}

.project-card-h:hover { 
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2); 
}

.project-info-h { 
    flex: 1; 
}

.project-info-h h3 { 
    font-size: 1.8rem; 
    margin-bottom: 1rem; 
}

.project-info-h p { 
    color: var(--text-muted); 
    margin-bottom: 1.5rem; 
}

.project-img-h {
    flex: 1; 
    min-height: 250px; 
    background-color: var(--bg-alt);
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    border: 1px solid var(--border-color); 
    color: var(--text-muted);
}

/* =========================================
   CERTIFICATES PAGE 
   ========================================= */
.cert-title { 
    text-align: center; 
    color: var(--orange-glow); 
    font-size: 2rem; 
    margin-bottom: 3rem; 
}

.cert-card {
    max-width: 600px; 
    margin: 0 auto; 
    background-color: var(--card-bg);
    border: 1px solid var(--orange-glow); 
    border-radius: 16px;
    padding: 3rem; 
    text-align: center;
}

.cert-card h3 { 
    margin-bottom: 1rem; 
}

.cert-card p { 
    color: var(--text-muted); 
    margin-bottom: 2rem; 
}

/* =========================================
   CONTACT & FOOTER
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
    align-items: start;
}

.contact-form { 
    width: 100%; 
}

.form-group { 
    margin-bottom: 1.5rem; 
}

.form-group label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-weight: 600; 
}

.form-group input, 
.form-group textarea {
    width: 100%; 
    padding: 0.8rem; 
    background-color: var(--card-bg);
    border: 1px solid var(--border-color); 
    border-radius: 6px;
    color: var(--text-main); 
    font-family: var(--font-stack);
    transition: border-color var(--transition);
}

.form-group textarea {
    resize: vertical; 
}

.form-group input:focus, 
.form-group textarea:focus { 
    outline: none; 
    border-color: var(--accent-color); 
}

/* Side-by-Side Contact Info Box */
.contact-info { 
    margin-top: 0; 
    text-align: center; 
    padding: 2.5rem 2rem; 
    background: var(--bg-alt);
    border-radius: 12px; 
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

footer { 
    background-color: #000; 
    padding: 2rem; 
    text-align: center; 
    color: var(--text-muted); 
}

/* =========================================
   NEW COMPONENTS (RESUME & INTERACTIONS)
   ========================================= */

/* Resume Page Card */
.resume-viewer {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 700px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin: 0 auto;
}

/* Copy-to-Clipboard Interactions */
#discord-copy {
    transition: color var(--transition), transform var(--transition);
    display: inline-block;
}

#discord-copy:hover {
    color: var(--cyan);
    transform: scale(1.05);
}

#pgp-copy {
    transition: all var(--transition);
}

#pgp-copy:hover {
    box-shadow: 0 0 15px rgba(13, 148, 136, 0.3);
}

/* Achievements Border Utility */
.stat-card-achievement {
    border-top: 3px solid var(--orange-glow) !important;
}

/* Global Transition for copied states */
.success-text {
    color: var(--green) !important;
    border-color: var(--green) !important;
}

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */
@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed; 
        top: var(--nav-height); 
        left: -100%; 
        width: 100%;
        height: calc(100vh - var(--nav-height)); 
        background-color: var(--bg-color);
        flex-direction: column; 
        align-items: center; 
        justify-content: center; 
        transition: 0.4s ease; 
        gap: 3rem;
    }
    
    .nav-links.active { 
        left: 0; 
    }
    
    .hamburger { 
        display: block; 
    }
    
    .about-content, 
    .contact-grid {
        grid-template-columns: 1fr; 
        flex-direction: column; 
        text-align: center;
        gap: 2rem; 
    }

    /* FIX: Center the text and format the card layout */
    .project-card-h {
        flex-direction: column;
        padding: 1.5rem; 
        gap: 1.5rem;
        text-align: center; /* Centers the title, tags, and description */
    }

    /* Align nested tags perfectly to center */
    .project-info-h {
        display: flex;
        flex-direction: column;
        align-items: center; 
    }

    /* FIX: Image goes to bottom and fills space naturally without gaps */
    .project-img-h {
        width: 100%;
        min-height: auto; /* Overrides the desktop minimum height that caused black bars */
        order: 2; /* Puts the image at the bottom, after the text */
        margin: 0;
        display: flex;
        background-color: transparent; /* Removes background filling behind image */
    }

    .project-img-h img {
        width: 100%;
        height: auto; /* Lets the image size itself correctly to avoid bars */
        object-fit: cover; 
        border-radius: 8px;
    }
}

/* ============================================================
   CUSTOM SCROLLBARS (Code Blocks & Global)
   ============================================================ */

/* Target the scrollbar for code blocks specifically */
.markdown-body pre::-webkit-scrollbar {
    height: 8px; /* Height of horizontal scrollbar */
    width: 8px;  /* Width of vertical scrollbar */
}

.markdown-body pre::-webkit-scrollbar-track {
    background: #000; /* Matches your code block background */
    border-radius: 8px;
}

.markdown-body pre::-webkit-scrollbar-thumb {
    background: var(--border); /* Subtle grey thumb */
    border-radius: 8px;
    border: 2px solid #000; /* Creates a "padding" effect */
}

.markdown-body pre::-webkit-scrollbar-thumb:hover {
    background: var(--accent); /* Turns blue when you hover over it */
}

/* Optional: Apply a slim theme-matching scrollbar to the whole page */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
    border: 2px solid var(--bg);
}

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

/* =========================================
   LOGO & BRANDING ALIGNMENT
   ========================================= */

/* Logo: Nx (White) Strip (Teal) */
.logo a {
    color: var(--text-main) !important; /* Forces 'Nx' to stay white/main text color */
}

.logo a span {
    color: var(--accent-color) !important; /* Forces 'Strip' to match your teal accent */
}

/* Hero: Hello, I'm Nx (White) Strip (Teal) */
.hero h1 {
    color: var(--text-main);
}

.hero h1 .accent {
    color: var(--accent-color);
}
