/* =========================================
   1. RESET & BASIC TYPOGRAPHY
   ========================================= */
   :root {
    /* Nord Color Palette */
    --bg-color: #ECEFF4;       /* Light Gray/White */
    --card-bg: #FFFFFF;        /* Pure White */
    --nav-bg: #2E3440;         /* Dark Slate */
    --text-main: #2E3440;      /* Dark Text */
    --text-light: #4C566A;     /* Gray Text */
    --accent: #5E81AC;         /* Muted Blue */
    --accent-hover: #81A1C1;   /* Lighter Blue */
    --border: #D8DEE9;         /* Border Gray */
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
}

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

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

/* =========================================
   2. NAVIGATION BAR
   ========================================= */
nav {
    background-color: var(--nav-bg);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
}

/* Find the existing .logo rule and UPDATE it to look like this: */
.logo {
    display: flex;           /* Aligns image and text side-by-side */
    align-items: center;     /* Centers them vertically */
    gap: 10px;               /* Adds space between image and text */
    
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff !important;
    text-decoration: none !important;
    letter-spacing: 0.5px;
}

/* ADD this new rule below it to control the image size: */
.logo img {
    height: 32px;            /* Fits perfectly inside the navbar */
    width: auto;             /* Maintains aspect ratio */
    border-radius: 6px;      /* Slightly rounds the corners (optional) */
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

nav a {
    color: #D8DEE9;
    font-size: 0.95rem;
    font-weight: 500;
}

nav a:hover, nav a.active {
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid var(--accent-hover);
}

/* =========================================
   3. HERO SECTION (General)
   ========================================= */
.hero-section {
    background-color: var(--card-bg);
    text-align: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.hero-section .container {
    max-width: 1350px;
    width: 95%;
    margin: 0 auto;
}

.profile-photo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 1rem;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

/* =========================================
   4. HERO 3-COLUMN LAYOUT (Balanced & Scrollable)
   ========================================= */
.hero-split .hero-layout {
    display: flex;
    align-items: stretch; /* Forces equal height cards */
    justify-content: space-between;
    gap: 20px;
    text-align: left;
}

.hero-col {
    flex: 1;
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to TOP */
}

/* Profile Column */
.hero-profile {
    flex: 1.1;
    align-items: center; /* Center photo/text horizontally */
    text-align: center;
    background-color: #f8f9fa;
}

.hero-interests { flex: 0.9; }
.hero-updates { flex: 1.1; }

.hero-col h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-main);
    font-size: 1.25rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    padding-bottom: 8px;
    align-self: flex-start;
    flex-shrink: 0;
}

.hero-profile h1 { margin-bottom: 5px; font-size: 1.8rem; }

/* Scrollable Updates List */
.hero-updates-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.hero-updates-list::-webkit-scrollbar { width: 4px; }
.hero-updates-list::-webkit-scrollbar-track { background: transparent; }
.hero-updates-list::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 20px; }
.hero-updates-list::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }

/* Update Item Styling */
.update-item.compact {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: baseline;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    margin: 0;
}
.update-item.compact:last-child { border-bottom: none; }

.update-item.compact .date {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    min-width: 70px;
}
.update-item.compact p { margin: 0; font-size: 0.9rem; line-height: 1.4; color: var(--text-light); }

/* =========================================
   5. BUTTONS (Hero, Socials, Nav)
   ========================================= */
.hero-btn-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

/* COMPACT HERO BUTTONS */
.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;          /* Small gap */
    padding: 8px 20px; /* Compact padding */
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem; /* Smaller font */
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    text-decoration: none;
}

/* Colors */
.hero-btn.academic { background-color: var(--accent); color: white; border: 2px solid var(--accent); }
.hero-btn.academic:hover { background-color: var(--accent-hover); border-color: var(--accent-hover); }

.hero-btn.games { background-color: var(--nav-bg); color: white; border: 2px solid var(--nav-bg); }
.hero-btn.games:hover { background-color: #4C566A; border-color: #4C566A; }

.social-links { display: flex; justify-content: center; gap: 15px; margin-top: 20px; }
.hero-btn.linkedin { background-color: #0077b5; color: white; border: 2px solid #0077b5; }
.hero-btn.linkedin:hover { background-color: #005582; border-color: #005582; }
.hero-btn.scholar { background-color: #4285F4; color: white; border: 2px solid #4285F4; }
.hero-btn.scholar:hover { background-color: #3367d6; border-color: #3367d6; }

/* NAVIGATION ARROW BUTTONS (Tall & Narrow) */
.nav-btn {
    background-color: var(--nav-bg);
    color: white;
    border: none;
    
    /* NEW DIMENSIONS: Narrow & Tall */
    width: 35px;  /* Reduced from 50px */
    height: 70px; /* Increased from 50px */
    border-radius: 35px; /* Pill shape */
    
    font-size: 1.2rem; /* Slightly smaller icon to fit width */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 10;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.nav-btn:hover {
    background-color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

/* Position Adjustment: Pull them closer to the edge since they are narrower */
.nav-btn.prev {
    left: -18px; /* Half of width (approx) */
}

.nav-btn.next {
    right: -18px;
}

/* =========================================
   6. MAIN CONTENT LAYOUT
   ========================================= */
main {
    max-width: 1350px;
    width: 95%;
    margin: 0 auto 3rem auto;
    padding: 0 20px;
}
main.narrow-content { max-width: 1100px; }

.content-section {
    margin-bottom: 2.5rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

h2 { font-size: 1.5rem; color: var(--text-main); margin-bottom: 1.2rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--bg-color); }
p { margin-bottom: 1rem; color: var(--text-light); }
hr { border: 0; height: 1px; background: var(--border); margin: 2rem 0; }

/* =========================================
   7. CAROUSEL & SLIDES
   ========================================= */
.carousel-container {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0;
    display: flex;
    align-items: stretch;
    overflow: visible;
    min-height: 400px;
}

.slides-wrapper {
    flex-grow: 1;
    position: relative;
    padding: 20px 20px 60px 20px;
}

.project-slide {
    display: none;
    flex-direction: row;
    gap: 25px;
    align-items: flex-start;
    animation: fadeIn 0.4s ease-in-out;
}
.project-slide.active { display: flex; }

/* Gallery Column */
.slide-gallery {
    flex: 0 0 420px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Media Containers */
.slide-gallery video.main-media,
.slide-gallery iframe.main-media,
.slide-gallery img.main-media,
.photo-viewer-main img,
.photo-viewer-main {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: contain;
    background-color: #000;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.photo-viewer-main { width: 100% !important; max-width: 100%; }

/* Youtube Card Wrapper */
.youtube-link-card {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    background-color: #000;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.video-link-wrapper img.main-media { width: 100%; height: 100%; object-fit: cover; border: none; }

/* Thumbnails */
.gallery-strip, .photo-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    padding-bottom: 5px;
    width: 100%;
    margin-top: 5px;
    height: auto;
    min-height: 50px;
}
.photo-thumbnails::-webkit-scrollbar { height: 6px; }
.photo-thumbnails::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 10px; }

.gallery-strip img, .photo-thumbnails .thumb {
    width: 70px !important;
    height: 45px !important;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
}
.thumb:hover, .thumb.active { opacity: 1; border-color: var(--accent); }

/* Media Toggle Buttons */
.media-toggle-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 5px;
}
.media-toggle-btn {
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background-color: #fff;
    color: var(--text-light);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.media-toggle-btn:hover { background-color: #f8f9fa; color: var(--accent); border-color: var(--accent); }
.media-toggle-btn.active { background-color: var(--accent); color: white; border-color: var(--accent); }
.media-view { animation: fadeIn 0.3s ease-in-out; }
.hidden-view { display: none !important; }

/* Stats in Gallery */
.slide-gallery .game-stats-grid {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 0;
    flex-wrap: nowrap;
}
.slide-gallery .stat-box {
    padding: 6px 4px;
    font-size: 0.75rem;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 4px;
}
.slide-gallery .stat-box i { margin-right: 4px; font-size: 0.85rem; }

/* --- Right Side Content --- */
.slide-content, .slide-content-game { flex: 1; padding-right: 0; }
.slide-content h3 { font-size: 1.25rem; margin-top: 0; margin-bottom: 5px; line-height: 1.3; color: var(--text-main); }
.project-authors { margin-bottom: 8px; font-size: 0.9rem; }
.slide-content p, .slide-content-game p { font-size: 0.95rem; line-height: 1.5; color: var(--text-light); margin-bottom: 15px; }

/* =========================================
   8. MISC COMPONENTS (Lists, Tags, Badges)
   ========================================= */
.hero-interest-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.hero-interest-list li { font-size: 0.95rem; color: var(--text-light); display: flex; align-items: center; gap: 10px; }
.hero-interest-list li i { color: var(--accent); width: 20px; text-align: center; }
.email-text { font-size: 0.9rem; color: var(--text-light); margin-top: -10px; }

.tag { display: inline-block; font-size: 0.85rem; color: #6c757d; background-color: #f8f9fa; border: 1px solid #e9ecef; padding: 2px 10px; border-radius: 20px; margin-bottom: 8px; margin-top: 5px; font-weight: 500; }
.tag::before { content: "# "; color: #adb5bd; font-weight: normal; }
.tech-stack-row { font-size: 0.9rem; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
.mini-tag { display: inline-block; background-color: white; border: 1px solid #d1d5db; color: #555; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 500; margin-right: 5px; }

/* Badges */
.stat-box { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 6px; padding: 8px 12px; font-size: 0.85rem; font-weight: bold; color: var(--text-main); display: flex; align-items: center; gap: 8px; flex: 1; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.stat-box.achievement { background-color: #fffbe6 !important; border: 1px solid #f1c40f !important; color: #9a7d0a !important; }
.stat-box.achievement i { color: #f39c12 !important; }
.stat-box.info { background-color: #eaf6ff !important; border: 1px solid #3498db !important; color: #154360 !important; }
.stat-box.info i { color: #2980b9 !important; }

.award-badge { display: inline-block; background-color: #f1c40f !important; color: #fff !important; font-weight: bold; font-size: 0.85rem; padding: 2px 6px; border-radius: 4px; margin-bottom: 5px; margin-right: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.google-badge { background-color: #4285F4 !important; color: white !important; }

.game-features-list { list-style: none; padding: 0; margin-bottom: 20px; }
.game-features-list li { position: relative; padding-left: 20px; margin-bottom: 6px; font-size: 0.95rem; color: var(--text-light); }
.game-features-list li::before { content: "•"; color: var(--accent); font-weight: bold; position: absolute; left: 0; }

/* Publication & PDF Badges */
.pub-id { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; color: white; margin-right: 8px; vertical-align: text-bottom; line-height: 1.2; }
.pub-id.journal { background-color: #bf616a; }
.pub-id.conference { background-color: #5e81ac; }
.pub-id.workshop { background-color: #a3be8c; }

.paper-item p { margin-bottom: 3px !important; margin-top: 0 !important; line-height: 1.4; }
.paper-item p:first-child { margin-bottom: 6px !important; }

.pdf-link { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; font-weight: 600; font-size: 0.9rem; color: var(--text-light); border: 1px solid var(--border); padding: 2px 8px; border-radius: 4px; transition: all 0.2s ease; }
.pdf-link i { color: #bf616a; font-size: 1rem; }
.pdf-link:hover { background-color: #fff; border-color: #bf616a; color: #bf616a; text-decoration: none; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* --- GAME PROJECTS OVERRIDE --- */
#games-carousel .slide-gallery {
    flex: 0 0 45%; 
    min-width: 300px; 
    max-width: 500px; 
}

/* =========================================
   9. NAVIGATION DOTS (Hollow/Solid)
   ========================================= */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5;
    align-items: center;
}

/* Standard Dot */
.dot {
    width: 12px;
    height: 12px;
    background-color: #d1d5db; /* Light Grey */
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.dot.active { background-color: var(--accent); border-color: var(--accent); transform: scale(1.2); }

/* Featured Dot (Hollow Ring) */
.dot.featured {
    background-color: transparent;
    border: 2px solid #f1c40f;
    width: 14px;
    height: 14px;
}
.dot.featured:hover { background-color: rgba(241, 196, 15, 0.2); transform: scale(1.1); }

/* Active Featured Dot (Solid Gold) */
.dot.featured.active {
    background-color: #f1c40f;
    border-color: #f1c40f;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.6);
}

/* Tooltips */
.dot[data-title]:not([data-title=""]):hover::after {
    content: attr(data-title);
    position: absolute;
    bottom: 160%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2E3440;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    animation: fadeInTooltip 0.2s forwards;
}
.dot[data-title]:not([data-title=""]):hover::before {
    content: "";
    position: absolute;
    bottom: 90%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #2E3440 transparent transparent transparent;
    opacity: 0;
    animation: fadeInTooltip 0.2s forwards;
}

/* =========================================
   10. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 1000px) {
    .hero-split .hero-layout { flex-direction: column; align-items: center; }
    .hero-col { width: 100%; max-width: 600px; margin-bottom: 20px; height: auto; }
}

@media (max-width: 850px) {
    .nav-container { flex-direction: column; gap: 15px; }
    nav ul { gap: 15px; font-size: 0.9rem; }
    .project-slide { flex-direction: column; gap: 20px; }
    .slide-gallery, #games-carousel .slide-gallery { width: 100%; max-width: 100%; flex: none; margin-bottom: 15px; }
    .photo-viewer-main { max-width: 100%; }
    .slide-content, .slide-content-game { width: 100%; padding: 0 5px; }
    .slide-gallery .game-stats-grid { flex-wrap: wrap; }
    .slide-gallery .stat-box { min-width: 45%; margin-bottom: 5px; }
}

@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInTooltip { to { opacity: 1; bottom: 130%; } }

footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    background-color: var(--card-bg);
}
/* =========================================
   COMPACT PROFILE OVERRIDE
   ========================================= */

/* 1. Reduce padding inside the profile card */
.hero-profile {
    padding: 20px 15px !important; /* Less top/bottom padding */
}

/* 2. Smaller Profile Photo */
.profile-photo {
    width: 110px;  /* Reduced from 140px */
    height: 110px;
    margin-bottom: 10px; /* Pull text closer */
    border-width: 2px;   /* Thinner border */
}

/* 3. Tighter Name & Subtitle */
.hero-profile h1 {
    font-size: 1.5rem; /* Slightly smaller name */
    margin-bottom: 5px;
}

.hero-profile .subtitle {
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

/* 4. Tighter Social Buttons Area */
.social-links {
    margin-top: 10px;    /* Pull buttons up */
    margin-bottom: 10px; /* Pull email up */
    gap: 10px;
}

/* 5. Tighter Email Text */
.email-text {
    margin-top: 0; /* Reset margins */
    font-size: 0.85rem;
}

/* =========================================
   CV & EXPERIENCE PAGE STYLES
   ========================================= */

/* CV Item Wrapper */
.cv-item {
    margin-bottom: 20px;
}

/* Job/Degree Title */
.cv-item h3 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.15rem;
    color: var(--text-main);
    font-weight: 700;
}

/* Metadata (School, Date, Location) */
.cv-meta {
    font-size: 0.9rem;
    color: var(--accent); /* Theme Blue */
    font-weight: 600;
    margin-bottom: 12px;
}

/* Lists inside CV items */
.cv-item ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 10px;
}

.cv-item ul li {
    margin-bottom: 6px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Subtle divider between jobs */
hr.cv-divider {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 25px 0;
    opacity: 0.5;
}

/* Skills Grid Layout */
.skill-group {
    display: flex;
    align-items: baseline; /* Aligns text with badges */
    margin-bottom: 15px;
    flex-wrap: wrap; /* Allows wrapping on mobile */
    gap: 15px;
    border-bottom: 1px dashed #eee; /* Optional Guide Line */
    padding-bottom: 10px;
}

.skill-group:last-child {
    border-bottom: none;
}

.skill-label {
    min-width: 140px; /* Fixed width for labels align nicely */
    font-size: 0.95rem;
    color: var(--text-main);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

/* Simple List for Awards */
.cv-simple-list {
    list-style: none;
    padding: 0;
}

.cv-simple-list li {
    margin-bottom: 12px;
    color: var(--text-light);
    font-size: 0.95rem;
    display: flex;
    gap: 10px;
}

.cv-simple-list li::before {
    content: "🏆"; /* Emoji bullet or use FontAwesome */
    font-size: 0.8rem;
    margin-top: 3px;
}

/* Mobile Tweak for Skills */
@media (max-width: 600px) {
    .skill-group {
        flex-direction: column;
        gap: 8px;
    }
    .skill-label {
        min-width: auto;
    }
}

/* =========================================
   11. MOBILE VIEW TOGGLE (Add to bottom)
   ========================================= */

/* Default: Hide Mobile View, Show Desktop */
.mobile-view-container {
    display: none;
}
.desktop-view-container {
    display: block;
}

/* On Screens smaller than 900px */
@media (max-width: 900px) {
    .mobile-view-container {
        display: block;
    }
    .desktop-view-container {
        display: none; /* Completely removes desktop HTML from layout */
    }
    
    /* Adjust Hero for mobile */
    .hero-btn-group {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }
    .hero-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   12. NEW MOBILE CARD DESIGN
   ========================================= */
.mobile-project-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.mobile-media-wrapper {
    width: 100%;
    position: relative;
    background: #000;
}

.mobile-media-wrapper video,
.mobile-media-wrapper img,
.mobile-media-wrapper iframe {
    width: 100%;
    height: auto;
    display: block;
}

.mobile-card-content {
    padding: 20px;
}

.mobile-card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.mobile-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* =========================================
   FIX: REMOVE BLACK BACKGROUNDS
   ========================================= */

/* Desktop & General Media */
.slide-gallery video.main-media,
.slide-gallery iframe.main-media,
.slide-gallery img.main-media,
.photo-viewer-main img,
.photo-viewer-main,
.youtube-link-card {
    background-color: #f8f9fa !important; /* Changed from #000 to Light Gray */
    border-color: #eee !important;        /* Softer border */
}

/* Mobile Media Wrapper */
.mobile-media-wrapper {
    background-color: #f8f9fa !important; /* Changed from #000 */
    border-bottom: 1px solid #eee;
}

/* Optional: Ensure images cover the area nicely without distortion */
.mobile-media-wrapper img, 
.mobile-media-wrapper video {
    background-color: transparent; 
}

/* =========================================
   FIX: MOBILE SPACING & WIDTH
   ========================================= */
   @media (max-width: 600px) {
    
    /* 1. Expand Main Container */
    main {
        width: 100% !important;    /* Force full width */
        padding: 0 12px !important; /* Reduce outer padding (was 20px) */
        max-width: 100% !important;
    }

    /* 2. Expand Mobile Cards */
    .mobile-project-card {
        margin-bottom: 20px;
        border-radius: 6px; /* Slightly less rounded corners look wider */
    }

    /* 3. Reduce Card Internal Padding */
    .mobile-card-content {
        padding: 15px !important; /* Reduced from 20px */
    }

    /* 4. Make Text Fill the Space */
    .mobile-card-content p {
        font-size: 0.95rem; /* Ensure readable size */
        text-align: left;   /* Ensure text isn't centered weirdly */
    }

    /* 5. Adjust Hero Section for Mobile */
    .hero-section {
        padding: 1rem 0.5rem; /* Reduce hero padding */
    }
    
    .hero-section .container {
        width: 100%;
        padding: 0 10px;
    }
}

/* Find your existing .mobile-card-content h3 rule and update font-size to this: */
.mobile-card-content h3 {
    /* "clamp" takes 3 values: Minimum size, Preferred Size (viewport width), Max size */
    font-size: clamp(1.1rem, 5vw, 1.4rem); 
    margin-bottom: 10px;
    line-height: 1.3;
}
/* =========================================
   FIX: MOBILE BADGES & STATS SPACING
   ========================================= */
   @media (max-width: 600px) {

    /* 1. Fix Game Stat Boxes (The badges with icons) */
    .mobile-card-content .game-stats-grid {
        display: flex;
        flex-wrap: wrap;  /* Allow them to drop to the next line */
        gap: 8px;         /* Creates space between them vertically & horizontally */
        margin-bottom: 12px;
    }

    .mobile-card-content .stat-box {
        flex: 0 1 auto;   /* Stop them from stretching to fill the width */
        width: auto;      /* Let them be only as wide as the text inside */
        font-size: 0.8rem; /* Slightly smaller text for better fit */
        padding: 6px 10px;
    }

    /* 2. Fix Academic Badges (e.g., "Funded by Google") */
    .mobile-card-content .award-badge {
        display: inline-block;
        margin-bottom: 10px !important; /* Force space below the badge */
        margin-right: 0; /* Remove right margin since it's likely on its own line */
        width: fit-content; /* Don't stretch full width */
    }

    /* 3. Ensure Tags don't stick to descriptions */
    .mobile-card-content .tag {
        margin-bottom: 12px;
        display: inline-block;
    }
}
/* =========================================
   BEAUTIFIED CV STYLES (Add to bottom of CSS)
   ========================================= */

/* 1. Section Headers with Icons */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
}

.section-icon {
    font-size: 1.2rem;
    color: var(--accent);
    background: #eaf2fa;
    width: 36px;
    height: 36px;
    
    /* FIXED: Use inline-flex with !important to override FontAwesome defaults */
    display: inline-flex !important; 
    align-items: center;
    justify-content: center;
    
    border-radius: 8px;
    margin-right: 0; /* Ensure no extra spacing interferes */
}

.section-header h2 {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 1.4rem;
}

/* 2. The Timeline Layout */
.timeline-wrapper {
    position: relative;
    padding-left: 0;
}

/* Vertical Line */
.timeline-wrapper::before {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 0;
    left: 7px; /* Position of the line */
    width: 2px;
    background: #E5E9F0; /* Nord Light Gray */
    z-index: 0;
}

.cv-item {
    position: relative;
    padding-left: 35px; /* Space for the line/dots */
    margin-bottom: 30px;
}

/* The Dot on the timeline */
.cv-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid var(--accent);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.cv-item:hover::before {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(94, 129, 172, 0.2);
}

/* 3. Typography Hierarchy */
.cv-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.cv-content h3 {
    margin: 0 0 2px 0;
    font-size: 1.15rem;
    color: var(--text-main);
}

.cv-org {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.cv-org .loc {
    color: #9CA3AF;
    font-weight: 400;
    font-size: 0.9rem;
}

.cv-content ul {
    margin: 0;
    padding-left: 18px;
}

.cv-content ul li {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: var(--text-light);
}

/* 4. Highlight Item (for Incoming Role) */
.highlight-item {
    background: #f8fbff;
    padding: 15px 15px 15px 35px; /* Add padding inside */
    border-radius: 8px;
    border: 1px dashed var(--accent);
    margin-left: -10px; /* Pull back slightly to align */
}
.highlight-item .cv-item::before {
    left: 10px; /* Adjust dot position for padding */
}
/* CSS Nesting fix for compatibility */
.timeline-wrapper .highlight-item {
    margin-left: 0;
    padding-left: 35px;
    border: 1px dashed var(--accent);
    background: #fdfdfd;
}

.status-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 5px;
}
.status-badge.incoming {
    background: #ebcb8b; /* Nord Yellow */
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* 5. Badge Row */
.badge-row {
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
}

/* 6. Skills Grid Dashboard */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.skill-card {
    background: #f9fafb;
    border: 1px solid #E5E9F0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    background: #fff;
    border-color: var(--accent);
}

.skill-icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.skill-card h4 {
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: var(--text-main);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.skill-tags span {
    background: #fff;
    border: 1px solid #d8dee9;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .timeline-wrapper::before { left: 7px; }
    .cv-item { padding-left: 30px; }
    .cv-date { font-size: 0.8rem; }
    .skills-grid { grid-template-columns: 1fr; }
}