/* Global Variables & Reset */
:root {
    --bg-main: #1e1e1e;
    /* Dark Grey Background from image */
    --bg-dark: #0a0a0a;
    /* Almost Black */
    --bg-card: #252525;
    /* Dark Card Background */
    --bg-card-hover: #333333;
    /* Lighter on Hover */
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #333333;
    --accent: #ffffff;

    --font-main: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;

    --header-height: 400px;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Firefox Support */
html {
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

body {
    background-color: var(--bg-dark);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

body.no-scroll, html.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
}

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

ul {
    list-style: none;
}

/* Header / Hero Section */
header#hero {
    position: relative;
    height: 500px;
    /* Slightly taller for the grid */
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow: hidden;
}

.hero-container-inner {
    /* Tighter width removed, allowing full width for 2/3 1/3 split */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
    /* More breathing room on sides */
    height: 100%;
    position: relative;
    z-index: 2;
    /* Ensure content is above canvas */
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* 1.5 to 1 is roughly 60/40, user asked 2/3 1/3 (2fr 1fr) but let's see what fits the giant text best. 2fr 1fr might crowd the certs. Let's try 1.8fr 1fr */
    grid-template-columns: 2fr 1fr;
    align-items: center;
    gap: 2rem;
}

.hero-text {
    text-align: left;
    width: 100%;
}

.hero-name {
    font-size: 7rem;
    /* A LOT BIGGER */
    font-weight: 800;
    line-height: 0.85;
    text-transform: uppercase;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    letter-spacing: -2px;
    /* Tighten for impact */
}

.hero-name span {
    display: block;
}

.hero-name .lname {
    color: #666;
}

.hero-tagline {
    font-size: 1.2rem;
    font-weight: 400;
    color: #888;
    font-family: var(--font-code);
    max-width: 600px;
    /* Allow tagline to span wider */
    margin-left: 0.5rem;
}

/* Hero Cert Grid (Right Side - Transparent) */
.hero-stack-grid {
    text-align: left;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    justify-self: start;
    /* Align to start of its column */
    padding-left: 2rem;
    /* visual gap */
}

.hero-cert-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #888;
    /* Subtle grey title */
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: none;
    /* No border */
    padding-bottom: 0;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
    /* Increased opacity for standout */
}

/* Removed old centered content */

/* Layout Container */
.layout-container {
    display: block;
    /* Flexible for main content grid */
    min-height: calc(100vh - var(--header-height));
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
}

/* Right Sidebar Styles Deleted - Integrated into Hero */

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #888;
    margin-bottom: 1.5rem;
    letter-spacing: 1.5px;
    text-align: left;
    text-transform: uppercase;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
}

.cert-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns for a wider, shorter panel closer to "tab" shape? Or Stick to 3? 3x4 = 12 items. 4x3 = 12 items. 4 columns makes it wider "alongside". */
    gap: 0.8rem;
}

.cert-icon-badge {
    width: 50px;
    /* Bigger size */
    height: 50px;
    background: #222;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.cert-icon-badge:hover,
.cert-icon-badge.active {
    background: #333;
    color: #fff;
    border-color: #555;
    transform: scale(1.1);
    /* Pop effect */
}

/* Tooltip on Hover */
.cert-tooltip {
    position: absolute;
    bottom: 110%;
    /* Above the badge */
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #000;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cert-icon-badge:hover .cert-tooltip {
    opacity: 1;
}

.cert-icon-badge svg {
    width: 26px;
    /* Bigger icon */
    height: 26px;
}

/* Detail Panel (Pseudo-Dropdown) */
.cert-details-panel {
    margin-top: 1.5rem;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid #333;
    padding: 1.5rem;
    border-radius: 8px;
    display: none;
    /* Hidden by default */
    opacity: 0;
    transition: all 0.3s ease;
    width: 100%;
    /* Take full width of parent col */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.cert-details-panel.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInSlide 0.3s ease forwards;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

#detail-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-link-icon {
    color: var(--text-muted);
    transition: color 0.2s;
    width: 20px;
    height: 20px;
}

.detail-link-icon:hover {
    color: var(--accent);
}

#detail-desc {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
    font-weight: 300;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-container-inner {
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 0 1rem;
        gap: 3rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-name {
        font-size: 4rem;
        /* Smaller on mobile */
        align-items: center;
    }

    .hero-tagline {
        margin: 0 auto;
    }

    .hero-stack-grid {
        justify-self: center;
        padding-left: 0;
    }

    .cert-grid-compact {
        grid-template-columns: repeat(4, 1fr);
        /* Keep 4 or switch to 3/2 depending on width */
    }
}

/* Removed Hero Badges Styles */

/* Main Content Column - Free Layout Grid */
.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    /* 2 columns responsive */
    gap: 2rem;
    align-items: start;
}
/* Accordion Styles */
.accordion-section {
    border-bottom: none;
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10; /* Above background elements */
}

.accordion-section:hover {
    transform: translateY(-5px);
}

.accordion-section.active {
    z-index: 200; /* Higher than fixed footer (100) */
}

.accordion-header {
    background-color: transparent;
    color: var(--text-main);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.accordion-section.active .accordion-header {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.accordion-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.chevron {
    font-family: var(--font-code);
    font-weight: bold;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.accordion-section.active .chevron {
    transform: rotate(90deg);
    opacity: 1;
}

.accordion-content {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease, opacity 0.3s ease;
    background-color: var(--bg-main);
    opacity: 0;
    position: relative;
}

.accordion-section.active .accordion-content {
    height: 300px !important;
    max-height: 300px !important;
    opacity: 1;
    overflow-y: scroll !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    display: block;
    pointer-events: auto;
}

/* Content wrapper needs to be transparent to snapping */
.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0 100px 0; /* More bottom padding */
    width: 100%;
}

/* Card styles */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    width: calc(100% - 3rem);
    margin: 8px 1.5rem;
    min-height: 120px;
    height: auto;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.card.expanded {
    height: auto !important;
}

/* Compact view inside accordion */
.accordion-content .card {
    padding: 1.5rem;
    gap: 1.5rem;
}

.accordion-content .card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.accordion-content .card p {
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Scroll Prompt */
.scroll-prompt {
    position: sticky;
    bottom: 0.5rem;
    margin-left: auto;
    margin-right: 1.5rem;
    color: var(--accent);
    font-family: var(--font-code);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 10;
    animation: bounceUpDown 2s infinite;
    width: fit-content;
}

@keyframes bounceUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.card::before {
    /* Subtle overlay/gradient for depth */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: var(--bg-card-hover);
    z-index: 5;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    /* Rounded icons from reference */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.card-icon.small {
    width: 48px;
    height: 48px;
}

.card-icon svg {
    width: 50%;
    height: 50%;
}

.card-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.card-details {
    flex-grow: 1;
}

.card-details h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: #fff;
    font-weight: 700;
}

.card-details p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

/* Projects Specific */
.tags {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.tag {
    background: #000;
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    border-radius: 4px;
    /* Slightly rounded */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #333;
}

/* Tech Stack Specific */
.tech-card {
    flex-direction: column;
    align-items: flex-start;
}

.tech-category {
    margin-bottom: 1.5rem;
    width: 100%;
}

.tech-category:last-child {
    margin-bottom: 0;
}

.tech-category h4 {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.3rem;
}

.tech-category .tags {
    margin-bottom: 0;
    flex-wrap: wrap;
}

.actions {
    display: flex;
    gap: 1.5rem;
}

.btn-link {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
    color: #ccc;
    transition: all 0.2s;
}

.btn-link:hover {
    color: #fff;
    border-color: #fff;
}

/* Timeline (Experience) */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 2px solid #ddd;
    margin-left: 1rem;
    padding: 1rem 0 1rem 2rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2.4rem;
    /* Adjust based on padding/border */
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    border: 2px solid #fff;
}

.timeline-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.timeline-meta {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    font-family: var(--font-code);
}

.timeline-details {
    list-style: disc;
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
/* Footer */
footer {
    background-color: var(--bg-dark);
    color: #444;
    padding: 3rem 1.5rem;
    /* Revert to larger padding initially */
    text-align: center;
    border-top: 1px solid #222;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    /* Below sticky header */
    overflow: hidden;
    transition: all 0.3s ease;
}

footer.footer-shrink {
    padding: 0;
    height: 60px;
    /* Match header height */
    display: flex;
    align-items: center;
    justify-content: center;
}

footer.footer-shrink .footer-content {
    font-size: 1.2rem;
    /* Reduce text size slightly */
    gap: 1.5rem;
}

footer.footer-shrink .social-icons svg {
    width: 24px;
    /* Reduce icon size slightly */
    height: 24px;
}

footer.footer-shrink #footer-canvas {
    height: 200px;
    /* Prevent squashing, force crop */
    top: auto;
    bottom: 0;
}



#footer-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.5;
    /* Subtle background */
    pointer-events: none;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
    /* Above canvas */
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-icons a {
    color: #444;
    transition: all 0.3s;
    display: flex;
}

.social-icons svg {
    width: 32px;
    height: 32px;
}

.social-icons a:hover {
    color: #fff;
    transform: scale(1.2);
}

/* Add padding to body to prevent content being hidden behind valid footer */
body {
    padding-bottom: 200px;
    /* Approx height of footer */
}

/* Education Timeline & Progress */
.edu-progress-container {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.edu-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.edu-progress-fill {
    height: 100%;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.edu-progress-text {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    font-family: var(--font-code);
}

.education-card {
    cursor: pointer;
    flex-direction: column;
    align-items: stretch;
}

.education-card .card-icon {
    align-self: flex-start;
    margin-bottom: 1rem;
}

.education-timeline {
    margin-top: 2rem;
    border-top: 1px solid #333;
    padding-top: 1.5rem;
    animation: fadeIn 0.5s ease;
}

.education-timeline.hidden {
    display: none;
}

.edu-year h4 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--accent);
}

.module-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.module-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.module-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Sticky Header Styles */
body.header-fixed {
    padding-top: 400px;
    /* Match original header height */
}

header#hero.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    /* Much smaller height */
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
    /* Ensure crop */
}

header#hero.sticky-header #hero-canvas {
    height: 100vh;
    /* Maintain original full viewport height to prevent squashing */
    top: 0;
    opacity: 0.5;
    /* Optional: dim it slightly in header mode if desired, or keep as is */
}

header#hero.sticky-header .hero-container-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    grid-template-columns: none;
    /* Reset grid */
    gap: 1rem;
}

header#hero.sticky-header .hero-text {
    width: auto;
    flex-shrink: 0;
}

header#hero.sticky-header .hero-name {
    font-size: 1.5rem;
    margin-bottom: 0;
    flex-direction: row;
    gap: 0.5rem;
}

header#hero.sticky-header .hero-name .lname {
    color: #fff;
}

header#hero.sticky-header .hero-tagline {
    display: none;
}

header#hero.sticky-header .hero-cert-title {
    display: none;
}

header#hero.sticky-header .hero-stack-grid {
    padding-left: 0;
    width: auto;
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
    /* Critical for flex child scrolling */
}

header#hero.sticky-header .cert-grid-compact {
    display: flex;
    flex-direction: row;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.5rem;
    padding-bottom: 0;
    scrollbar-width: none;
    /* Firefox */
}

header#hero.sticky-header .cert-grid-compact::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

header#hero.sticky-header .cert-icon-badge {
    width: 40px;
    /* Small badges */
    height: 40px;
}

header#hero.sticky-header .cert-icon-badge svg {
    width: 20px;
    height: 20px;
}

header#hero.sticky-header .cert-tooltip {
    bottom: -150%;
    /* Show below in header mode? Or just hide? Let's hide for simplicity or nudge */
    top: 110%;
    bottom: auto;
}

header#hero.sticky-header #cert-details-panel {
    display: none !important;
    /* Force hide detail panel in sticky mode */
}

.module-code {
    font-family: var(--font-code);
    color: #888;
    width: 80px;
    flex-shrink: 0;
}

.module-name {
    flex-grow: 1;
    color: #ddd;
    padding-right: 1rem;
}

.module-status {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

.module-status.distinction {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.module-status.passed {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.module-status.pending {
    color: #999;
    background: rgba(153, 153, 153, 0.1);
    border: 1px solid rgba(153, 153, 153, 0.3);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
/* Responsive Styles */
@media (max-width: 900px) {

    /* Allow header to grow to fit stacked content on tablets/mobile */
    header#hero {
        height: auto;
        min-height: 500px;
        padding-bottom: 2rem;
    }

    /* FIX: When sticky, reset min-height to allow it to shrink */
    header#hero.sticky-header {
        min-height: 0 !important;
        height: 80px !important;
        /* Enforce sticky height */
        padding-bottom: 0;
    }

    .hero-container-inner {
        padding-top: 4rem;
        /* Add top padding since vertically centered might look off */
    }

    header#hero.sticky-header .hero-container-inner {
        padding-top: 0;
        /* Remove the extra top padding in sticky mode */
        align-items: center;
        /* Center horizontally again */
        display: flex;
        /* Ensure flex for sticky row layout */
    }
}

@media (max-width: 768px) {

    /* Fix Main Content Grid blowing out */
    .main-content {
        grid-template-columns: 1fr;
        /* Force single column matching device width */
    }

    .layout-container {
        padding: 1rem;
        /* Reduce side padding */
    }

    /* Hero Text Adjustments */
    .hero-name {
        font-size: 3.5rem;
        /* Readable but big */
    }

    .hero-tagline {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Adjust Cards */
    .card {
        flex-direction: column;
        /* Stack icon and text */
        text-align: center;
        padding: 1.5rem;
    }

    .card-icon {
        margin: 0 auto 1rem auto;
        /* Center icon */
    }

    .actions {
        justify-content: center;
        /* Center buttons */
    }

    .tags {
        justify-content: center;
        flex-wrap: wrap;
        /* Ensure tags wrap */
    }

    /* Timeline Adjustments */
    .timeline {
        margin-left: 0.5rem;
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.9rem;
        /* Re-align marker */
    }
}

@media (max-width: 480px) {

    /* Mobile Phones */
    .hero-name {
        font-size: 2.5rem;
    }

    .cert-grid-compact {
        grid-template-columns: repeat(3, 1fr);
        /* Reduce columns */
        gap: 0.5rem;
    }

    /* Footer Stack (Default State) */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        font-size: 1.1rem;
    }

    /* Sticky Footer Override */
    footer.footer-shrink .footer-content {
        flex-direction: row !important;
        /* Force row to fit inside 60px */
        gap: 1rem;
    }

    footer.footer-shrink .footer-content span {
        display: none;
        /* Hide "Connect with me" text in sticky footer to save space */
    }

    /* Sticky Header Tweaks for Mobile */
    header#hero.sticky-header .hero-name {
        font-size: 1rem;
        /* Smaller name on mobile sticky */
        white-space: nowrap;
    }

    header#hero.sticky-header .hero-container-inner {
        padding: 0 1rem;
        /* Tighter padding */
        gap: 0.5rem;
    }

    /* Module List in Education */
    .module-list {
        grid-template-columns: 1fr;
        /* Single column for modules */
    }

    .module-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .module-code {
        width: 100%;
        font-weight: bold;
    }
}
