:root {
    --bg-primary: #050505;
    --text-main: #FFFFFF;
    --text-muted: #A0AAB2;
    --accent: #FF9800;
    --accent-hover: #FFB347;
    --accent-light: rgba(255, 152, 0, 0.15);
    
    --radius-sm: 12px;
    --radius-md: 24px;
    --radius-pill: 50px;
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: clip; }
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: clip; /* clip instead of hidden allows sticky to trigger correctly */
    max-width: 100%;
    position: relative;
}

/* Background Effects */
/* --- Custom Cursor Removed --- */

.bg-blobs {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at center, #111 0%, #050505 100%);
}

.blob {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
    mix-blend-mode: screen;
}

.blob-1 { top: -10%; left: -10%; width: 600px; height: 600px; background: rgba(255, 152, 0, 0.15); }
.blob-2 { bottom: -20%; right: -10%; width: 700px; height: 700px; background: rgba(255, 70, 0, 0.15); animation-delay: -5s; animation-duration: 25s; }
.blob-3 { top: 40%; left: 50%; transform: translate(-50%, -50%); width: 500px; height: 500px; background: rgba(255, 180, 50, 0.1); animation-delay: -10s; animation-duration: 30s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(150px, 100px) scale(1.2) rotate(45deg); }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.accent-text { color: var(--accent); }
.accent-dot { color: var(--accent); }

.navbar, .hero, .section, .footer { width: 100%; }
.nav-container, .hero-container, .section-container, .footer-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.8rem 1.8rem; border-radius: var(--radius-pill);
    font-family: 'Sora', sans-serif; font-weight: 600; font-size: 1rem;
    text-decoration: none; transition: var(--transition); cursor: pointer;
    position: relative; overflow: hidden;
}

.btn-primary { background-color: var(--accent); color: #111; border: none; box-shadow: 0 4px 14px rgba(255, 152, 0, 0.3); }
.btn-primary:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(255, 152, 0, 0.5); background-color: var(--accent-hover); }
.btn-secondary { background-color: #080808; border: 1px solid #222; color: #FFFFFF; font-weight: 500; font-family: 'Poppins', sans-serif;}
.btn-secondary:hover { border-color: #555; background-color: #111; transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); }
.btn-outline { background-color: transparent; border: 1px solid var(--glass-border); color: var(--text-main); backdrop-filter: blur(10px); }
.btn-outline:hover { border-color: var(--accent); background-color: var(--accent-light); color: var(--accent); transform: translateY(-4px); }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; z-index: 1000; transition: var(--transition); padding: 1.5rem 0; background: transparent; }
.navbar.scrolled { background: rgba(5, 5, 5, 0.7); backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); padding: 0.8rem 0; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; color: var(--text-main); text-decoration: none; }
.nav-links { display: flex; list-style: none; gap: 2.5rem; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-family: 'Sora', sans-serif; font-weight: 500; font-size: 0.95rem; transition: var(--transition); position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.3s ease; }
.nav-links a:hover { color: var(--text-main); }
.nav-links a:hover::after { width: 100%; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-main); cursor: pointer; }

/* Hero Section */
.hero { padding-top: 180px; padding-bottom: 100px; min-height: 100vh; display: flex; align-items: center; }
.hero-container { display: flex; align-items: center; justify-content: space-between; gap: 4rem; width: 100%; max-width: 1200px; }
.hero-content { flex: 1.25; display: flex; flex-direction: column; justify-content: center; }
.hero-title { font-size: 3.8rem; line-height: 1.1; margin-bottom: 1.6rem; letter-spacing: -0.02em; white-space: nowrap; }
.hero-desc { font-size: 1.1rem; color: #b4bcc4; margin-bottom: 2.5rem; max-width: 640px; font-weight: 400; line-height: 1.7; font-family: 'Poppins', sans-serif; }
.hero-actions { display: flex; gap: 1rem; }
.hero-image-wrapper { flex: 0.9; position: relative; }
.hero-image { width: 100%; border-radius: 28px; box-shadow: 0 30px 60px rgba(0,0,0,0.8); object-fit: cover; z-index: 10; position: relative; border: 1px solid rgba(255,255,255,0.05); }
.glass-orb { position: absolute; border-radius: 50%; filter: blur(60px); z-index: 0; }
.orb-1 { width: 300px; height: 300px; background: rgba(255, 152, 0, 0.4); top: -10%; right: -10%; }
.orb-2 { width: 250px; height: 250px; background: rgba(100, 50, 0, 0.5); bottom: -10%; left: -10%; }

/* Sections General */
.section { padding: 120px 0; position: relative; }
.section-header { margin-bottom: 5rem; max-width: 600px; }
.section-header h2 { font-size: 3.5rem; margin-bottom: 1.2rem; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; font-weight: 300; }
.section-header.center { text-align: center; margin: 0 auto 5rem; }

/* Cards & Grid Containers */
.card { border-radius: var(--radius-md); padding: 3rem; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease; }
.card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 40px rgba(255, 152, 0, 0.1); border-color: rgba(255, 152, 0, 0.3); }

/* Skills Grid */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.skill-category h3 { margin-bottom: 2rem; font-size: 1.5rem; color: var(--text-main); border-bottom: 1px solid var(--glass-border); padding-bottom: 1rem; }
.skill-item { margin-bottom: 1.5rem; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 0.8rem; font-size: 0.95rem; font-weight: 500; font-family: 'Sora', sans-serif; }
.progress-bar { width: 100%; height: 6px; background-color: rgba(255,255,255,0.05); border-radius: var(--radius-pill); overflow: hidden; }
.progress { height: 100%; background: linear-gradient(90deg, var(--accent), #FFC107); border-radius: var(--radius-pill); width: 0; transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1); }

/* Experience Timeline */
.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, transparent, var(--accent), transparent); }
.timeline-item { position: relative; padding-left: 70px; margin-bottom: 3rem; }
.timeline-dot { position: absolute; left: 11px; top: 3rem; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-primary); border: 4px solid var(--accent); box-shadow: 0 0 15px var(--accent); z-index: 2; transition: transform 0.3s ease; }
.timeline-item:hover .timeline-dot { transform: scale(1.3); background: var(--accent); }
.timeline-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; flex-wrap: wrap; gap: 0.5rem; }
.timeline-header h3 { font-size: 1.5rem; color: var(--text-main); }
.badge-date { background: rgba(255, 152, 0, 0.1); color: var(--accent); border: 1px solid rgba(255, 152, 0, 0.2); font-size: 0.8rem; margin: 0; }
.company { color: var(--text-muted); font-weight: 500; font-family: 'Poppins', sans-serif; font-size: 1rem; margin-bottom: 1.2rem; }

/* Education Sections */
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }
.edu-card .card-icon { width: 60px; height: 60px; background: linear-gradient(135deg, rgba(255,152,0,0.2), rgba(255,152,0,0.05)); border: 1px solid rgba(255,152,0,0.2); color: var(--accent); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-bottom: 2rem; }
.edu-card h3 { margin-bottom: 2rem; font-size: 1.5rem; }
.styled-list { list-style: none; }
.styled-list li { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--glass-border); }
.styled-list li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.styled-list strong { display: block; color: var(--text-main); font-family: 'Sora', sans-serif; font-size: 1.1rem; margin-bottom: 0.3rem; }
.styled-list span { font-size: 0.95rem; color: var(--text-muted); font-weight: 300; }

/* Footer */
.footer { padding: 2rem 2rem 4rem; }
.footer-container { padding: 4rem; border-radius: var(--radius-md); position: relative; overflow: hidden; }
.footer-container::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 60%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 3rem; }
.footer-brand p { color: var(--text-muted); margin-top: 1rem; font-weight: 300; }
.footer-contact p { color: var(--text-muted); margin-bottom: 1rem; display: flex; align-items: center; gap: 1rem; font-weight: 300; word-break: break-all; }
.footer-contact i { color: var(--accent); }
.footer-bottom { text-align: center; color: var(--text-muted); font-size: 0.9rem; font-weight: 300; }

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: none; /* none instead of translateY(0) prevents a containing block hack that blocks sticky elements */ }

/* Responsive */
@media (max-width: 900px) {
    .hero-title { font-size: 3.2rem; white-space: normal; }
    .hero-container { flex-direction: column-reverse; text-align: center; }
    .hero-desc { margin: 0 auto 2rem; }
    .hero-actions { justify-content: center; }
    .section-header h2 { font-size: 3rem; }
    .hero { padding-top: 120px; }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .menu-toggle { display: block; }
    .timeline::before { left: 0; }
    .timeline-dot { left: -10px; }
    .timeline-item { padding-left: 30px; }
    .hero-title { font-size: 3rem; }
    .card { padding: 2rem; }
    .hero-actions { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; gap: 1rem; }
}

/* Epic Intro Animation */
.epic-intro-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 99999;
    background: #0d0d0d;
    display: flex; align-items: center; justify-content: center;
    animation: fadeOutIntro 0.8s ease forwards 8s;
    pointer-events: none;
}
@keyframes fadeOutIntro { to { opacity: 0; visibility: hidden; } }

.intro-layer {
    position: absolute;
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0;
}

/* 1. Code Layer */
.intro-code {
    background: transparent;
    opacity: 1; /* Starts visible */
    z-index: 3;
    animation: fadeOutLayer 0.5s ease forwards 4.5s;
    width: 90%; max-width: 650px; height: auto; border-radius: 16px; border: 1px solid #333; overflow: hidden;
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    box-shadow: 0 40px 80px rgba(0,0,0,0.8);
    background: #1e1e1e;
}

/* 2. Design Layer */
.intro-design {
    background: #1a1a1a;
    width: 100%; height: 100%; top: 0; left: 0;
    z-index: 2;
    animation: fadeInLayer 0.5s ease forwards 4.5s;
}

.intro-toolbar {
    position: absolute; left: 30px; top: 50%; transform: translateY(-50%); width: 60px;
    background: #2a2a2a; border-radius: 12px; padding: 20px 0;
    display: flex; flex-direction: column; align-items: center; gap: 25px; border: 1px solid #333; z-index: 5;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.intro-toolbar i { color: #888; font-size: 1.5rem; transition: color 0.3s ease; }
.intro-toolbar .active-tool { color: #888; animation: toolActivate 0.2s forwards 5.5s; }

.intro-canvas { width: 100%; height: 100%; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }

.intro-mock-cursor {
    position: absolute; top: 80%; left: 80%; z-index: 10;
    color: white; font-size: 2.5rem; filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.5));
    animation: cursorMoveIntro 2.5s cubic-bezier(0.25, 1, 0.5, 1) forwards 5.0s;
}

@keyframes cursorMoveIntro {
    0% { top: 80%; left: 80%; }
    40% { top: calc(50% - 25px); left: 50px; transform: scale(0.9); } /* approximate hit on the toolbar */
    50% { top: calc(50% - 25px); left: 50px; transform: scale(1); } 
    80% { top: 50%; left: 50%; transform: scale(0.9); } 
    100% { top: 50%; left: 50%; transform: scale(1); opacity: 0; }
}

@media (max-width: 768px) {
    .intro-code { width: 95%; max-width: 95%; }
    .intro-toolbar { left: 50%; top: auto; bottom: 40px; transform: translateX(-50%); flex-direction: row; width: auto; padding: 0 25px; height: 60px; }
    @keyframes cursorMoveIntro {
        0% { top: 80%; left: 80%; }
        40% { top: calc(100% - 55px); left: 50%; transform: scale(0.9) translate(-50%, 0); } 
        50% { top: calc(100% - 55px); left: 50%; transform: scale(1) translate(-50%, 0); } 
        80% { top: 50%; left: 50%; transform: scale(0.9); } 
        100% { top: 50%; left: 50%; transform: scale(1); opacity: 0; }
    }
}

/* Floating Tools Background */
.floating-tools {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: -1; overflow: hidden;
}
.float-tool {
    position: absolute;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20%;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.2);
    animation: floatTool 20s infinite linear;
}

.t-1 { top: 15%; left: 10%; font-size: 1.6rem; animation-duration: 45s; animation-delay: 0s; }
.t-2 { top: 60%; left: 85%; font-size: 1.8rem; animation-duration: 50s; animation-delay: -5s; animation-direction: reverse; color: rgba(255, 152, 0, 0.3); border-color: rgba(255, 152, 0, 0.1); }
.t-3 { top: 80%; left: 15%; font-size: 2rem; animation-duration: 55s; animation-delay: -10s; }
.t-4 { top: 30%; left: 80%; font-size: 1.4rem; animation-duration: 48s; animation-delay: -15s; color: rgba(255, 152, 0, 0.3); border-color: rgba(255, 152, 0, 0.1); }
.t-5 { top: 50%; left: 5%; font-size: 1.7rem; animation-duration: 52s; animation-delay: -20s; }
.t-6 { top: 10%; left: 60%; font-size: 1.3rem; animation-duration: 42s; animation-delay: -7s; color: rgba(255, 152, 0, 0.3); border-color: rgba(255, 152, 0, 0.1); }

@keyframes floatTool {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-70px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

/* Base intro components */
.window-header {
    height: 40px; background: #2d2d2d;
    display: flex; align-items: center; padding: 0 15px; gap: 8px;
    border-bottom: 1px solid #111;
}
.window-header .dot { width: 12px; height: 12px; border-radius: 50%; }
.window-header .red { background: #ff5f56; }
.window-header .yellow { background: #ffbd2e; }
.window-header .green { background: #27c93f; }
.window-header .filename { margin-left: auto; margin-right: auto; color: #888; font-family: monospace; font-size: 0.85rem; }

.code-content {
    padding: 24px; font-family: 'Courier New', Courier, monospace; font-size: 1.1rem; color: #d4d4d4;
    display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
@media (max-width: 600px) { .code-content { font-size: 0.85rem; padding: 15px; } }
.code-line {
    overflow: hidden; white-space: nowrap; border-right: 2px solid transparent; width: 0; height: 1.5em; line-height: 1.5em;
}
.typing-1 { animation: typing 1s steps(40, end) forwards 0.5s, blink-caret 0.5s step-end 2 0.5s; }
.typing-2 { animation: typing 1s steps(40, end) forwards 1.7s, blink-caret 0.5s step-end 2 1.7s; animation-delay: 1.7s; border-color: transparent; }
.typing-3 { animation: typing 1s steps(40, end) forwards 2.9s, blink-caret 0.5s step-end infinite 2.9s; animation-delay: 2.9s; border-color: transparent; }

@keyframes typing { from { width: 0; border-color: #d4d4d4; } to { width: 100%; border-color: #d4d4d4; } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: #d4d4d4; } }
@keyframes fadeOutLayer { to { opacity: 0; visibility: hidden; } }

.paint-splash {
    position: absolute; top: 50%; left: 50%; width: 0; padding-bottom: 0; height: 0;
    background: var(--accent); border-radius: 50%; transform: translate(-50%, -50%);
    animation: splashFill 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 7.2s;
}

@keyframes fadeInLayer { to { opacity: 1; } }
@keyframes splashFill { to { width: 300vh; padding-bottom: 300vh; border-radius: 0; } }
@keyframes toolActivate { to { color: var(--accent); } }

/* Hero image styling */
.hero-image.epic-image {
    animation: popInImage 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0; transform: scale(1.1);
}
@keyframes popInImage { to { opacity: 1; transform: scale(1); } }

/* Projects Page */
/* --- Spatial Portfolio Stage --- */
.projects-stage {
    perspective: 2500px;
    width: 100%;
    position: relative;
    padding: 60px 0;
    min-height: 650px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    position: relative;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}

/* --- Cinema Mode (Video) --- */
.projects-grid.mode-cinema {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 100px 5vw;
    gap: 3rem;
    align-items: center;
    scrollbar-width: thin; 
    scrollbar-color: var(--accent) transparent;
}
.projects-grid.mode-cinema::-webkit-scrollbar { height: 8px; }
.projects-grid.mode-cinema::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

.mode-cinema .project-card {
    min-width: 400px;
    height: 700px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s;
}

.mode-cinema .project-card:hover {
    transform: scale(1.02) translateY(-10px);
    box-shadow: 0 0 50px rgba(var(--accent-rgb), 0.3);
    z-index: 10;
}

/* --- Molecular Mode (Brand) --- */
.projects-grid.mode-molecular {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 100px;
    padding: 100px;
}

.mode-molecular .project-card {
    position: relative;
}

.mode-molecular .project-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 110%;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
}

.mode-molecular .project-card:nth-child(even)::before {
    left: auto;
    right: 110%;
    background: linear-gradient(-90deg, var(--accent), transparent);
}

/* --- Interactive Mechanics --- */
.projects-grid.mode-carousel {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 600px;
    gap: 0;
    transform-style: preserve-3d;
}

.projects-grid.mode-floating {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4rem;
    padding: 100px 5vw;
}

/* --- Card Experience Enhancements --- */
.project-card {
    padding: 0;
    overflow: visible; /* For 3D floating effect */
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: 28px;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-carousel .project-card {
    position: absolute;
    width: 400px;
    height: 540px;
    left: calc(50% - 200px);
    top: calc(50% - 270px);
    cursor: pointer;
    background: #0a0a0a; /* solid color avoids 3D backdrop-filter sorting glitches */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.mode-floating .project-card {
    width: 400px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.mode-floating .project-card:hover {
    transform: translateZ(50px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

.project-image {
    width: 100%;
    height: 320px;
    background: #0a0a0a;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 3rem;
    overflow: hidden;
    border-top-left-radius: 27px;
    border-top-right-radius: 27px;
}

.project-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-screenshot {
    transform: scale(1.05);
}

.project-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-category {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Sora', sans-serif;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--accent);
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    position: sticky;
    top: 100px;
    z-index: 900;
    background: rgba(5, 5, 5, 0.85);
    padding: 1rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.filter-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: var(--accent);
}

#lightbox-caption {
    margin-top: 20px;
    color: white;
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    text-align: center;
}

/* Lightbox Gallery Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000000;
}

.lightbox-nav:hover {
    background: var(--accent);
    color: #111;
}

.prev-btn { left: 40px; }
.next-btn { right: 40px; }

@media (max-width: 768px) {
    .lightbox-nav { width: 45px; height: 45px; font-size: 1.2rem; }
    .prev-btn { left: 15px; }
    .next-btn { right: 15px; }
}

/* --- Contact Modal --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999999;
    display: none;
    align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 3rem;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 20px; right: 25px;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover { color: var(--accent); }

.modal-title { font-size: 2.5rem; margin-bottom: 0.5rem; }
.modal-desc { color: var(--text-muted); margin-bottom: 2rem; font-weight: 300; font-size: 0.95rem; }

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.1);
}
.contact-form .full-width { width: 100%; justify-content: center; }

/* Advanced Mobile Adjustments for Portfolio Components */
@media (max-width: 768px) {
    /* Scale Carousel Radius and Cards */
    .mode-carousel .project-card {
        width: 280px;
        height: 440px;
        left: calc(50% - 140px);
        top: calc(50% - 220px);
    }
    
    /* Make preview images smaller on mobile to save space */
    .project-image {
        height: 220px;
    }
    
    /* Handle Floating Cards */
    .mode-floating .project-card {
        width: 90vw;
        max-width: 340px;
        margin: 0 auto;
    }
    
    /* Dedicated Cinema (Video) Slider for Mobile */
    .mode-cinema .project-card {
        flex: 0 0 85vw; /* Keeps cards from shrinking, builds a slider */
        max-width: 340px;
        scroll-snap-align: center;
        margin: 0;
    }
    
    /* Correct cinema grid scroller padding */
    .projects-grid.mode-cinema {
        padding: 20px 1rem 40px 1rem;
        gap: 1.5rem;
        scroll-snap-type: x mandatory; /* Makes sliding smooth */
    }
    
    /* Ensure Instagram embed fits */
    .project-video-embed {
        height: 350px !important;
    }
    
    /* Reorganize Molecular / Brand Systems */
    .projects-grid.mode-molecular {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 2rem 1rem;
    }
    
    /* Hide the connecting lines on mobile molecular to avoid horizontal scrolling */
    .mode-molecular .project-card::before {
        display: none;
    }
    
    /* Ensure stages have adequate padding on small screens */
    .projects-stage {
        padding: 20px 0;
        min-height: 500px;
    }
    
    .project-filters {
        gap: 0.5rem;
        top: 80px;
        padding: 0.8rem;
    }
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
}
