/* ==========================================================================
   1. CORE VARIABLES, RESET, & GLOBAL LAYOUT
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #1a1c23;
    color: #e2e8f0;
    padding-bottom: 100px;
    width: 100%;
    overflow-x: hidden; /* Hard safety gate to stop horizontal scroll */
}

.main-layout-grid {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 60px;
    max-width: 1400px;
    margin: 50px auto 0 auto;
    padding: 0 4%;
    width: 100%;
}

.main-layout-grid-full {
    max-width: 1400px;
    margin: 50px auto 0 auto;
    padding: 0 4%;
    width: 100%;
}

.flex-center {
    display: flex;
    justify-content: center;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 35px;
    letter-spacing: 1px;
    padding-top: 20px;
}

/* ==========================================================================
   2. FLOATING NAVIGATION HEADER (Sticky Viewport Layer)
   ========================================================================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 55px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(70, 70, 92, 0.9);
    backdrop-filter: blur(10px);
    padding: 0 8%;
    border-bottom: 1px solid #1a1a24;
    z-index: 9999;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #ffffff;
}

.linkedin-icon {
    background-color: #e2e8f0;
    color: #050507;
    font-weight: 900;
    font-size: 0.75rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    text-decoration: none;
}

.nav-right {
    display: flex;
    gap: 40px;
}

.nav-item {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-item:hover {
    color: #ffffff;
}

.nav-item.active {
    color: #e11d48;
    border-bottom-color: #cc0000;
}

/* ==========================================================================
   3. HERO SECTION W/ 3-IMAGE COLLAGE BACKGROUND
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 550px;
    margin-top: 55px;
    padding: 40px 4%;
    border-bottom: 1px solid #1a1a24;
    overflow: hidden;
}

.hero-collage-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    z-index: 1;
}

.collage-pane {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.collage-pane:last-child {
    border-right: none;
}

.hero-pane-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    filter: brightness(0.7) contrast(1.05);
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 650px;
    pointer-events: auto;
}

.profile-frame {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px solid #334155;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-decoration: underline;
    text-decoration-color: white;
    text-underline-offset: 6px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 15px;
}

.hero-description {
    font-size: 1.05rem;
    color: #ffffff;
    line-height: 1.5;
}

.hero-description strong {
    color: #ffffff;
    font-weight: 600;
}

/* ==========================================================================
   4. VERTICAL PILLAR TRACK TIMELINE
   ========================================================================== */
.timeline-column {
    position: relative;
    width: 100%;
}

.vertical-timeline-wrapper {
    position: relative;
    height: 700px;
    width: 100%;
    margin-top: 10px;
}

.vertical-timeline-wrapper::after {
    content: "";
    position: absolute;
    left: 0;
    width: 200px;
    height: 100%;
    top: 0;
    pointer-events: none;
    z-index: 10;
    background: linear-gradient(
        to bottom,
        transparent 0px,
        transparent 250px,
        #1a1c23 250px, #1a1c23 260px,
        transparent 260px,
        transparent 340px,
        #1a1c23 340px, #1a1c23 350px,
        transparent 350px
    );
}

/* Date Guides */
.timeline-date-guide {
    position: absolute;
    left: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-align: right;
    width: 60px;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.guide-present      { top: 120px; }
.guide-summer-26   { top: 280px; }
.guide-summer-25   { top: 560px; }
.guide-high-school  { bottom: 20px; }

/* Pillars Base & Styles */
.pillar {
    position: absolute;
    width: 14px;
    border-radius: 3px;
}

.pillar-red   { background-color: #d32f2f; }
.pillar-blue  { background-color: #1976d2; }
.pillar-white { background-color: #ffffff; }
.pillar-slate { background-color: #475569; }
.pillar-amber { background-color: #d32f2f; }

/* Pillar Positions */
.pillar-1 { left: 80px; top: 20px; height: 550px; }
.pillar-2 { left: 102px; top: 80px; height: 490px; }
.pillar-3 { left: 124px; top: 150px; height: 420px; }
.pillar-mid-1 { left: 146px; top: 260px; height: 80px; }

.pillar-hs-1 { left: 80px; bottom: 10px; height: 100px; }
.pillar-hs-2 { left: 102px; bottom: 10px; height: 60px; }

/* Floating Logos */
.timeline-logos-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.logo-node {
    position: absolute;
    display: flex;
    align-items: center;
}

.timeline-logo {
    width: auto;
    object-fit: contain;
    display: block;
}

.node-ncsu   { top: 20px; left: 110px; }
.node-baja   { top: 85px; left: 132px; }
.node-camal  { top: 155px; left: 154px; }
.node-weldon { top: 280px; left: 176px; }
.node-ncssm  { bottom: 75px; left: 100px; }
.node-frc    { bottom: 30px; left: 130px; }

/* ==========================================================================
   5. SHOWCASE MATRICES & RESUME COMPONENTS
   ========================================================================== */
.showcase-column {
    max-width: 100%;
    overflow: hidden;
}

.matrix-grid-triple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.matrix-grid-triple.align-bottom {
    align-items: flex-end;
}

.project-matrix-card {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: transparent;
    border: 2px solid #1e293b;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.project-matrix-card:hover {
    border-color: #e11d48 !important;
}

.project-matrix-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    display: block;
}

.project-matrix-card:hover img {
    opacity: 0.9;
}

.card-title-overlay {
    position: absolute;
    bottom: 0;
    inset-x: 0;
    background: linear-gradient(to top, #0a0a0c 0%, rgba(10,10,12,0.6) 80%, transparent 100%);
    padding: 15px 12px 12px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
}

.tool-matrix-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.blueprint-frame {
    border: 2px solid #1e293b;
    background-color: transparent;
    padding: 10px;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.tool-matrix-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tool-meta h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.tool-meta p {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 500;
}

.resume-frame-wrapper {
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
}

.pdf-container-box {
    width: 100%;
    height: 500px;
    border: 1px dashed #2d3748;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: #64748b;
}

/* ==========================================================================
   6. INTERACTIVE HORIZONTAL CAROUSEL SYSTEM
   ========================================================================== */
.carousel-stage-container {
    width: 100%;
    overflow: hidden;
    background-color: transparent;
    border: 1px solid #161e2b;
    padding: 15px;
    position: relative;
    box-sizing: border-box;
}

.carousel-scroll-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    width: 100%;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.carousel-scroll-track::-webkit-scrollbar {
    display: none;
}

.carousel-card-item {
    flex: 0 0 calc(33.333% - 10px);
    min-width: 200px;
    scroll-snap-align: start;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.carousel-card-item:hover {
    transform: translateY(-2px);
}

.carousel-item-link {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.simple-footer {
    width: 100%;
    margin-top: 60px;
    padding: 25px 0 30px 0;
    border-top: 1px solid #2b2d35;
    text-align: center;
}

.simple-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

.footer-email {
    color: #e2e8f0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.footer-email:hover {
    color: #e11d48;
}

/* ==========================================================================
   8. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
    .main-layout-grid {
        display: flex;
        flex-direction: column-reverse;
        gap: 50px;
    }

    .matrix-grid-triple {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        padding: 0 4%;
    }

    .nav-right {
        gap: 20px;
    }

    .hero-section {
        height: 500px;
        padding: 30px 5%;
    }

    .hero-collage-bg {
        grid-template-columns: 1fr;
    }

    .collage-left, 
    .collage-right {
        display: none !important;
    }

    .collage-center {
        display: block !important;
        width: 100%;
        height: 100%;
        border-right: none;
    }

    .collage-center .hero-pane-img {
        object-fit: cover;
        object-position: center top;
    }

    .hero-overlay {
        display: none !important;
    }

    .matrix-grid-triple {
        grid-template-columns: 1fr;
    }

    .carousel-card-item {
        flex: 0 0 85% !important;
    }
}
/* ==========================================================================
   PROJECT PAGE LAYOUT & STICKY SKILLS SIDEBAR
   ========================================================================== */
.project-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 4% 0 4%; /* Top padding clears fixed nav */
}

/* Tighten the header container and force the border line up */
.project-header-section {
    margin-bottom: 0 !important;
    padding-bottom: 12px !important;
}

/* Remove default heading margins inside the project header */
.project-header-section h1,
.project-header-section .section-title {
    margin-bottom: 6px !important;
}

.project-header-section p {
    margin-bottom: 0 !important;
}

/* Pull the content grid line directly up against the header */
.project-content-grid {
    border-top: 1px solid #2b2d35;
    padding-top: 20px !important; /* Reduced from 35px to pull content closer */
    margin-top: 0 !important;
}

/* Sticky Skills Sidebar */
.skills-sidebar-container {
    position: sticky;
    top: 75px; /* Distance from top when floating down */
    padding-right: 30px;
    border-right: 1px solid #334155; /* Vertical line separator */
}

.skills-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: -0.3px;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-color: #64748b;
}

.skills-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
}

.skills-list li {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Right Main Content Area */
.project-main-body {
    min-height: 800px; /* Gives room to test the sticky scrolling */
    color: #cbd5e1;
    line-height: 1.7;
}

/* Responsive collapse for tablet/mobile */
@media (max-width: 868px) {
    .project-content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .skills-sidebar-container {
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid #334155;
        padding-right: 0;
        padding-bottom: 25px;
    }
}

/* ==========================================================================
   PROJECT PAGE STORY BLOCKS (Text + Photo Pairings)
   ========================================================================== */
.project-container {
    max-width: 1200px;
    margin: 50px auto 0 auto;
    padding: 0 4%;
}

.project-content-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 50px;
    margin-top: 40px;
}

.skills-sidebar-container {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.skills-heading {
    font-size: 0.85rem;
    color: #cc0000;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Individual Story Block Rows */
.project-main-body {
    display: flex;
    flex-direction: column;
    gap: 45px;
}

.project-story-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: center;
    background-color: #111318;
    border: 1px solid #1e293b;
    padding: 24px;
    border-radius: 15px;
}

/* Flips photo to the left on alternating rows */
.project-story-block.image-left {
    grid-template-areas: "img text";
}

.project-story-block.image-left .story-text {
    grid-area: text;
}

.project-story-block.image-left .story-image-frame {
    grid-area: img;
}

.story-text p {
    font-size: 0.98rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.story-signoff {
    display: block;
    margin-top: 10px;
    font-weight: 700;
    color: #cc0000;
}

/* Image Frame Container */
/* Universal image frame styling for project story blocks */


/* Forces both left and right block images to match completely */
.story-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents cropping */
    padding: 12px;       /* Keeps uniform inner spacing */
    box-sizing: border-box;
    border-radius: 15px;  /* Adds a subtle corner radius */
}

/* Responsive collapse for small screens */
/* Responsive collapse for small screens */
@media (max-width: 900px) {
    .project-content-grid {
        grid-template-columns: 1fr;
        gap: 25px; /* Tightens space between header, sidebar, and body */
    }
    
    /* Applied Skills Box - Mobile Tweaks */
    .skills-sidebar-container {
        position: static;           /* Removes sticky behavior on mobile */
        top: auto;
        padding-right: 0;
        border-right: none;         /* Removes vertical separator line */
        border-bottom: 1px solid #334155; /* Adds horizontal separator line instead */
        padding-bottom: 20px;
        
        /* Solid background styling */
        background-color: #1a1c23; 
        border: 1px solid #1e293b;
        padding: 16px 20px;
        border-radius: 8px;
    }
}

/* ==========================================================================
   VERTICAL CARDS WITH 3-PHOTO HORIZONTAL GALLERY
   ========================================================================== */
.project-story-block.vertical-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    padding: 24px;
}

/* Container for the 3 horizontal photos */
.story-gallery-frame {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
}

/* If the gallery has exactly 2 images, switch to a centered 2-column layout */
.story-gallery-frame:has(> .gallery-img:nth-last-child(2):first-child) {
    grid-template-columns: repeat(2, minmax(0, 350px));
    justify-content: center;
}

/* Individual gallery image styling */
.gallery-img {
    width: 100%;
    height: 180px;            /* Uniform height container */
    object-fit: contain;      /* Fits the entire image inside without cropping or zooming */
    background-color: #111318; /* Dark background behind non-square images */
    padding: 6px;             /* Breathing room around the uncropped image */
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid #2b2d35;
    transition: transform 0.2s ease-in-out;
}

.gallery-img:hover {
    transform: scale(1.02);   /* Subtle hover effect for visual pop */
}

.project-story-block.vertical-card .story-text {
    width: 100%;
    max-width: 700px;
}

.project-story-block.vertical-card .story-text p {
    font-size: 0.98rem;
    color: #cbd5e1;
}

/* Responsive adjustment for small/mobile screens */
@media (max-width: 768px) {
    .story-gallery-frame {
        grid-template-columns: 1fr; /* Stacks images vertically on small mobile screens */
    }
    
    .gallery-img {
        height: 220px;
    }

    /* Mobile reordering rules */
    .story-gallery-frame .gallery-img:nth-child(2) {
        order: 1; /* Middle image goes to the top */
    }

    .story-gallery-frame .gallery-img:nth-child(1) {
        order: 2; /* First image goes to the 2nd position */
    }

    .story-gallery-frame .gallery-img:nth-child(3) {
        order: 3; /* Third image stays at the bottom */
    }
}

/* ==========================================================================
   UNLIMITED PHOTO GALLERY (3-COLUMN GRID)
   ========================================================================== */
.scrapped-gallery-container {
    width: 100%;
    margin-top: 15px;
}

.scrapped-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
    gap: 16px; /* Spacing between photos */
    width: 100%;
}

.scrapped-gallery-item {
    aspect-ratio: 4 / 3; /* Keeps all photos uniform in shape */
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #2b2d35;
    background-color: #111319;
}

.scrapped-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crops image neatly into the frame without stretching */
    display: block;
    transition: transform 0.3s ease;
}

/* Subtle zoom effect on hover */
.scrapped-gallery-item:hover img {
    transform: scale(1.05);
}

/* Responsive: 2 columns on tablets, 1 column on mobile screens */
@media (max-width: 768px) {
    .scrapped-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .scrapped-gallery-grid {
        grid-template-columns: 1fr;
    }
}