/*
 * Consolidated CSS Architecture
 * Single source of truth for all styles
 * Created: 2025
 */

/* ========================================
   SECTION 1: FONT DECLARATIONS
   ======================================== */

/* Devil Breeze - Logo Font */
@font-face {
    font-family: 'Devil Breeze';
    src: url('../fonts/Logo/Devil Breeze Demi.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Poppins Font Family */
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Primary/Poppins-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Primary/Poppins-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Primary/Poppins-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Primary/Poppins-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Inter Font Family */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Secondary/Inter_24pt-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Secondary/Inter_28pt-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-variant: all-small-caps;
    font-display: swap;
}

@font-face {
    font-family: 'Inter Accent';
    src: url('../fonts/Secondary/Inter_28pt-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter Accent';
    src: url('../fonts/Secondary/Inter_28pt-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter Accent';
    src: url('../fonts/Secondary/Inter_28pt-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   SECTION 2: DESIGN TOKENS & VARIABLES
   ======================================== */

:root {
    /* Color Palette */
    --dark-bg: #08090a;
    --secondary-bg: #0a0a0f;
    --text-white: #ffffff;
    --text-muted: #a0a0a0;
    --accent-blue: #667eea;
    --accent-purple: #764ba2;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    --glass-gradient: linear-gradient(135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%);

    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-accent: 'Inter Accent', var(--font-secondary);
    --font-logo: 'Devil Breeze', var(--font-primary);

    /* Sizing */
    --max-width: 1200px;
    --header-height: 70px;

    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index Scale */
    --z-header: 100;
    --z-menu-toggle: 101;
    --z-modal: 1000;
    --z-dropdown: 50;

    /* Additional Missing Variables */
    --text-gray: #b0b0b0;
    --darker-bg: #0f1115;
    --border-radius: 12px;
    --cyan-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warm-gradient: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    --accent-warm: #ff6b6b;
    --accent-cyan: #4facfe;

    /* Common Opacity Values */
    --opacity-10: 0.1;
    --opacity-20: 0.2;
    --opacity-30: 0.3;
    --opacity-50: 0.5;
    --opacity-70: 0.7;
    --opacity-80: 0.8;
    --opacity-90: 0.9;
    --opacity-95: 0.95;

    /* Common RGBA Transparency Values */
    --white-10: rgba(255, 255, 255, 0.1);
    --white-15: rgba(255, 255, 255, 0.15);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-30: rgba(255, 255, 255, 0.3);
    --black-30: rgba(0, 0, 0, 0.3);
    --black-50: rgba(0, 0, 0, 0.5);
    --black-70: rgba(0, 0, 0, 0.7);
    --black-90: rgba(0, 0, 0, 0.9);
    --black-95: rgba(0, 0, 0, 0.95);

    /* Common Gradients */
    --gradient-warm-button: linear-gradient(145deg,
        rgba(255, 107, 107, 0.15) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.9) 70%,
        rgba(0, 0, 0, 0.95) 100%);
    --gradient-cool-button: linear-gradient(145deg,
        rgba(79, 172, 254, 0.15) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.9) 70%,
        rgba(0, 0, 0, 0.95) 100%);
    --gradient-blue-button: linear-gradient(145deg,
        rgba(102, 126, 234, 0.15) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.9) 70%,
        rgba(0, 0, 0, 0.95) 100%);

    /* Common Measurements */
    --border-width: 2px;
    --border-radius-pill: 50px;
    --blur-light: 10px;
    --blur-heavy: 20px;

    /* Common Box Shadows */
    --shadow-warm: 0 10px 30px rgba(255, 107, 107, 0.3);
    --shadow-cool: 0 10px 30px rgba(79, 172, 254, 0.3);
    --shadow-blue: 0 10px 25px rgba(102, 126, 234, 0.2);
    --shadow-dark: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ========================================
   SECTION 3: GLOBAL STYLES & RESET
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--text-white);
    text-decoration: none;
    transition: var(--transition);
}

a:hover, a:focus {
    color: var(--accent-blue);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

ul {
    list-style: none;
}

/* ========================================
   SECTION 4: LAYOUT COMPONENTS
   ======================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    width: 100%;
}

/* Homepage featured projects container */
#projects .container {
    max-width: 100%;
    padding: 0 2rem;
}

.main {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-blue);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0 0.5rem 0.5rem;
    z-index: 200;
    transition: var(--transition);
}

.skip-link:focus {
    top: 6px;
}

/* ========================================
   SECTION 5: HEADER & NAVIGATION
   ======================================== */

.header {
    background-color: var(--dark-bg);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: var(--z-header);
    backdrop-filter: blur(10px);
    height: var(--header-height);
}

/* Navigation Container - CSS Grid for 3 elements */
.nav-container {
    height: 100%;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}

/* Logo Styling */
.logo {
    font-family: var(--font-logo);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-white);
    text-decoration: none;
    letter-spacing: 2px;
    grid-column: 1;
    justify-self: start;
}

/* Menu Toggle (Mobile Hamburger) */
.menu-toggle {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: var(--z-menu-toggle);
    grid-column: 3;
    justify-self: end;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-white);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Hamburger Animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation Menu - Mobile First */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--dark-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    list-style: none;
    grid-column: 2;
}

.nav-menu.active {
    right: 0;
}

.nav-menu li {
    margin: 2rem 0;
}

.nav-menu a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--accent-blue);
    transform: translateY(-2px);
}

/* Placeholder for future language toggle */
.language-toggle-placeholder {
    grid-column: 3;
    justify-self: end;
    width: 60px; /* Reserve space */
    height: 30px;
    display: none; /* Hidden until implemented */
}

/* ========================================
   SECTION 6: RESPONSIVE DESIGN
   ======================================== */

/* Tablet and Desktop */
@media (min-width: 768px) {
    /* Header Layout for Desktop */
    .nav-container {
        padding: 0 2rem;
    }

    /* Hide hamburger menu on desktop */
    .menu-toggle {
        display: none;
    }

    /* Navigation Menu - Desktop Layout */
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: none;
        flex-direction: row;
        gap: 2rem;
        justify-self: center;
        align-self: end; /* Position at bottom of header */
        margin-bottom: 0.5rem;
    }

    .nav-menu li {
        margin: 0;
    }

    .nav-menu a {
        font-size: 1rem;
    }

    /* Show language toggle placeholder on desktop */
    .language-toggle-placeholder {
        display: block;
    }
}

/* Large Desktop */
@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* ========================================
   SECTION 7: HERO SECTION
   ======================================== */

.hero {
    background: #0a0a0f;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
    box-sizing: border-box;
    scroll-snap-align: start;
}

/* Subtle diagonal light gradient from top left */
.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse at top left,
        rgba(118, 75, 162, 0.35) 0%,
        rgba(118, 75, 162, 0.18) 35%,
        transparent 65%);
    z-index: 0;
    pointer-events: none;
}

/* Gradient overlay for smooth transition to next section */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30vh;
    background: linear-gradient(to top,
        #08090a 0%,
        rgba(8, 9, 10, 0.8) 20%,
        transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* Right edge light spill */
.hero-light-center {
    position: absolute;
    top: 50%;
    right: -10%;
    width: 40%;
    height: 60%;
    background: radial-gradient(ellipse at center right,
        rgba(102, 126, 234, 0.2) 0%,
        rgba(102, 126, 234, 0.1) 35%,
        transparent 65%);
    z-index: 0;
    pointer-events: none;
}

/* Particle canvas */
.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem 2.5rem;
    border-radius: 20px;
    background:
        radial-gradient(ellipse 200px 200px at bottom -40px left -30px,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.01) 40%,
            transparent 60%),
        rgba(10, 10, 15, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid transparent;
    box-shadow:
        inset 0 80px 60px -40px rgba(255, 255, 255, 0.03),
        inset 0 40px 30px -20px rgba(255, 255, 255, 0.02);
}

/* Purple gradient border on top-left corner */
.hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background:
        linear-gradient(135deg,
            rgba(118, 75, 162, 0.4) 0%,
            rgba(118, 75, 162, 0.3) 8%,
            rgba(118, 75, 162, 0.2) 15%,
            transparent 25%),
        linear-gradient(315deg,
            rgba(102, 126, 234, 0.4) 0%,
            rgba(102, 126, 234, 0.2) 8%,
            rgba(102, 126, 234, 0.1) 15%,
            transparent 25%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* Refraction layer */
.hero-content::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: -5px;
    bottom: -5px;
    background: rgba(10, 10, 15, 0.5);
    border-radius: 20px;
    z-index: -1;
    filter: blur(2px);
    opacity: 0.7;
}

.hero h1 {
    font-family: var(--font-primary);
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 100;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 2rem;
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

.cta-button {
    font-family: var(--font-primary);
    display: inline-block;
    position: relative;
    z-index: 2;
    background:
        linear-gradient(145deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(0, 0, 0, 0.65) 30%,
            rgba(0, 0, 0, 0.75) 70%,
            rgba(0, 0, 0, 0.85) 100%),
        linear-gradient(90deg,
            rgba(42, 76, 231, 0.35) 0%,
            rgba(149, 91, 207, 0.55) 100%);
    color: var(--text-white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    box-shadow: 0 0 0 2px transparent;
    overflow: hidden;
}

/* Gradient border */
.cta-button::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 52px;
    padding: 2px;
    background: linear-gradient(90deg,
        rgba(102, 126, 234, 0.5) 0%,
        rgba(118, 75, 162, 0.5) 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
}

/* Hover overlay */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: var(--transition);
    border-radius: 50px;
    z-index: 0;
}

.cta-button:hover::before,
.cta-button:focus::before {
    opacity: 1;
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    color: var(--text-white); /* Ensure text stays white */
}

/* Hero section button specific hover - purple/blue glow */
.hero .cta-button:hover,
.hero .cta-button:focus {
    box-shadow: 0 10px 30px rgba(118, 75, 162, 0.3),
                0 0 40px rgba(102, 126, 234, 0.2);
    border-color: rgba(118, 75, 162, 0.6);
}

/* ========================================
   SECTION 8: SECTIONS & COMPONENTS
   ======================================== */

/* General Section Styles */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--dark-bg);
    padding: 80px 1rem 40px;
    box-sizing: border-box;
    scroll-snap-align: start;
}

/* Page-specific section styles */
.section.skills-section,
.section.links-section {
    min-height: auto;
    padding: 2rem 1rem;
}

.section.projects-section {
    min-height: auto;
    padding: 2rem 1rem;
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

/* About Section */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.profile-image {
    width: 200px;
    height: 200px;
    min-width: 200px;
    min-height: 200px;
    border-radius: 50%;
    flex-shrink: 0;
    aspect-ratio: 1/1;
    background: var(--primary-gradient);
    position: relative;
}

.profile-image img {
    position: absolute;
    inset: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.about-text {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    grid-template-columns: 1fr;
}

.project-card {
    border-radius: 10px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.2rem;
    font-weight: 400;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 150px;
    background-color: var(--dark-bg);
    border: 2px solid rgba(255, 107, 107, 0.3);
}

.project-card img {
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

/* Project overlay */
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg,
        rgba(255, 107, 107, 0.08) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.15) 70%,
        rgba(0, 0, 0, 0.2) 100%);
    backdrop-filter: blur(0.5px);
    z-index: 1;
    pointer-events: none;
}

/* Flash animation */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%);
    transform: translateX(-100%);
    transition: var(--transition);
    z-index: 2;
}

.project-card:hover::before {
    transform: translateX(100%);
}

.project-card:hover {
    border-color: rgba(255, 107, 107, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-card span {
    position: relative;
    z-index: 3;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-white);
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.9),
        -1px -1px 3px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.project-card:hover span {
    opacity: 1;
    transform: translateY(0);
}

/* Projects CTA */
.projects-cta-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding: 0 1rem;
}

.projects-cta-button {
    background: linear-gradient(145deg,
        rgba(255, 107, 107, 0.15) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.9) 70%,
        rgba(0, 0, 0, 0.95) 100%);
    border: 2px solid rgba(255, 107, 107, 0.4);
    backdrop-filter: blur(10px);
    min-width: 200px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
}

.projects-cta-button:hover,
.projects-cta-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3),
                0 0 40px rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.6);
    color: var(--text-white); /* Ensure text stays white */
}

/* Projects Page Specific Styles */
.projects-page {
    min-height: 100vh;
    padding-top: var(--header-height);
}

.projects-grid-section {
    padding: 2rem 0;
}

/* Project Filters */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 0 1rem 2rem;
    position: relative;
}

/* Orange separator line below filters */
.project-filters::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 107, 107, 0.3) 20%,
        rgba(255, 107, 107, 0.5) 50%,
        rgba(255, 107, 107, 0.3) 80%,
        transparent 100%);
}

.filter-btn {
    background: linear-gradient(145deg,
        rgba(176, 176, 176, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.5) 100%);
    color: var(--text-gray);
    border: 2px solid rgba(176, 176, 176, 0.3);
    padding: 0.75rem 1.75rem;
    border-radius: 50px; /* More rounded like other buttons */
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: var(--transition);
    border-radius: 50px;
}

.filter-btn:hover::before,
.filter-btn:focus::before {
    opacity: 1;
}

.filter-btn:hover,
.filter-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.25),
                0 0 40px rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.5);
    color: var(--text-white);
    outline: none;
}

.filter-btn.active {
    background: linear-gradient(145deg,
        rgba(255, 107, 107, 0.15) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.9) 70%,
        rgba(0, 0, 0, 0.95) 100%);
    color: var(--text-white);
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.25),
                inset 0 0 20px rgba(255, 107, 107, 0.1);
}

/* Skills & Links */
.skills-links-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.skills-links-buttons .cta-button {
    min-width: 200px;
    text-align: center;
    background: linear-gradient(145deg,
        rgba(79, 172, 254, 0.15) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.9) 70%,
        rgba(0, 0, 0, 0.95) 100%);
    border: 2px solid rgba(79, 172, 254, 0.4);
}

.skills-links-buttons .cta-button:hover,
.skills-links-buttons .cta-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3),
                0 0 40px rgba(79, 172, 254, 0.2);
    border-color: rgba(79, 172, 254, 0.6);
    color: var(--text-white); /* Ensure text stays white */
}

/* Skills Page Specific Styles */
.skills-page {
    padding-top: var(--header-height);
}

/* Override section styles for skills page to reduce vertical spacing */
.skills-page .section {
    min-height: auto;
    padding: 3rem 1rem;
}

/* First section (Skills & Expertise title) - minimal top padding */
.skills-page .section:first-of-type {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
}

/* Technical Skills section */
.skills-page .section:nth-of-type(2) {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Professional Services section */
.skills-page .section:nth-of-type(3) {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}

/* Ready to Work Together section - compact spacing */
.skills-page .section:last-of-type {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Reduce section title margins on skills page */
.skills-page .section-title {
    margin-bottom: 2rem;
}

/* Mobile adjustments for skills page */
@media (max-width: 768px) {
    .skills-page .section {
        padding: 2rem 1rem;
    }

    .skills-page .section:first-of-type {
        padding-top: 1.5rem;
        padding-bottom: 1rem;
    }

    .skills-page .section-title {
        margin-bottom: 1.5rem;
    }
}

/* Override section styles for links page to reduce vertical spacing */
.links-page .section {
    min-height: auto;
    padding: 3rem 1rem;
}

/* First section (intro) - override inline style with important */
.links-page .section:first-of-type {
    padding-top: 2rem !important;
    padding-bottom: 1.5rem;
}

/* Professional Links section */
.links-page .section:nth-of-type(2) {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}

/* Downloadable Resources section */
.links-page .section:nth-of-type(3) {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Reduce section title margins on links page */
.links-page .section-title {
    margin-bottom: 2rem;
}

/* Mobile adjustments for links page */
@media (max-width: 768px) {
    .links-page .section {
        padding: 2rem 1rem;
    }

    .links-page .section:first-of-type {
        padding-top: 1.5rem !important;
        padding-bottom: 1rem;
    }

    .links-page .section-title {
        margin-bottom: 1.5rem;
    }
}

.skills-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 0.5rem;
    padding: 0 1rem;
}

.skills-intro p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.skills-categories {
    display: grid;
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.skill-category {
    background: linear-gradient(145deg,
        rgba(102, 126, 234, 0.1) 0%,
        rgba(0, 0, 0, 0.4) 30%,
        rgba(0, 0, 0, 0.6) 70%,
        rgba(0, 0, 0, 0.8) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px solid rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
}

.skill-category h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-white);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-items {
    display: grid;
    gap: 1.25rem;
}

.skill-item {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.25rem;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.skill-name {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-white);
}

.skill-level {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-weight: 400;
}

.skill-bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--cyan-gradient);
    border-radius: 3px;
    position: relative;
    animation: fillSkill 1.5s ease-out forwards;
}

@keyframes fillSkill {
    from {
        width: 0 !important;
    }
}

/* Professional Services Grid */
.services-grid {
    display: grid;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.service-card {
    background: linear-gradient(145deg,
        rgba(79, 172, 254, 0.15) 0%,
        rgba(0, 0, 0, 0.4) 30%,
        rgba(0, 0, 0, 0.6) 70%,
        rgba(0, 0, 0, 0.8) 100%);
    padding: 2.5rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid rgba(79, 172, 254, 0.3);
    backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.05) 100%);
    transform: translateX(-100%);
    transition: var(--transition);
}

.service-card:hover::before {
    transform: translateX(100%);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(79, 172, 254, 0.3);
    border-color: rgba(79, 172, 254, 0.5);
}

.service-icon {
    margin-bottom: 1.5rem;
    display: block;
}

.service-icon img {
    width: 60px;
    height: 60px;
    display: block;
    margin: 0 auto;
    /* Preserve original colors with slight enhancement */
    filter: brightness(1.1) contrast(1.05);
    opacity: 1;
    transition: var(--transition);
}

.service-card:hover .service-icon img {
    filter: brightness(1.2) contrast(1.1);
    opacity: 1;
    transform: scale(1.1);
}

.service-card h3 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-white);
    font-weight: 500;
}

.service-card p {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.back-to-home {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

.back-to-home h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-white);
    font-weight: 300;
}

.back-to-home p {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Links Page Specific Styles */
.links-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.links-intro {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 3rem;
}

.links-grid {
    display: grid;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.link-category {
    background: linear-gradient(145deg,
        rgba(102, 126, 234, 0.1) 0%,
        rgba(0, 0, 0, 0.4) 30%,
        rgba(0, 0, 0, 0.6) 70%,
        rgba(0, 0, 0, 0.8) 100%);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 2px solid rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.link-category h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-white);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.link-list li {
    margin-bottom: 1.2rem;
}

.link-list li:last-child {
    margin-bottom: 0;
}

.link-list a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-block;
    position: relative;
    padding-bottom: 2px;
}

.link-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cyan-gradient);
    transition: var(--transition);
}

.link-list a:hover::after,
.link-list a:focus::after {
    width: 100%;
}

.link-list a:hover,
.link-list a:focus {
    color: var(--text-white);
    transform: translateX(5px);
}

.placeholder-link {
    color: #888;
    font-style: italic;
    display: inline-block;
    padding-bottom: 2px;
    font-family: var(--font-secondary);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    line-height: 1.6;
}

/* Downloadable Resources Section */
.download-links {
    display: grid;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.download-item {
    background: var(--cyan-gradient);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(79, 172, 254, 0.3);
}

.download-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.download-item * {
    position: relative;
    z-index: 2;
}

.download-item h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-white);
    font-weight: 500;
}

.download-item p {
    font-family: var(--font-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.download-item .cta-button {
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(0, 0, 0, 0.3) 30%,
        rgba(0, 0, 0, 0.5) 70%,
        rgba(0, 0, 0, 0.7) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.download-item .cta-button:hover {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3),
                0 0 30px rgba(79, 172, 254, 0.2);
    transform: translateY(-2px);
    color: var(--text-white); /* Ensure text stays white */
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #b0b0b0;
    padding: 2rem;
    border-radius: 10px;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-family: var(--font-primary);
    display: block;
    margin-bottom: 0.5rem;
    color: #000000;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    font-family: var(--font-secondary);
    width: 100%;
    padding: 0.75rem;
    border: 2px solid transparent;
    border-radius: 6px;
    background-color: var(--text-white);
    color: #000;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-button {
    font-family: var(--font-primary);
    background: linear-gradient(145deg,
        rgba(102, 126, 234, 0.15) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.9) 70%,
        rgba(0, 0, 0, 0.95) 100%);
    color: var(--text-white);
    padding: 1rem 2rem;
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.6);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
}

.social-link {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg,
        rgba(102, 126, 234, 0.15) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.9) 70%,
        rgba(0, 0, 0, 0.95) 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    text-decoration: none;
    font-size: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.social-link img {
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 2;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    z-index: calc(var(--z-modal) + 1);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: linear-gradient(145deg,
        rgba(15, 15, 25, 0.98) 0%,
        rgba(25, 25, 40, 0.95) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 20px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.modal-video {
    width: 100%;
    height: auto;
    max-height: calc(90vh - 60px);
    border-radius: 10px;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ========================================
   SECTION 9: PROJECT PAGES
   ======================================== */

/* Project Hero Section */
.project-hero {
    background:
        /* Orange separator line at bottom */
        linear-gradient(90deg,
            transparent 0%,
            rgba(255, 107, 107, 0.3) 20%,
            rgba(255, 107, 107, 0.5) 50%,
            rgba(255, 107, 107, 0.3) 80%,
            transparent 100%)
        bottom center / 90% 1px no-repeat,
        /* Dark background */
        var(--dark-bg);
    padding: 4rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Orange gradient layer - curved light leak at top */
.project-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Arc glow from top - subtle, understated */
    background: radial-gradient(
        ellipse 80% 100% at 50% 0%,
        rgba(255, 107, 107, 0.55) 0%,
        rgba(255, 107, 107, 0.28) 15%,
        rgba(255, 107, 107, 0.12) 35%,
        rgba(255, 107, 107, 0.04) 55%,
        rgba(255, 107, 107, 0.01) 75%,
        transparent 100%
    );
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
}

/* Yellow gradient layer - curved light leak at bottom */
.project-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Arc glow from bottom - smaller with very gradual fade */
    background: radial-gradient(
        ellipse 50% 80% at 50% 100%,
        rgba(254, 202, 87, 0.55) 0%,
        rgba(254, 202, 87, 0.42) 10%,
        rgba(254, 202, 87, 0.3) 25%,
        rgba(254, 202, 87, 0.2) 40%,
        rgba(254, 202, 87, 0.12) 55%,
        rgba(254, 202, 87, 0.06) 70%,
        rgba(254, 202, 87, 0.02) 85%,
        transparent 100%
    );
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
}

.project-hero .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.project-hero h1 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.project-media {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

/* Project Details Section */
.project-details {
    background-color: var(--dark-bg);
    padding: 4rem 0 1rem 0;
}

.project-info-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

.project-description {
    color: var(--text-white);
}

.project-description h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

.project-description h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 400;
    margin: 2rem 0 1rem;
    color: var(--text-white);
}

.project-description p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.project-description ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.project-description ul li {
    font-family: var(--font-body);
    color: var(--text-muted);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.project-description ul li:before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
}

/* Project Meta Info Box */
.project-meta {
    background: linear-gradient(145deg,
        rgba(200, 200, 200, 0.95) 0%,
        rgba(220, 220, 220, 0.95) 100%);
    padding: 2rem;
    border-radius: 15px;
    position: sticky;
    top: 100px;
    color: #111; /* Base text color for all children */
}

.project-meta h3 {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.project-meta p {
    font-family: var(--font-body);
    font-size: 1rem;
    color: #111;
    margin-bottom: 1.5rem;
}

.project-meta p:last-child {
    margin-bottom: 0;
}

/* Meta item structure (used in templates) */
.project-meta .meta-item {
    margin-bottom: 1.25rem;
}

.project-meta .meta-item:last-child {
    margin-bottom: 0;
}

.project-meta strong {
    display: block;
    color: #333;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

/* Tools Used Section */
.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.tool-tag {
    background: transparent;
    border: 2px solid var(--accent-warm);
    color: var(--accent-warm);
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    transition: var(--transition);
}

.tool-tag:hover {
    background: var(--accent-warm);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Tech Tags Container and Individual Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tech-tag {
    display: inline-block;
    background: var(--gradient-warm-button);
    color: var(--text-white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-pill);
    font-weight: 500;
    font-size: 0.95rem;
    border: var(--border-width) solid rgba(255, 107, 107, 0.4);
    backdrop-filter: blur(var(--blur-light));
    position: relative;
    transition: var(--transition);
}

.tech-tag:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: var(--shadow-warm);
}

/* Project Hero Section Adjustments */
.project-hero {
    padding: 4rem 0;
}

.project-hero h1 {
    margin-bottom: 3rem;
}

/* Process & Variations Gallery */
.project-gallery {
    margin-top: 4rem;
    margin-bottom: 1.5rem;
}

.project-gallery h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-white);
}

.project-gallery h3 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

/* Gap between before/after players */
.gallery-grid,
.project-gallery .gallery-grid {
    gap: 1.5rem !important;
}

.process-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.process-item {
    width: 100%;
}

.process-item h3 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.process-item video,
.process-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Before/After Container Styles */
.before-after-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.before-after-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0;
    /* Note: .ba-wrapper (created by JS) handles aspect ratio */
}

.after-media {
    clip-path: inset(0 0 0 50%);
}

/* Container class added by JavaScript - NOT the slider line element */
.before-after-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    -webkit-user-select: none;
    user-select: none;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-handle::before,
.slider-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-style: solid;
}

.slider-handle::before {
    left: 8px;
    border-width: 6px 6px 6px 0;
    border-color: transparent #333 transparent transparent;
    transform: translateY(-50%);
}

.slider-handle::after {
    right: 8px;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent #333;
    transform: translateY(-50%);
}

.before-label,
.after-label {
    position: absolute;
    top: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.before-label {
    left: 20px;
}

.after-label {
    right: 20px;
}

/* ===============================================
   BEFORE/AFTER SLIDER - DYNAMIC .ba-* CLASSES
   (Created by before-after.js)
   =============================================== */

.ba-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Video aspect ratio */
.ba-wrapper:has(video) {
    padding-bottom: 56.25%; /* 16:9 aspect ratio for videos */
}

/* Image handling - maintain 16:9 aspect ratio using modern aspect-ratio property */
.ba-wrapper:has(img) {
    position: relative;
    aspect-ratio: 16/9;
    line-height: 0;
}

.ba-before,
.ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* For images, both should be absolute within the aspect ratio container */
.ba-wrapper:has(img) .ba-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ba-wrapper:has(img) .ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ba-before video,
.ba-after video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-before img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.ba-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.ba-after {
    clip-path: inset(0 50% 0 0); /* Initial 50% position - clip from right */
}

/* Slider Controls */
.ba-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 3;
    transition: opacity 0.3s ease;
}

.ba-slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.ba-slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.8);
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ba-slider-handle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(1.1);
}

.ba-slider-handle:active,
.ba-slider.dragging .ba-slider-handle {
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(0.95);
}

.ba-slider-handle svg {
    width: 24px;
    height: 24px;
    color: white;
    pointer-events: none;
}

/* Labels */
.ba-label {
    position: absolute;
    top: 20px;
    padding: 10px 20px;
    min-height: 36px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    border-radius: 50px;
    pointer-events: none;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-primary);
    border: 2px solid rgba(255, 255, 255, 0.3);
    opacity: 0.9;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ba-label-before {
    left: 20px;
}

.ba-label-after {
    right: 20px;
}

/* Hover Effects */
.before-after-slider:hover .ba-slider {
    opacity: 1;
}

.before-after-slider:not(:hover) .ba-slider {
    opacity: 0.8;
}

/* Dragging State */
.before-after-slider.is-dragging {
    cursor: ew-resize;
}

.before-after-slider.is-dragging .ba-slider-handle {
    background: rgba(255, 255, 255, 0.3);
}

/* Touch Device Optimizations */
@media (hover: none) {
    .ba-slider {
        opacity: 1 !important;
    }

    .ba-slider-handle {
        width: 48px;
        height: 48px;
    }
}

/* Mobile Responsive - Before/After Slider */
@media (max-width: 768px) {
    .ba-label {
        font-size: 12px;
        padding: 6px 12px;
    }

    .ba-label-before {
        left: 10px;
    }

    .ba-label-after {
        right: 10px;
    }

    .ba-slider-handle {
        width: 40px;
        height: 40px;
    }

    .ba-slider-handle svg {
        width: 20px;
        height: 20px;
    }
}

/* Slider Tip */
.slider-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.25rem;
    margin-bottom: 0;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-body);
}

.tip-icon {
    font-size: 16px;
}

.tip-text {
    line-height: 1.4;
}

@media (max-width: 768px) {
    .slider-tip {
        font-size: 12px;
        padding: 8px;
    }

    .tip-icon {
        font-size: 14px;
    }
}

/* Related Projects Section */
.related-projects {
    background-color: var(--dark-bg);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-projects h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-white);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.related-grid .project-card {
    max-width: none !important;
}

/* Fix for templates using .projects-grid instead of .related-grid */
.related-projects .projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.related-projects .projects-grid .project-card {
    max-width: none !important;
    width: 100%;
}

@media (max-width: 600px) {
    .related-projects .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design for Project Pages */
@media (max-width: 1024px) {
    .project-info-grid {
        grid-template-columns: 1fr;
    }

    .project-meta {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .project-hero {
        padding: 3rem 0;
        min-height: 50vh;
    }

    .project-hero h1 {
        font-size: 1.8rem;
    }

    .project-details {
        padding: 3rem 0;
    }

    .project-info-grid {
        gap: 2rem;
    }

    .project-description h2 {
        font-size: 1.5rem;
    }

    .project-description p {
        font-size: 1rem;
    }

    .project-meta {
        padding: 1.5rem;
    }

    .tools-list {
        gap: 0.5rem;
    }

    .tool-tag {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .before-label,
    .after-label {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}

/* ========================================
   SECTION 9B: PROJECT HERO V2 (REDESIGN)
   Cover image with overlay title + meta
   ======================================== */

/* Hero — cover image with bottom-aligned overlay */
.project-hero-v2 {
    position: relative;
    width: 100%;
    height: 55vh;
    overflow: hidden;
    background-color: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.project-hero-v2 .hero-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
    will-change: transform;
    animation: heroZoom 20s linear forwards;
}

/* Cinematic vignette — fades bottom into page bg */
.project-hero-v2::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(to top,
            var(--dark-bg) 0%,
            rgba(8, 9, 10, 0.7) 12%,
            rgba(8, 9, 10, 0.25) 35%,
            rgba(8, 9, 10, 0.1) 50%,
            rgba(8, 9, 10, 0.2) 75%,
            rgba(8, 9, 10, 0.5) 100%);
}

/* Title overlay — bottom-positioned, just above meta bar */
.project-hero-v2 .hero-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem 0.6rem;
    margin-top: auto;
    animation: heroFadeUp 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.project-hero-v2 h1 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.04em;
    line-height: 1.15;
    margin: 0;
    text-transform: uppercase;
    text-shadow:
        0 2px 20px rgba(0, 0, 0, 0.85),
        0 6px 50px rgba(0, 0, 0, 0.65),
        0 12px 80px rgba(0, 0, 0, 0.5);
}

.project-hero-v2 .hero-title-accent {
    color: rgba(255, 94, 20, 0.85);
    font-weight: 300;
    display: inline-block;
    animation: heroFadeUp 1.6s cubic-bezier(0.16, 1, 0.3, 1) 1.2s both;
}

/* Line break between title and accent — hidden on desktop, shown on mobile */
.project-hero-v2 .hero-title-break {
    display: none;
}

/* Meta bar — bottom of hero, inline film-credits style */
.project-hero-v2 .hero-meta-bar {
    position: relative;
    width: 100%;
    z-index: 2;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: center;
    background: rgba(8, 9, 10, 0.45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-top: none;
    background-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 94, 20, 0.2) 15%,
        rgba(255, 94, 20, 0.2) 85%,
        transparent 100%
    );
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: top;
    animation: heroFadeUp 1.6s cubic-bezier(0.16, 1, 0.3, 1) 2.2s both;
}

/* Shimmer sweep across meta bar top line */
.project-hero-v2 .hero-meta-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 94, 20, 0.4),
        transparent
    );
    animation: metaShimmer 6s ease-in-out 4.5s infinite;
    pointer-events: none;
}

.project-hero-v2 .project-meta-grid {
    display: flex;
    align-items: center;
    gap: 0;
}

.project-hero-v2 .meta-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0 1.8rem;
    border-right: 1px solid rgba(255, 94, 20, 0.25);
}

.project-hero-v2 .meta-col:last-child {
    border-right: none;
}

.project-hero-v2 .meta-label {
    font-family: var(--font-secondary);
    font-size: 0.55rem;
    font-weight: 500;
    color: rgba(255, 94, 20, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.22em;
}

.project-hero-v2 .meta-value {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

/* Orange section divider — fades at edges */
.section-divider-orange {
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 94, 20, 0.03) 15%,
        rgba(255, 94, 20, 0.4) 40%,
        rgba(255, 94, 20, 0.6) 50%,
        rgba(255, 94, 20, 0.4) 60%,
        rgba(255, 94, 20, 0.03) 85%,
        transparent 100%
    );
    margin: 0;
}

/* Video player section */
.project-hero-v2-video {
    background-color: var(--dark-bg);
    padding: 2.5rem 0;
}

.project-hero-v2-video video {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 0;
    background: #000;
}

/* Override grey border on related-projects when using V2 layout */
.section-divider-orange + .related-projects {
    border-top: none;
}

/* --- Hero V2 Entrance Animations --- */

@keyframes heroZoom {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes metaShimmer {
    0%, 100% { opacity: 0; transform: translateX(-100%); }
    50%      { opacity: 0.8; transform: translateX(100%); }
}

/* Responsive — Project Hero V2 */
@media (max-width: 768px) {
    .project-hero-v2 {
        height: 65vh;
    }

    .project-hero-v2 .hero-cover {
        object-position: center center;
    }

    .project-hero-v2 h1 {
        font-size: clamp(1.8rem, 7vw, 2.6rem);
    }

    .project-hero-v2 .hero-title-break {
        display: block;
    }

    .project-hero-v2 .hero-meta-bar {
        padding: 0.6rem 1.5rem;
    }

    .project-hero-v2 .meta-col {
        padding: 0 1.2rem;
    }

    .project-hero-v2 .meta-value {
        font-size: 0.75rem;
    }

    .project-hero-v2-video {
        padding: 2rem 1rem;
    }

    .project-hero-v2-video video {
        max-width: 100%;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .project-hero-v2 {
        height: 60vh;
    }

    .project-hero-v2 h1 {
        font-size: clamp(1.5rem, 6.5vw, 2.2rem);
    }

    .project-hero-v2 .hero-meta-bar {
        padding: 0.5rem 1rem;
    }

    .project-hero-v2 .meta-col {
        padding: 0 0.8rem;
    }

    .project-hero-v2 .meta-label {
        font-size: 0.5rem;
    }

    .project-hero-v2 .meta-value {
        font-size: 0.65rem;
    }
}

/* ========================================
   SECTION 10: FOOTER
   ======================================== */

.footer {
    background-color: #050505;
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer .social-links {
    margin: 0;
}

/* ========================================
   SECTION 10: UTILITIES
   ======================================== */

/* Utility classes for common patterns */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

/* ========================================
   SECTION 11: ANIMATIONS
   ======================================== */

/* Animations will be added as needed */

/* ========================================
   SECTION 12: ADDITIONAL RESPONSIVE MEDIA QUERIES
   ======================================== */

/* Mobile adjustments */
@media (max-width: 480px) {
    .about-text br {
        display: none;
    }

    .projects-grid {
        gap: 1rem;
    }

    .project-card {
        min-height: 120px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .about-text p:first-child br:nth-of-type(2),
    .about-text p:last-child br:nth-of-type(3),
    .about-text p:last-child br:nth-of-type(4) {
        display: none;
    }
}

/* Homepage Featured Projects - 2 columns on landscape mobile */
@media (min-width: 480px) and (max-width: 767px) {
    #projects .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Mobile projects grid and new styles */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 1rem;
    }

    .projects-cta-wrapper {
        margin-top: 2rem;
    }

    .projects-cta-button {
        min-width: 180px;
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }

    /* Project filters - stack nicely on mobile */
    .project-filters {
        gap: 0.75rem;
        margin: 1.5rem 0;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Skills and services - single column on mobile */
    .skills-categories,
    .services-grid,
    .links-grid,
    .download-links {
        grid-template-columns: 1fr;
    }

    .skill-category,
    .service-card,
    .link-category,
    .download-item {
        padding: 1.5rem;
    }

    /* Adjust font sizes for mobile */
    .skill-category h3,
    .service-card h3,
    .link-category h3,
    .download-item h3 {
        font-size: 1.25rem;
    }

    .service-icon img {
        width: 50px;
        height: 50px;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
        max-height: 95vh;
    }

    .modal-video {
        max-height: calc(95vh - 50px);
    }

    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .hero-content {
        padding: 2rem 1.25rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero {
        min-height: 100vh;
        height: auto;
        padding: 100px 1rem 60px;
    }
}

/* Enhanced tablet/desktop styles */
@media (min-width: 768px) {
    .about-content {
        flex-direction: row;
        text-align: left;
        gap: 3rem;
    }

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

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        gap: 1.25rem;
    }

    /* Homepage Featured Projects - ensure proper 3x2 layout */
    #projects .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
        margin: 0 auto;
    }

    .projects-cta-wrapper {
        margin-top: 3.5rem;
    }

    .projects-cta-button {
        min-width: 220px;
        padding: 1rem 2.5rem;
    }

    .skills-links-buttons {
        gap: 3rem;
    }

    .skills-links-buttons .cta-button {
        min-width: 250px;
    }

    .social-links {
        gap: 2rem;
    }

    .hero-content {
        padding: 3rem 5.5rem;
    }

    /* Project filters - better spacing on tablet/desktop */
    .project-filters {
        gap: 1.5rem;
        margin: 2.5rem 0;
        padding-bottom: 2.5rem;
    }

    .project-filters::after {
        width: 80%;
        max-width: 1000px;
    }

    /* Services grid - 2 columns on tablet */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Links and downloads - responsive columns */
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-links {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Large desktop adjustments */
@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.25rem;
        max-width: 100%;
        padding: 0;
    }

    /* Keep Featured Projects on homepage as 3x2 grid */
    #projects .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }

    .hero {
        padding: 6rem 1rem;
    }

    .section {
        padding: 6rem 0;
    }

    /* Services grid - 4 columns on large screens */
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
    }

    /* Skills categories - maintain single column for readability */
    .skills-categories {
        grid-template-columns: 1fr;
        max-width: 1000px;
    }
}

/* Extra large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    #projects .container {
        max-width: 1400px;
    }

    .projects-grid {
        gap: 1.5rem;
    }

    /* Maintain 3x2 grid for Featured Projects on homepage */
    #projects .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1100px;
        margin: 0 auto;
        gap: 2rem;
    }
}

/* iPad landscape specific fixes */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .footer .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        max-width: var(--max-width);
        padding: 0 2rem;
    }

    .footer .social-links {
        gap: 1rem;
        margin: 0;
        flex-shrink: 0;
    }

    .footer p {
        margin: 0;
        flex: 1;
        text-align: left;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* Hero V2 entrance animations are slow/subtle — safe to keep */
    .project-hero-v2 .hero-cover {
        animation-duration: 20s !important;
        animation-timing-function: linear !important;
    }

    .project-hero-v2 .hero-overlay {
        animation-duration: 1.8s !important;
        animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .project-hero-v2 .hero-title-accent {
        animation-duration: 1.6s !important;
        animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .project-hero-v2 .hero-meta-bar {
        animation-duration: 1.6s !important;
        animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .project-hero-v2 .hero-meta-bar::before {
        animation-duration: 6s !important;
        animation-iteration-count: infinite !important;
        animation-timing-function: ease-in-out !important;
    }
}

/* ========================================
   404 ERROR PAGE STYLES
   ======================================== */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
    color: white;
}

.error-content h1 {
    font-size: 8rem;
    margin: 0;
    font-weight: 300;
}

.error-content h2 {
    font-size: 2rem;
    margin: 1rem 0;
    font-weight: 400;
}

.error-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.home-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.home-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ========================================
   PROCESS MEDIA STYLES (FROM ADVANCED TEMPLATE)
   ======================================== */

/* Media item styling */
.media-item {
    position: relative;
    width: 100%;
}

.media-caption {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-light, #999);
    font-style: italic;
}

.media-label {
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-white, #fff);
}

/* Video and Image responsive */
.media-item video,
.media-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}