/* Modern Academic / Digital Logic Theme */
:root {
    /* Color Palette */
    --bg-dark: #0B0C10;
    --bg-card: #1F2833;
    --accent-cyan: #66FCF1;
    --accent-muted: #45A29E;
    --text-main: #C5C6C7;
    --text-header: #FFFFFF;
    --border-color: #2e3d4d;

    /* Typography */
    --font-serif: 'IBM Plex Serif', serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --container-width: 900px;
    --spacing-unit: 1rem;
}

/* Base Reset */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-serif);
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
.mono {
    font-family: var(--font-mono);
    color: var(--text-header);
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

a:hover {
    color: var(--text-header);
    text-shadow: 0 0 5px var(--accent-cyan);
}

/* Layout */
header {
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    background: rgba(11, 12, 16, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px; /* Adjust based on preference */
    width: auto;
    transition: transform 0.2s ease;
}

.logo:hover .logo-img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 5px var(--accent-cyan));
}

/* Navigation & Dropdown */
nav {
    display: flex;
    align-items: center;
}

nav a,
.dropbtn {
    margin-left: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
}

nav a:hover,
.dropbtn:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 5px var(--accent-cyan);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    /* Align right for cleaner look in header */
    background-color: var(--bg-card);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
    z-index: 10;
    border: 1px solid var(--accent-cyan);
    border-radius: 4px;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    margin-left: 0;
    /* Reset margin from nav a */
    border-bottom: 1px solid var(--border-color);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(102, 252, 241, 0.1);
    color: var(--text-header);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Main Content */
section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* Blog/Article Styles */
.blog-feed {
    display: grid;
    gap: 3rem;
}

.blog-post {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent-cyan);
    transition: transform 0.2s ease;
}

.blog-post:hover {
    transform: translateX(5px);
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.post-title {
    margin-top: 0;
    font-size: 1.8rem;
}

.tag {
    display: inline-block;
    background: rgba(102, 252, 241, 0.1);
    color: var(--accent-cyan);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    margin-right: 0.5rem;
}

/* Intro/Hero Section */
#intro h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-header);
}

/* Pipeline List (Adapted for Dark Mode) */
.pipeline-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
    border-left: 2px solid var(--accent-muted);
    margin-left: 1rem;
}

.pipeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.pipeline-item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 6px;
    width: 16px;
    height: 16px;
    background: var(--bg-dark);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--accent-cyan);
}

.pipeline-title {
    font-weight: 700;
    font-family: var(--font-mono);
    display: block;
    color: var(--accent-cyan);
    margin-bottom: 0.3rem;
}

/* Button Styles */
.project-btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    padding: 0.8rem 1.5rem;
    transition: all 0.2s ease;
    background: transparent;
    margin-right: 1rem;
    margin-top: 1rem;
}

.project-btn:hover {
    background: rgba(102, 252, 241, 0.1);
    box-shadow: 0 0 10px var(--accent-cyan);
    color: var(--text-header);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-muted);
}

/* --------------------------------------------------
   Profile & Multimedia Extensions
   -------------------------------------------------- */

/* Section Titles */
.section-title {
    font-size: 1.4rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

/* Tech Grid */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tech-item {
    background: rgba(102, 252, 241, 0.05);
    border: 1px solid var(--accent-muted);
    color: var(--text-header);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tech-item:hover {
    background: rgba(102, 252, 241, 0.15);
    box-shadow: 0 0 8px var(--accent-cyan);
    border-color: var(--accent-cyan);
}

/* Timeline (Education) */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    margin-left: 1rem;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    /* Adjust based on padding/border */
    top: 0.3rem;
    width: 12px;
    height: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
}

.timeline-date {
    color: var(--accent-muted);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.timeline-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-header);
}

.timeline-content p {
    margin: 0.3rem 0;
}

.timeline-content .detail {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    opacity: 0.9;
}

/* PDF Viewer */
.pdf-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
}

/* Image Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.gallery-item {
    background: var(--bg-card);
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.2);
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background-color: #000;
}

.img-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: var(--accent-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 1rem;
    border: 1px dashed var(--accent-muted);
}

.gallery-item .caption {
    padding: 0.8rem 0.5rem 0.5rem;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-main);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(11, 12, 16, 0.9);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.8rem 1.2rem;
    font-size: 0.8rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.back-to-top:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* Responsive Tweaks */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pdf-container object {
        height: 500px;
        /* Smaller height on mobile */
    }

    /* Dashboard Mobile */
    .bio-container {
        flex-direction: column-reverse;
        text-align: center;
    }

    .dashboard-card,
    .dashboard-card.reverse {
        flex-direction: column-reverse;
    }

    .card-image {
        height: 200px;
    }
}

/* --------------------------------------------------
   Dashboard Layout
   -------------------------------------------------- */

.dashboard-section {
    margin-bottom: 2rem;
}

/* Profile Summary (Who Am I) */
.bio-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.bio-text {
    flex: 1;
}

.bio-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--accent-cyan);
    object-fit: cover;
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.3);
}

/* Project Cards */
.dashboard-card {
    display: flex;
    align-items: center;
    /* Changed from stretch to center to avoid forcing height */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.1);
}

.dashboard-card.reverse {
    flex-direction: row-reverse;
}

.card-content {
    flex: 1;
    /* Takes up remaining space */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    margin-top: 0;
    color: var(--accent-cyan);
}

.card-image-wrapper {
    flex: 0 0 40%;
    /* Fixed width percentage for image column */
    max-width: 450px;
    /* Max width constraint */
    min-width: 300px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: auto;
    /* Natural height to maintain aspect ratio */
    display: block;
    object-fit: contain;
    /* Ensures full image is visible */
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.dashboard-card:hover .card-image {
    opacity: 1;
}