/* --- Visual Aesthetic: Architectural Luxury --- */
:root {
    --bg-void: #0A0A0A; 
    --text-pure: #F2F0E4; 
    --text-muted: #888888; 
    --bg-card: #141414; 
    --accent-gold: #D4AF37; 
    --accent-blue: #1E3D59; 
    --glass-border: rgba(212, 175, 55, 0.15); 
}

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

html, body { 
    background-color: var(--bg-void); 
    color: var(--text-pure); 
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important; /* Forces iOS Safari to respect boundaries */
    position: relative; 
    font-family: 'Josefin Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* --- Architectural Navbar --- */
.main-nav {
    position: fixed; top: 0; width: 100%; height: 80px; 
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%; z-index: 1000; 
    background: rgba(10, 10, 10, 0.8); 
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); 
    border-bottom: 1px solid var(--glass-border);
}
.nav-logo a { text-decoration: none; color: var(--text-pure); font-family: 'Marcellus', serif; font-size: 1.6rem; letter-spacing: 0.1em; text-transform: uppercase; z-index: 1002;}
.highlight { color: var(--accent-gold); }

/* Desktop Links */
.nav-links { display: flex; list-style: none; gap: 3rem; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-family: 'Marcellus', serif; font-size: 0.9rem; letter-spacing: 0.15em; transition: color 0.4s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent-gold); }

/* Mobile Menu Toggle (Hamburger) */
.menu-toggle { display: none; flex-direction: column; cursor: pointer; z-index: 1002; }
.bar { width: 25px; height: 3px; background-color: var(--text-pure); margin: 4px 0; transition: 0.4s; }

/* --- Typographic System --- */
.title, .heading-large, .project-title, h3, h4 { font-family: 'Marcellus', serif; letter-spacing: 0.05em; text-transform: uppercase; }
.title { font-size: 5rem; line-height: 1.1; margin-bottom: 1.5rem; }
.heading-large { font-size: 3.5rem; color: var(--text-pure); margin-bottom: 2rem; }
.description { font-size: 1.25rem; color: var(--text-muted); line-height: 1.6; max-width: 90%; font-weight: 300; }
.overline { font-family: 'Josefin Sans', sans-serif; font-size: 0.85rem; letter-spacing: 0.2em; color: var(--accent-gold); text-transform: uppercase; margin-bottom: 1rem; }
.tracking-extreme { letter-spacing: 0.3em; }

.gradient-gold {
    background: linear-gradient(to right, var(--text-pure), var(--accent-gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* --- Hero Section Constraints --- */
.pin-wrapper { position: relative; width: 100%; max-width: 100%; }
.scroll-sequence { height: 100vh; width: 100%; max-width: 100%; position: relative; overflow: hidden; background-color: var(--bg-void); }
#webgl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }.text-viewport { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none; }
.text-block { position: absolute; top: 50%; transform: translateY(-50%); left: 8%; width: 40%; display: flex; flex-direction: column; justify-content: center; }
.text-block-b { opacity: 0; pointer-events: none; }

/* --- Button Design System --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 32px; margin-top: 20px;
    font-family: 'Marcellus', serif; font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase;
    text-decoration: none; border-radius: 0px; cursor: pointer; pointer-events: auto;
    transition: all 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn:focus { outline: 2px solid var(--accent-gold); outline-offset: 2px; }

.btn-outline { background: transparent; border: 1px solid var(--accent-gold); color: var(--accent-gold); }
.btn-outline:hover { background: var(--accent-gold); color: var(--bg-void); box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); }

.btn-ghost { background: transparent; border: none; color: var(--text-pure); padding: 0; font-size: 1rem; border-bottom: 1px solid var(--accent-gold); }
.btn-ghost:hover { color: var(--accent-gold); padding-bottom: 5px; }

/* --- SECTION 1: Automatic 3D Carousel --- */
.carousel-section {
    min-height: 100vh; background-color: var(--bg-void); position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 100px 0; overflow: hidden; border-top: 1px solid rgba(255,255,255,0.02);
}
.carousel-header { text-align: center; margin-bottom: 40px; z-index: 10; }

.carousel-container { position: relative; width: 100%; height: 600px; perspective: 1500px; display: flex; justify-content: center; align-items: center; }

.carousel-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%); width: 60px; height: 60px;
    background: transparent; border: 1px solid var(--accent-gold); color: var(--accent-gold); font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 20; transition: all 0.3s ease; border-radius: 0;
}
.carousel-nav-btn:hover { background: var(--accent-gold); color: var(--bg-void); }
.prev-btn { left: 8%; } .next-btn { right: 8%; }

.carousel-item {
    position: absolute; width: 600px; height: auto;
    background: var(--bg-card); border: 1px solid var(--glass-border); padding: 40px; text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}
.project-title { font-size: 2.2rem; margin-bottom: 20px; color: var(--text-pure); }
.project-image-wrapper { width: 100%; height: 250px; background: #0A0A0A; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 20px; overflow: hidden; display: flex; align-items: center; justify-content: center;}
.project-image-wrapper img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: filter 0.5s; }
.carousel-item:hover .project-image-wrapper img { filter: grayscale(0%); }
.project-desc { font-size: 1rem; color: var(--text-muted); line-height: 1.6; }

.item-active { transform: translateX(0) scale(1) translateZ(0); opacity: 1; z-index: 10; filter: blur(0px); pointer-events: auto; }
.item-prev { transform: translateX(-60%) scale(0.7) translateZ(-200px); opacity: 0.2; z-index: 5; filter: blur(4px); pointer-events: none; }
.item-next { transform: translateX(60%) scale(0.7) translateZ(-200px); opacity: 0.2; z-index: 5; filter: blur(4px); pointer-events: none; }

/* --- SECTION 2: Data-Driven Bento Grid --- */
.bento-section { padding: 120px 8%; background-color: var(--bg-void); border-top: 1px solid rgba(255,255,255,0.02); }
.bento-header { text-align: left; margin-bottom: 60px; }
.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; grid-auto-rows: minmax(180px, auto); }
.bento-card { background: var(--bg-card); border: 1px solid var(--glass-border); position: relative; overflow: hidden; transition: border-color 0.4s, box-shadow 0.4s; }
.bento-card:hover { border-color: var(--accent-gold); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.card-inner { padding: 40px; height: 100%; width: 100%; display: flex; flex-direction: column; }
.card-large { grid-column: span 2; grid-row: span 2; }
.card-wide { grid-column: span 2; grid-row: span 1; }
.card-small { grid-column: span 1; grid-row: span 1; }
.flex-center { align-items: center; justify-content: center; text-align: center; }
.left-align-header { text-align: left; margin-bottom: 20px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px;}

.bento-card h4 { font-size: 1.1rem; color: var(--text-pure); margin-bottom: 5px; }
.sub-text { font-size: 0.9rem; color: var(--text-muted); }

/* SVG Icons Handling - Original Colors, Slight Shrink on Hover */
.icon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 10px; }
.icon-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }

/* REMOVED CSS FILTERS: SVGs will now show their true, original colors */
.bento-icon, .kinetic-icon { 
    width: 60px; height: 60px; margin-bottom: 15px; 
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.bento-card:hover .bento-icon, .kinetic-card:hover .kinetic-icon { 
    transform: scale(0.92); /* Subtle shrink effect */
}

.icon-item span { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* Competency List */
.competency-list { list-style: none; display: flex; flex-direction: column; gap: 15px; margin-top: 10px;}
.competency-list li { font-size: 1.1rem; color: var(--text-pure); display: flex; align-items: center; gap: 15px; }
.gold-bullet { width: 8px; height: 8px; background: var(--accent-gold); border-radius: 50%; box-shadow: 0 0 10px var(--accent-gold); }

/* Linguistics */
.linguistics-layout { display: flex; flex-direction: column; gap: 20px; margin-top: 10px;}
.lang-item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.lang-title { font-size: 1.2rem; color: var(--text-pure); }
.lang-level { font-size: 0.9rem; color: var(--accent-gold); text-transform: uppercase; letter-spacing: 0.1em; }

.section-footer-link { margin-top: 50px; text-align: center; }

/* --- SECTION 3: Foundation / About --- */
.foundation-section { padding: 120px 8%; background-color: var(--bg-void); border-top: 1px solid rgba(255,255,255,0.02); }
.foundation-header { text-align: center; margin-bottom: 80px; }
.foundation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.column-title { font-size: 1.5rem; color: var(--text-pure); margin-bottom: 40px; text-align: center; border-bottom: 1px solid var(--accent-gold); padding-bottom: 15px; }

/* Timeline */
.timeline { border-left: 2px solid var(--glass-border); padding-left: 30px; display: flex; flex-direction: column; gap: 40px; margin-left: 20px; }
.timeline-item { position: relative; }
.timeline-dot { position: absolute; left: -37px; top: 0; width: 12px; height: 12px; background: var(--accent-gold); border-radius: 50%; box-shadow: 0 0 10px var(--accent-gold); }
.timeline-date { font-family: 'Josefin Sans', sans-serif; font-size: 0.85rem; color: var(--accent-gold); margin-bottom: 5px; letter-spacing: 0.1em; font-weight: 600;}
.timeline-title { font-size: 1.3rem; color: var(--text-pure); margin-bottom: 5px; }
.timeline-desc { font-size: 1rem; color: var(--text-muted); }

/* Certificates */
.cert-list { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.cert-list li { background: var(--bg-card); padding: 25px; border: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 5px; transition: border-color 0.3s; }
.cert-list li:hover { border-color: var(--accent-gold); }
.cert-name { font-size: 1.2rem; color: var(--text-pure); font-family: 'Marcellus', serif; }
.cert-issuer { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* --- Footer --- */
.main-footer { background: #050505; padding: 60px 8%; text-align: center; border-top: 1px solid var(--glass-border); }
.footer-logo { font-family: 'Marcellus', serif; font-size: 2rem; color: var(--text-pure); margin-bottom: 25px; letter-spacing: 0.1em;}
.footer-links { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 30px; }
.footer-link { color: var(--text-muted); text-decoration: none; font-family: 'Marcellus', serif; letter-spacing: 0.15em; font-size: 0.9rem; transition: color 0.3s;}
.footer-link:hover { color: var(--accent-gold); }
.footer-divider { color: var(--glass-border); }
.footer-copyright { font-size: 0.9rem; color: var(--text-muted); font-weight: 300;}

/* ==========================================================================
   ABOUT PAGE: TIMELINE JOURNEY
   ========================================================================== */
.about-timeline-section {
    position: relative; max-width: 1200px; margin: 0 auto; padding: 50px 0;
}

/* The Central Lines */
.timeline-track-dark {
    position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
    background: rgba(255, 255, 255, 0.05); transform: translateX(-50%); z-index: 1;
}
.timeline-track-glow {
    position: absolute; left: 50%; top: 0; height: 0%; width: 2px;
    background: var(--accent-gold); box-shadow: 0 0 15px var(--accent-gold);
    transform: translateX(-50%); z-index: 2;
}

/* Timeline Rows & Nodes */
.timeline-row {
    position: relative; width: 100%; display: flex; justify-content: center; margin-bottom: 15vh;
}
.timeline-node {
    position: absolute; left: 50%; top: 50px; transform: translateX(-50%);
    width: 16px; height: 16px; border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%; background: var(--bg-void); z-index: 3;
    transition: all 0.4s ease;
}
.timeline-node.active-node {
    background: var(--accent-gold); border-color: var(--accent-gold);
    box-shadow: 0 0 20px var(--accent-gold);
}
.timeline-end-node {
    position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 24px; height: 24px; border: 2px solid var(--accent-gold);
    border-radius: 50%; background: var(--bg-void); z-index: 3;
    transition: all 0.5s ease;
}
.timeline-end-node.active-node {
    background: var(--accent-gold); box-shadow: 0 0 30px var(--accent-gold);
}

/* Timeline Cards */
.timeline-card { width: 45%; opacity: 0; }
.right-align { justify-content: flex-end; }
.right-align .timeline-card { margin-left: 55%; padding-left: 40px; }
.left-align { justify-content: flex-start; }
.left-align .timeline-card { margin-right: 55%; padding-right: 40px; text-align: right; }

.glass-card {
    background: rgba(20, 20, 20, 0.4); border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 40px; transition: border-color 0.5s ease;
}
.glass-card.active-card { border-color: rgba(212, 175, 55, 0.3); }

.timeline-title { font-size: 2rem; color: var(--text-pure); margin-bottom: 20px; }
.timeline-text { font-size: 1.1rem; color: var(--text-muted); line-height: 1.7; font-weight: 300; }

/* Kinetic Bullets */
.bullet-title { font-family: 'Josefin Sans', sans-serif; font-size: 1.2rem; color: var(--text-pure); margin-bottom: 10px; display: flex; align-items: center; gap: 10px;}
.left-align .bullet-title { justify-content: flex-end; }
.bullet-item { opacity: 0; } /* Handled by GSAP */

/* Let's Connect Section */
.about-contact-section {
    position: relative; padding: 150px 5% 100px 5%; text-align: center; overflow: hidden;
}
.contact-glow-backdrop {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 60vw; height: 60vw; border-radius: 50%;
    background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 60%);
    opacity: 0; z-index: 0; pointer-events: none; transition: opacity 1s ease;
}
.about-contact-section.active-glow .contact-glow-backdrop { opacity: 1; }
.contact-content { position: relative; z-index: 1; opacity: 0; }

.contact-links { display: flex; justify-content: center; align-items: center; gap: 30px; margin-top: 50px; }
.hover-lift-link {
    font-family: 'Marcellus', serif; font-size: 1.2rem; color: var(--accent-gold); text-decoration: none;
    letter-spacing: 0.15em; display: inline-block; transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hover-lift-link:hover { transform: translateY(-5px) scale(1.05); color: var(--text-pure); text-shadow: 0 10px 20px rgba(212, 175, 55, 0.4); }
.link-separator { color: var(--text-muted); font-family: 'Fira Code', monospace; }

/* ==========================================================================
   PROJECTS ARCHIVE PAGE
   ========================================================================== */
.projects-feed {
    padding: 40px 8% 120px 8%;
    display: flex;
    flex-direction: column;
    gap: 120px; /* Massive spacing between projects */
}

.project-showcase {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    width: 100%;
}

/* THE MAGIC: Every even project automatically flips its layout! */
.project-showcase:nth-child(even) {
    flex-direction: row-reverse;
}

/* Image Styling */
.showcase-image-wrapper {
    width: 55%;
    position: relative;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    overflow: hidden;
    /* Aspect ratio for sleek cinematic look */
    aspect-ratio: 16 / 10;
}

.showcase-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Hover effects */
.showcase-image-wrapper:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}
.showcase-image-wrapper:hover .image-overlay {
    opacity: 1;
}

/* Content Styling */
.showcase-info {
    width: 45%;
    display: flex;
    flex-direction: column;
}

.project-number {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.showcase-title {
    font-family: 'Marcellus', serif;
    font-size: 3rem;
    color: var(--text-pure);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.showcase-overview {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 300;
}

.mini-heading {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--text-pure);
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
}

.feature-list {
    list-style: none;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-list li {
    font-size: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    line-height: 1.5;
}
.feature-list li strong {
    color: var(--text-pure);
    font-weight: 600;
}

/* Gold bullet adjustment to sit cleanly next to multiline text */
.feature-list .gold-bullet {
    margin-top: 6px;
    flex-shrink: 0;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.tech-tags span {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    padding: 6px 12px;
    border: 1px solid var(--glass-border);
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.05);
}

.showcase-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: auto;
}

/* ==========================================================================
   PROJECT TIMELINE & GALLERY CAROUSEL
   ========================================================================== */

/* General Card Adjustments for Projects */
.project-card {
    padding: 50px; /* Slightly more padding for the larger cards */
}
.project-number {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--accent-gold);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

/* In-Card Gallery System */
.project-gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10; /* Perfect cinematic ratio */
    border: 1px solid var(--glass-border);
    background: #0A0A0A;
    overflow: hidden;
    margin: 25px 0;
}

.gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the box perfectly */
}

/* Navigation Buttons for the Gallery */
.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}
.gallery-btn:hover {
    background: var(--accent-gold);
    color: var(--bg-void);
}

.project-gallery .prev-btn { left: 10px; }
.project-gallery .next-btn { right: 10px; }

/* ==========================================================================
   INDIVIDUAL PROJECT DETAIL PAGE
   ========================================================================== */

/* --- Cinematic Image Gallery --- */
.cinematic-gallery-section {
    padding: 0 5%;
    display: flex;
    justify-content: center;
    margin-bottom: 80px;
}

.cinematic-slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16 / 9; /* Perfect widescreen ratio */
    background: #050505;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.slide-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0A0A0A;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery Navigation Buttons */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
.slider-nav-btn:hover {
    background: var(--accent-gold);
    color: var(--bg-void);
}
.prev-slide { left: 20px; }
.next-slide { right: 20px; }

/* Slide Indicators (Dots) */
.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.dot {
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}
.dot.active {
    background: var(--accent-gold);
    box-shadow: 0 0 10px var(--accent-gold);
}

/* --- Project Info Two-Column Grid --- */
.project-info-section {
    padding: 0 5%;
}

.project-info-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Left col is slightly narrower */
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-action-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.project-action-links .btn {
    margin-top: 0;
}


/* ==========================================================================
   PROJECT CARD CLICKABLE OVERLAY
   ========================================================================== */
.card-full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits above text, but below the gallery/buttons */
    cursor: pointer;
}

/* Premium lift effect when hovering over the card */
.timeline-card.project-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.timeline-card.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: var(--accent-gold);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS OVERHAUL
   ========================================================================== */

/* Tablet & Smaller Laptops */
@media (max-width: 1200px) {
    .bento-grid { grid-template-columns: repeat(3, 1fr); }
    .card-large { grid-column: span 3; }
    .text-block { width: 60%; }
}

@media (max-width: 992px) {
    .title { font-size: 4rem; }
    .carousel-item { width: 500px; }
    .foundation-grid { grid-template-columns: 1fr; gap: 80px; }
}

/* Mobile Devices */
@media (max-width: 768px) {
    /* Mobile Menu Implementation */
    .menu-toggle { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: rgba(10, 10, 10, 0.98); backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; align-items: center; gap: 40px;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1001;
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.5rem; }
    
    /* Hamburger Animation */
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Typographic & Layout Scaling */
    .title { font-size: 3rem; }
    .heading-large { font-size: 2.2rem; margin-bottom: 30px; text-align: center; }
    .description { font-size: 1rem; }
    .text-block { width: 85%; left: 7.5%; text-align: center; }
    
    /* Carousel Fixes */
    .carousel-section { padding: 80px 0; width: 100%; overflow: hidden; box-sizing: border-box; }
    .carousel-container { height: 500px; width: 100%; }
    
    /* Use % instead of vw to prevent horizontal bleed */
    .carousel-item { width: 90%; max-width: 380px; padding: 25px; box-sizing: border-box; }
    
    .project-image-wrapper { height: 180px; }
    .project-title { font-size: 1.8rem; }
    .carousel-nav-btn { width: 45px; height: 45px; font-size: 1.2rem; }
    .prev-btn { left: 2%; } .next-btn { right: 2%; }
    
    /* Bento Grid & Foundation Section Stack */
    .bento-section, .foundation-section { padding: 80px 5%; width: 100%; overflow: hidden; box-sizing: border-box; }
    
    /* Bento Grid Stack */
    .bento-header { text-align: center; }
    .bento-grid { grid-template-columns: 1fr; }
    .card-large, .card-wide, .card-small { grid-column: span 1; grid-row: auto; }
    .icon-grid { grid-template-columns: repeat(2, 1fr); gap: 20px;}
    
    /* Foundation fixes */
    .timeline { margin-left: 0; padding-left: 20px; }
    .timeline-dot { left: -27px; }
}

/* ==========================================================================
   SKILLS PAGE: THE CREDENTIAL DASHBOARD
   ========================================================================== */
.skills-section, .achievements-section, .vault-section {
    padding: 60px 8%;
    max-width: 1400px;
    margin: 0 auto;
}
.section-header { margin-bottom: 40px; border-bottom: 1px solid var(--glass-border); padding-bottom: 15px; }

/* --- SECTION 1: KINETIC BENTO GRID --- */
.kinetic-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 20px;
}
.kinetic-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: default;
}
.kinetic-card.card-wide { grid-column: span 2; }
.kinetic-card.card-square { grid-column: span 1; }

.kinetic-inner {
    padding: 30px; height: 100%; width: 100%;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; z-index: 2;
}
.kinetic-card.card-wide .kinetic-inner { flex-direction: row; align-items: center; justify-content: flex-start; gap: 30px; }

.kinetic-card h3 { font-family: 'Marcellus', serif; font-size: 1.4rem; color: var(--text-pure); margin-bottom: 8px; }
.kinetic-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }

.kinetic-icon { 
    width: 60px; 
    height: 60px; 
    /* Filter removed so original SVG colors show immediately */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.kinetic-icon-placeholder { font-family: 'Marcellus', serif; font-size: 2rem; color: var(--accent-gold); display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border: 1px solid var(--accent-gold); border-radius: 50%; margin-bottom: 15px;}

/* Hover Glow Effects applied via JS inline styles, but base transitions here */
.kinetic-card::before {
    content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, var(--hover-color, transparent) 0%, transparent 70%);
    opacity: 0; transition: opacity 0.5s ease; z-index: 1; pointer-events: none; mix-blend-mode: screen;
}
.kinetic-card:hover { border-color: var(--hover-color, var(--accent-gold)); transform: translateY(-5px); }
.kinetic-card:hover::before { opacity: 0.15; }

/* Changed from scale(1.1) to scale(0.92) to shrink slightly on hover */
.kinetic-card:hover .kinetic-icon { 
    transform: scale(0.92); 
}


/* --- SECTION 2: METRIC DATACARDS --- */
.datacard-container { display: flex; flex-direction: column; gap: 20px; }
.metric-datacard {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(20, 20, 20, 0.4); border: 1px solid var(--glass-border);
    padding: 30px 40px; transition: all 0.3s ease;
}
.metric-datacard:hover { background: rgba(30, 30, 30, 0.8); border-color: var(--accent-gold); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

.datacard-left { display: flex; align-items: center; gap: 20px; }
.datacard-target-icon { width: 12px; height: 12px; border: 2px solid var(--accent-gold); border-radius: 50%; position: relative; }
.datacard-target-icon::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 4px; height: 4px; background: var(--accent-gold); border-radius: 50%; }
.datacard-title { font-family: 'Josefin Sans', sans-serif; font-size: 1.3rem; color: var(--text-pure); font-weight: 600; letter-spacing: 0.05em; text-transform: none;}

.datacard-right { display: flex; align-items: center; gap: 30px; }
.datacard-date { font-family: 'Fira Code', monospace; font-size: 0.9rem; color: var(--text-muted); }
.verified-tag { font-family: 'Fira Code', monospace; font-size: 0.8rem; color: #00F0FF; text-shadow: 0 0 10px rgba(0, 240, 255, 0.4); }


/* --- SECTION 3: THE CREDENTIAL VAULT --- */
.vault-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.vault-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    aspect-ratio: 3 / 4; padding: 40px 30px;
    display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center;
    position: relative; overflow: hidden; transition: all 0.4s ease;
}
.vault-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(245, 255, 189, 0.7); border-color: #D4AF37; }

/* Sharp Cyan Border Trace */
.vault-border-trace {
    position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0;
    box-shadow: inset 0 0 20px rgba(246, 255, 197, 0.2); transition: opacity 0.4s ease;
}
.vault-card:hover .vault-border-trace { opacity: 1; }

.vault-issuer { font-family: 'Josefin Sans', sans-serif; font-size: 0.85rem; letter-spacing: 0.15em; color: var(--text-muted); position: relative; z-index: 2; }
.vault-title { font-family: 'Marcellus', serif; font-size: 1.8rem; color: var(--text-pure); position: relative; z-index: 2; line-height: 1.3; }
.vault-date { font-family: 'Fira Code', monospace; font-size: 0.8rem; color: var(--accent-gold); position: relative; z-index: 2; }

/* Vault Button Slide-Up */
.vault-btn {
    position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%);
    width: 80%; opacity: 0; transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); z-index: 3;
    background: #D4AF37; border-color: #d4c696; color: #0A0A0A; font-weight: 600;
}
.vault-btn:hover { background: #a0893d; box-shadow: 0 0 20px #a19468; }
.vault-card:hover .vault-date { opacity: 0; transform: translateY(-10px); transition: all 0.3s ease; }
.vault-card:hover .vault-btn { bottom: 30px; opacity: 1; }

/* ==========================================================================
   CONTACT PAGE: SPLIT-SCREEN LAYOUT
   ========================================================================== */
.contact-page-wrapper {
    padding-top: 120px;
    min-height: 85vh;
    background-color: var(--bg-void);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-split-container {
    display: flex;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 8%;
    gap: 80px;
}

.contact-left-col {
    width: 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-right-col {
    width: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Pill Links --- */
.contact-pills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.contact-pill-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 24px;
    border: 1px solid var(--glass-border);
    background: rgba(20, 20, 20, 0.4);
    color: var(--text-muted);
    font-family: 'Marcellus', serif;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-decoration: none;
    transition: all 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-pill-link:hover {
    color: var(--bg-void);
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

/* --- The Glassmorphism Form Card --- */
.form-glass-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 50px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    transition: box-shadow 0.5s ease;
}

/* Card highlight backlighting on submit button hover */
.form-glass-card:has(.submit-form-btn:hover) {
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.1), 0 30px 60px rgba(0, 0, 0, 0.6);
    border-color: rgba(212, 175, 55, 0.3);
}

/* --- Floating Input Systems (Pure CSS) --- */
.input-group {
    position: relative;
    margin-bottom: 35px;
    width: 100%;
}

.input-group input, 
.input-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    color: var(--text-pure);
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.1rem;
    transition: border-color 0.4s ease;
}

.input-group textarea {
    resize: none;
}

.input-group label {
    position: absolute;
    left: 0;
    top: 14px;
    color: var(--text-muted);
    font-family: 'Marcellus', serif;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Fix text area label baseline alignment */
.input-group:has(textarea) label {
    top: 14px;
}

/* Focused & Not-Empty Field Input Behaviors */
.input-group input:focus, 
.input-group textarea:focus {
    outline: none;
    border-bottom-color: var(--accent-gold);
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -12px;
    font-size: 0.75rem;
    color: var(--accent-gold);
    letter-spacing: 0.2em;
}

.form-action {
    display: flex;
    justify-content: flex-end;
}

.submit-form-btn {
    margin-top: 10px;
    width: auto;
    min-width: 200px;
}


/* ==========================================================================
   MOBILE RESPONSIVENESS OVERHAUL
   ========================================================================== */

@media (max-width: 1200px) {
    .bento-grid { grid-template-columns: repeat(3, 1fr); }
    .card-large { grid-column: span 3; }
}

@media (max-width: 992px) {
    .title { font-size: 4rem; }
    .carousel-item { width: 500px; }
    .foundation-grid { grid-template-columns: 1fr; gap: 80px; }
    
    /* About Timeline Tablet Fixes */
    .timeline-card { width: 42%; }
    .right-align .timeline-card { margin-left: 58%; padding-left: 20px;}
    .left-align .timeline-card { margin-right: 58%; padding-right: 20px;}
}

@media (max-width: 768px) {
    /* Mobile Menu */
    .menu-toggle { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: rgba(10, 10, 10, 0.98); backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; align-items: center; gap: 40px;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); z-index: 1001;
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.5rem; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Typographic & Layout Scaling */
    .title { font-size: 3rem; }
    .heading-large { font-size: 2.2rem; margin-bottom: 30px; text-align: center; }
    
    /* Carousel Fixes */
    .carousel-section { padding: 80px 0; width: 100%; overflow: hidden; box-sizing: border-box; }
    .carousel-container { height: 500px; width: 100%; }
    .carousel-item { width: 90%; max-width: 380px; padding: 25px; box-sizing: border-box; }
    .project-image-wrapper { height: 180px; }
    .project-title { font-size: 1.8rem; }
    .carousel-nav-btn { width: 45px; height: 45px; font-size: 1.2rem; }
    .prev-btn { left: 2%; } .next-btn { right: 2%; }
    
    /* Bento Grid Stack */
    .bento-section, .foundation-section { padding: 80px 5%; width: 100%; overflow: hidden; box-sizing: border-box; }
    .bento-header { text-align: center; }
    .bento-grid { grid-template-columns: 1fr; }
    .card-large, .card-wide, .card-small { grid-column: span 1; grid-row: auto; }
    .icon-grid { grid-template-columns: repeat(2, 1fr); gap: 20px;}
    
    /* Foundation fixes */
    .timeline { margin-left: 0; padding-left: 20px; }
    .timeline-dot { left: -27px; }

    /* --- ABOUT PAGE MOBILE TIMELINE --- */
    .timeline-track-dark, .timeline-track-glow { left: 20px; }
    .timeline-node { left: 20px; }
    .timeline-end-node { left: 20px; }
    
    .timeline-row { justify-content: flex-start; margin-bottom: 60px; }
    .timeline-card { width: 100%; opacity: 0; }
    
    /* Force everything to align left */
    .right-align .timeline-card, .left-align .timeline-card { 
        margin: 0; margin-left: 50px; padding: 20px; text-align: left; 
    }
    .left-align .bullet-title { justify-content: flex-start; }
    
    .about-contact-section { padding: 80px 5%; }
    .contact-links { flex-direction: column; gap: 20px; }
    .link-separator { display: none; }
}

/* --- PROJECTS PAGE MOBILE FIXES --- */
    .projects-feed { gap: 80px; padding: 20px 5% 80px 5%; }
    .project-showcase, .project-showcase:nth-child(even) { 
        flex-direction: column; gap: 30px; 
    }
    .showcase-image-wrapper { width: 100%; aspect-ratio: 4 / 3; }
    .showcase-info { width: 100%; }
    .showcase-title { font-size: 2.5rem; }
    .showcase-actions { flex-direction: column; align-items: flex-start; gap: 15px; }

/* --- SKILLS PAGE MOBILE FIXES --- */
    .kinetic-bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .kinetic-card.card-wide, .kinetic-card.card-square { grid-column: span 1; }
    .kinetic-card.card-wide .kinetic-inner { flex-direction: column; align-items: center; text-align: center; gap: 15px; }
    
    .metric-datacard { flex-direction: column; align-items: flex-start; gap: 20px; padding: 25px; }
    .datacard-right { width: 100%; justify-content: space-between; }
    
    .vault-grid { grid-template-columns: 1fr; }
    .vault-card { aspect-ratio: auto; height: 350px; }

    /* --- CONTACT PAGE MOBILE FIXES --- */
    .contact-split-container {
        flex-direction: column;
        gap: 50px;
        padding: 40px 5%;
    }
    .contact-left-col, .contact-right-col {
        width: 100%;
        text-align: center;
    }
    .contact-pills-wrapper {
        justify-content: center;
    }
    .form-glass-card {
        padding: 30px 20px;
    }
    .form-action {
        justify-content: center;
    }
    .submit-form-btn {
        width: 100%;
    }

/* --- PROJECT DETAIL MOBILE FIXES --- */
    .project-info-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .cinematic-slider {
        aspect-ratio: 4 / 3; /* Taller on mobile to see UI better */
    }
    .slider-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .prev-slide { left: 10px; }
    .next-slide { right: 10px; }
    .dot { width: 25px; }
    