/* Variables & Reset */
:root {
    --bg-color: #0f172a;
    --bg-offset: #1e293b;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #10b981; /* Cyber Green */
    --accent-hover: #34d399;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Utilities */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }
.bg-offset { background-color: var(--bg-offset); }

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

/* Navigation */
.navbar {
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.cursor { animation: blink 1s infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.nav-links a:hover { color: var(--accent); }

.btn-blog {
    border: 1px solid var(--accent);
    padding: 8px 20px;
    border-radius: 4px;
    color: var(--accent) !important;
}
.btn-blog:hover { background: var(--accent); color: var(--bg-color) !important; }

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: center;
}

.overline {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.hero-text h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero-text h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 20px;
}

/* Updated Bio Subtitle Style */
.bio-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 550px;
    margin-bottom: 30px;
    border-left: 3px solid var(--accent);
    padding-left: 20px;
}

.social-links { display: flex; gap: 20px; font-size: 1.5rem; margin-top: 30px; }
.social-links a:hover { color: var(--accent); transform: translateY(-3px); }

.img-wrapper {
    position: relative;
}

.img-wrapper img {
    width: 100%;
    max-width: 380px;
    border-radius: 4px;
    filter: grayscale(100%);
    transition: 0.5s;
    border: 1px solid var(--text-muted);
}

.img-wrapper img:hover {
    filter: grayscale(0%);
    border-color: var(--accent);
    box-shadow: 10px 10px 0px var(--accent);
}

/* Timeline */
.section-title {
    font-size: 2rem;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin-top: 10px;
}

.timeline {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid rgba(255,255,255,0.1);
}

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

.timeline-marker {
    position: absolute;
    left: -39px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 2px solid var(--accent);
    border-radius: 50%;
    transition: 0.3s;
}

.timeline-item:hover .timeline-marker { background: var(--accent); }

.timeline-content .date {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
}

.timeline-content h4 { font-size: 1.4rem; margin-bottom: 5px; }
.timeline-content .company { font-weight: 600; color: var(--text-muted); font-size: 1.1rem; display: block; margin-bottom: 10px; }

.resume-container { margin-top: 40px; text-align: left; padding-left: 30px; }
.btn-outline {
    display: inline-block;
    border: 1px solid var(--text-muted);
    padding: 12px 25px;
    border-radius: 4px;
    color: var(--text-muted);
    font-weight: 600;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(16, 185, 129, 0.05); }

/* Grid & Interactive Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-offset);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
    position: relative;
}

.card:hover { border-color: var(--accent); }

/* Interactive Details Styling */
.interactive-card details {
    padding: 30px;
    cursor: pointer;
}

.interactive-card summary {
    list-style: none;
    outline: none;
}

.interactive-card summary::-webkit-details-marker { display: none; }

.icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.more-link {
    display: block;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    animation: fadeIn 0.3s ease-in;
}

.card-details ul li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    position: relative;
    padding-left: 15px;
    color: var(--text-muted);
}

.card-details ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
}

.card-details a:hover { text-decoration: underline; color: var(--text-main); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 50px;
}

.subtext { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text h1 { font-size: 2.8rem; }
    .bio-subtitle { margin: 0 auto 30px; border-left: none; border-bottom: 3px solid var(--accent); padding-bottom: 20px; padding-left: 0; }
    .social-links { justify-content: center; }
    .img-wrapper { margin: 0 auto; max-width: 300px; }
    .nav-links { display: none; } /* Consider adding a mobile menu if needed, for now hidden on small screens for simplicity */
}

/* BLOG IMAGE FIXES */

/* Target images inside ANY article or main content area */
article img, 
.post-content img,
.content-block img {
    max-width: 100% !important;   /* Force fit to container width */
    height: auto !important;      /* Maintain aspect ratio */
    display: block !important;    /* Remove inline behavior */
    margin: 40px auto 10px auto;  /* Center image, space above/below */
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Fix images wrapped in links (common in your blog) */
article a > img,
.post-content a > img {
    cursor: zoom-in;
    display: block; /* Ensures the link container doesn't shrink wrap weirdly */
}

/* Remove underlines from image links */
article a:has(img) {
    border-bottom: none !important;
    text-decoration: none !important;
}

/* CAPTION STYLING (The text immediately following an image) */
/* Since Markdown puts text in the same <p> tag, we style the whole paragraph */
article p,
.post-content p {
    text-align: left; /* Keep normal text left-aligned */
}

/* Identify paragraphs that are likely just an image + caption */
/* This centers the caption text under the image */
article p:has(img) {
    text-align: center;
    color: #94a3b8; /* Muted color for captions */
    font-size: 0.9em;
    font-style: italic;
    margin-bottom: 40px;
}

/* MOBILE MENU STYLES */

/* The Hamburger Button (Hidden on Desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--accent); /* Green */
    border-radius: 2px;
    transition: 0.3s;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    
    /* Show the hamburger button */
    .menu-toggle {
        display: flex;
        z-index: 2000; /* Ensure it sits on top */
    }

    /* Transform the nav-links into a dropdown */
    .nav-links {
        display: none; /* Hidden by default */
        position: absolute;
        top: 70px; /* Push it below the navbar */
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        border-bottom: 2px solid var(--accent);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    /* The class JavaScript will add to SHOW the menu */
    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-in-out;
    }

    .nav-links li {
        margin: 15px 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }

    /* Animation for the Hamburger transforming into an 'X' */
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}