/* Base Theme & Reset */
:root {
    --bg-main: #121212;
    --bg-sidebar: #181818;
    --bg-card: #1e1e1e;
    --border-color: #2e2e2e;
    --border-hover: #4b5563;
    --text-primary: #e0e0e0;
    --text-secondary: #9ca3af;
    --accent-blue: #60a5fa;
    --accent-blue-hover: #93c5fd;
    --modal-bg: rgba(0, 0, 0, 0.75);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans Code', monospace;
    background-color: var(--bg-main);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.7;
    display: flex;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* --- SIDEBAR (Left Card) --- */
.sidebar {
    width: 340px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    text-align: center;
    z-index: 10;
}

.profile-pic-container {
    position: relative;
    margin-bottom: 25px;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.profile-pic:hover {
    border-color: var(--accent-blue);
}

#greeting {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-blue);
    margin: 0 0 10px 0;
}

.headline {
    font-size: 15px;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.tagline {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 25px 0;
    line-height: 1.6;
}

.contact-links {
    display: flex;
    gap: 20px;
}

.contact-links a {
    color: var(--text-secondary);
    font-size: 28px;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-links a:hover {
    color: var(--accent-blue);
    transform: translateY(-3px);
}

/* --- MAIN CONTENT (Right Area) --- */
.main-content {
    margin-left: 340px;
    flex: 1;
    padding: 60px 5%;
    min-height: 100vh;
}

.content-wrapper {
    max-width: 850px;
    margin: 0 auto;
}

section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

section:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

h2 {
    font-size: 20px;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.binary {
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 16px;
    background: rgba(96, 165, 250, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 1px;
}

h3 {
    font-size: 15px;
    color: var(--accent-blue-hover);
    margin: 25px 0 10px 0;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 15px;
}

ul {
    margin: 0;
    padding-left: 20px;
}

li {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 15px;
}

li:last-child {
    margin-bottom: 0;
}

li strong {
    color: var(--text-primary);
    font-size: 16px;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-blue-hover);
    text-decoration: underline;
}

/* --- PROJECT LINKS SEPARATOR --- */
.project-links-separator {
    color: var(--border-color);
    margin: 0 6px;
    font-weight: normal;
}

/* --- PROJECT TECH STACK --- */
.project-stack {
    display: block;
    color: var(--accent-blue-hover);
    font-size: 13px;
    margin: 2px 0 4px 0;
}

/* --- EXPERIENCE DATE --- */
.exp-date {
    color: var(--accent-blue-hover);
    font-size: 13px;
    margin-left: 6px;
}

/* --- BLOGS & ARTICLES SECTION --- */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.blog-card {
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.blog-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.08);
    text-decoration: none;
}

.blog-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.blog-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-content h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.4;
}

.blog-content .blog-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-content .read-more {
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    transition: color 0.2s;
}

.blog-card:hover .read-more {
    color: var(--accent-blue-hover);
}

/* --- VIEW ALL BUTTON --- */
.view-all-container {
    text-align: center;
    margin-top: 25px;
}

.btn-view-all {
    background: transparent;
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    padding: 10px 20px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-view-all:hover {
    background: rgba(96, 165, 250, 0.1);
    transform: translateY(-2px);
}

/* --- MODAL POPUP --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-track { background: var(--bg-card); }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 950px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 40px 20px;
    }
    .main-content {
        margin-left: 0;
        padding: 40px 20px;
    }
    section {
        padding: 25px;
    }
    .modal-header, .modal-body {
        padding: 20px;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
}