/* CSS Reset and Base Styles */
:root {
    /* Dramatic Color Palette */
    --primary-color: #2d3748;
    --accent-royal: #4169E1; /* Royal Blue */
    --accent-royal-hover: #3051b8;
    --accent-burgundy: #800020; /* Burgundy */
    --accent-burgundy-hover: #5c0017;
    --text-color: #4a5568;
    --text-muted: #666666;
    --text-light: #888888;
    
    /* Dramatic Hero Colors - Bolder/Darker */
    --hero-primary: #0a1628; /* Very Dark Navy */
    --hero-secondary: #1e3a8a; /* Deep Blue */
    --hero-accent: #3b82f6; /* Bright Blue */
    --hero-text: #ffffff;
    --hero-text-muted: rgba(255, 255, 255, 0.85);
    
    /* Background Colors */
    --background-white: #FFFFFF;
    --background-soft: #F9FAFA;
    --background-muted: #F4F6F8;
    --background-accent-tint: rgba(65, 105, 225, 0.02);
    
    /* Borders and Separators */
    --border-color: #e8ecef;
    --border-light: #f0f4f7;
    --separator-color: rgba(0, 0, 0, 0.06);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 25px -5px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.06);
    
    /* Layout */
    --max-width: 1200px;
    --nav-height: 60px;
    --corner-accent-size: 5px;
    
    /* Typography */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.08em;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-weight: var(--font-weight-normal);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    line-height: 1.1;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
    letter-spacing: var(--letter-spacing-tight);
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    margin-bottom: 1.5rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: var(--font-weight-semibold);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: var(--font-weight-medium);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.65;
}

a {
    color: var(--accent-royal);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-royal-hover);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation - Mobile First */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    z-index: 1000;
    height: var(--nav-height);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    background-color: transparent;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
    .navbar {
        background-color: rgba(255, 255, 255, 0.99);
    }
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    position: relative;
    z-index: 10;
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.nav-toggle.active .hamburger:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

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

.nav-menu {
    position: fixed;
    left: -100%;
    top: var(--nav-height);
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    list-style: none;
    padding: 2rem 1rem;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
}

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

.nav-item {
    margin-bottom: 1.5rem;
}

.nav-link {
    display: block;
    font-size: 1.125rem;
    color: var(--primary-color);
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    font-weight: var(--font-weight-medium);
    position: relative;
    z-index: 10;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-royal);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-top: var(--nav-height);
}

/* Dramatic Hero Section with Depth and Personality */
.hero {
    padding: 6rem 0 8rem 0;
    text-align: center;
    background: #0a1628;
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
    isolation: isolate;
}

/* Compact Page Header for Internal Pages */
.page-header {
    padding: 4rem 0 3rem 0;
    text-align: center;
    background: #0a1628;
    position: relative;
    overflow: hidden;
    min-height: auto;
    display: flex;
    align-items: center;
    isolation: isolate;
}

/* Primary Atmospheric Layer - Deep Blue Glow */
.hero::before,
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle 800px at 20% 50%, rgba(59, 130, 246, 0.4) 0%, transparent 40%),
        radial-gradient(circle 600px at 80% 20%, rgba(96, 165, 250, 0.3) 0%, transparent 35%),
        radial-gradient(circle 1000px at 60% 100%, rgba(30, 58, 138, 0.5) 0%, transparent 40%),
        linear-gradient(to bottom, transparent 0%, rgba(10, 22, 40, 0.6) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Smaller atmospheric effects for page headers */
.page-header::before {
    background: 
        radial-gradient(circle 400px at 30% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle 300px at 70% 30%, rgba(96, 165, 250, 0.2) 0%, transparent 50%),
        linear-gradient(to bottom, transparent 0%, rgba(10, 22, 40, 0.4) 100%);
}

/* Noise Texture Overlay for Organic Feel */
.hero::after,
.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    z-index: 2;
    pointer-events: none;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.01) 35px, rgba(255,255,255,.01) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255,255,255,.01) 35px, rgba(255,255,255,.01) 70px);
    mix-blend-mode: overlay;
}

/* Dynamic Background Elements */
.hero-bg-element {
    position: absolute;
    pointer-events: none;
    z-index: 4;
}

/* Floating Code Particles */
.hero-particle {
    position: absolute;
    font-family: 'Courier New', monospace;
    color: rgba(96, 165, 250, 0.3);
    font-size: 14px;
    animation: float 25s infinite ease-in-out;
    pointer-events: none;
}

.hero-particle:nth-child(1) {
    top: 15%;
    left: 8%;
    animation-delay: 0s;
    font-size: 16px;
}

.hero-particle:nth-child(2) {
    top: 65%;
    right: 12%;
    animation-delay: 8s;
    font-size: 12px;
}

.hero-particle:nth-child(3) {
    bottom: 25%;
    left: 15%;
    animation-delay: 16s;
    font-size: 14px;
}

.hero-particle:nth-child(4) {
    top: 35%;
    right: 25%;
    animation-delay: 4s;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.2);
}

.hero-particle:nth-child(5) {
    top: 80%;
    left: 70%;
    animation-delay: 12s;
    font-size: 11px;
    color: rgba(59, 130, 246, 0.25);
}

.hero-particle:nth-child(6) {
    top: 20%;
    right: 5%;
    animation-delay: 20s;
    font-size: 15px;
}

.hero-particle:nth-child(7) {
    bottom: 40%;
    left: 5%;
    animation-delay: 6s;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.15);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.2;
    }
    50% {
        transform: translateY(-30px) translateX(20px) rotate(5deg);
    }
}

/* Large Background Shape */
.hero-shape {
    position: absolute;
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 3;
}

.hero-shape-2 {
    position: absolute;
    width: 400px;
    height: 400px;
    bottom: -150px;
    left: -150px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 3;
}

/* Developer Identity Layer */
.hero-flow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.hero-content,
.page-header-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 15;
    padding: 2rem;
}

.hero h1,
.page-header h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #60a5fa 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.5));
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

.hero-subtitle,
.page-header-subtitle {
    color: var(--hero-text-muted);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.page-header-subtitle {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

/* Subtle Accent Line */
.hero-accent {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--hero-accent), transparent);
    z-index: 10;
}

/* Organic Wave Transition */
.wave-transition {
    position: relative;
    background: var(--background-white);
}

.wave-transition::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--background-white);
    clip-path: ellipse(100% 100% at 50% 100%);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: transparent;
    color: var(--hero-text);
    border: 2px solid var(--hero-text);
    box-shadow: var(--shadow-md);
    font-weight: var(--font-weight-semibold);
    position: relative;
    overflow: hidden;
}

/* Primary button in light sections */
.section:not(.hero) .btn-primary,
.cta-section .btn-primary,
.section-accent .btn-primary {
    background-color: var(--accent-royal);
    color: white;
    border-color: var(--accent-royal);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--hero-text);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: #0a1628; /* Very dark blue for contrast */
    border-color: var(--hero-text);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

/* Primary button hover in light sections */
.section:not(.hero) .btn-primary:hover,
.cta-section .btn-primary:hover,
.section-accent .btn-primary:hover {
    background-color: var(--accent-royal-hover);
    color: white;
    border-color: var(--accent-royal-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Disable the ::before animation for light section buttons */
.section:not(.hero) .btn-primary::before,
.cta-section .btn-primary::before,
.section-accent .btn-primary::before {
    display: none;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-secondary {
    background-color: transparent;
    color: var(--hero-text);
    border-color: var(--hero-text);
    position: relative;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--hero-text);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover {
    color: #0a1628; /* Very dark blue for contrast */
}

.btn-secondary:hover::before {
    left: 0;
}

/* Secondary button in light sections */
.section:not(.hero) .btn-secondary,
.cta-section .btn-secondary,
.section-accent .btn-secondary {
    background-color: transparent;
    color: var(--accent-royal);
    border-color: var(--accent-royal);
}

.section:not(.hero) .btn-secondary:hover,
.cta-section .btn-secondary:hover,
.section-accent .btn-secondary:hover {
    background-color: var(--accent-royal);
    color: white;
    border-color: var(--accent-royal);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Disable the ::before animation for light section secondary buttons */
.section:not(.hero) .btn-secondary::before,
.cta-section .btn-secondary::before,
.section-accent .btn-secondary::before {
    display: none;
}

.btn-rounded {
    border-radius: 2rem;
}

.btn-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
    position: relative;
}


/* Hero Bridge Button (bennyquist.com crossover) */
.hero-bridge {
    text-align: center;
    margin-top: 1.5rem;
    position: relative;
    z-index: 15;
}

.btn-bridge {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-bridge:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.15);
    transform: translateY(-1px);
}

.btn-bridge .bridge-sep {
    margin: 0 0.25rem;
    opacity: 0.5;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

/* Corner Accents */
.corner-accent {
    position: relative;
}

.corner-accent::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: var(--corner-accent-size);
    height: var(--corner-accent-size);
    background-color: var(--accent-royal);
    border-radius: 0 0.5rem 0 0;
}

.corner-accent-burgundy::before {
    background-color: var(--accent-burgundy);
}

.corner-accent-bottom::before {
    top: auto;
    bottom: 0;
    right: auto;
    left: 0;
    border-radius: 0 0 0 0.5rem;
}

/* Cards */
.card {
    background-color: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--accent-royal);
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-royal), var(--accent-burgundy));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::after {
    opacity: 1;
}

/* Enhanced Service Cards */
.services-grid {
    position: relative;
}

a.service-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.service-card:hover {
    color: inherit;
}

.service-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px -10px rgba(59, 130, 246, 0.2),
        0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

/* Asymmetric positioning to break uniformity */
.service-card-offset {
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .service-card-offset {
        margin-top: 0;
    }
}

/* Floating code hover effects */
.card-hover-text {
    position: absolute;
    bottom: -30px;
    left: 2rem;
    right: 2rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: rgba(59, 130, 246, 0.7);
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 0.25rem;
    backdrop-filter: blur(5px);
}

.service-card:hover .card-hover-text {
    bottom: 1rem;
    opacity: 1;
}

/* Atmospheric background elements for service cards */
.services-grid::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.services-grid::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -5%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(128, 0, 32, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Ensure cards are above atmospheric elements */
.service-card {
    position: relative;
    z-index: 1;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-royal);
    display: block;
    line-height: 1;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Enhanced Project Cards */
.projects-section {
    position: relative;
    overflow: hidden;
}

.projects-grid {
    position: relative;
}

.projects-grid::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 15%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.project-card {
    background-color: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 0.875rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.project-card:hover {
    box-shadow: 
        0 25px 50px -10px rgba(59, 130, 246, 0.15),
        0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-royal);
}

.project-card-featured {
    transform: scale(1.05);
    border: 2px solid rgba(59, 130, 246, 0.2);
}

.project-card-featured:hover {
    transform: translateY(-8px) scale(1.07);
}

.project-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--background-muted) 0%, var(--background-soft) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon {
    font-size: 3rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.2) rotate(5deg);
    opacity: 1;
}

.project-hover-effect {
    position: absolute;
    top: 10px;
    right: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: rgba(59, 130, 246, 0.6);
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    backdrop-filter: blur(5px);
}

.project-card:hover .project-hover-effect {
    opacity: 1;
    transform: translateY(-5px);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.project-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tech-tag {
    background-color: var(--background-soft);
    color: var(--text-muted);
    padding: 0.375rem 0.875rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: var(--font-weight-medium);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background-color: var(--accent-royal);
    color: white;
    border-color: var(--accent-royal);
}

/* Enhanced CTA Section */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-background-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle 400px at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle 300px at 80% 70%, rgba(128, 0, 32, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin: 1rem auto 3rem auto;
    max-width: 700px;
    line-height: 1.6;
}

.cta-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.cta-stat {
    text-align: center;
    position: relative;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    background: linear-gradient(135deg, var(--accent-royal) 0%, var(--accent-burgundy) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cta-disclaimer {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .cta-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .project-card-featured {
        transform: none;
    }
    
    .project-card-featured:hover {
        transform: translateY(-8px) scale(1.02);
    }
}

/* About Page Styles */
.about-section {
    position: relative;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-intro {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .about-intro {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

.about-avatar {
    text-align: center;
    position: relative;
}

.avatar-placeholder {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--background-muted) 0%, var(--background-soft) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto 1rem auto;
    border: 3px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.avatar-placeholder:hover {
    transform: scale(1.05) rotate(5deg);
    border-color: rgba(59, 130, 246, 0.4);
}

.avatar-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    display: block;
    border: 3px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    object-fit: cover;
}

.avatar-image:hover {
    transform: scale(1.05) rotate(5deg);
    border-color: rgba(59, 130, 246, 0.4);
}

.avatar-status {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: rgba(59, 130, 246, 0.7);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    backdrop-filter: blur(5px);
    display: inline-block;
}

.about-text h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Philosophy Section */
.philosophy-section {
    position: relative;
    overflow: hidden;
}

.philosophy-section::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(128, 0, 32, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.philosophy-item {
    text-align: center;
    padding: 2rem;
    background: var(--background-white);
    border-radius: 0.875rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.philosophy-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.philosophy-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.philosophy-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.philosophy-item p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.philosophy-code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: rgba(59, 130, 246, 0.7);
    background: rgba(59, 130, 246, 0.05);
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-top: 1rem;
}

/* Contact Page Styles */
.contact-section {
    position: relative;
}

.contact-intro {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    text-align: center;
}

.contact-intro h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-intro p {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-expectations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.expectation-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.expectation-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.form-label {
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent-royal);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

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

/* Location Section */
.location-section {
    position: relative;
    overflow: hidden;
}

.location-section::before {
    content: '';
    position: absolute;
    bottom: -20%;
    left: 10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.location-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    position: relative;
    z-index: 1;
}

.location-item {
    text-align: center;
    padding: 2rem;
    background: var(--background-white);
    border-radius: 0.875rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.location-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.location-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.location-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.location-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

.contact-footer-note {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0.75rem;
    border-left: 4px solid var(--accent-royal);
}

.contact-footer-note p {
    margin: 0;
    color: var(--text-color);
    font-style: italic;
}

/* Sections */
.section {
    padding: 4rem 0;
    position: relative;
}

.section + .section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--max-width);
    height: 1px;
    background: var(--separator-color);
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-royal), var(--accent-burgundy));
    border-radius: 1px;
}

.section-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-muted);
    margin: -1rem auto 3rem auto;
    max-width: 600px;
    font-style: italic;
}

.section-soft {
    background-color: var(--background-soft);
}

.section-muted {
    background-color: var(--background-muted);
}

.section-accent {
    background-color: var(--background-accent-tint);
}

/* Remove separator line for first section after hero */
.hero + .section::before {
    display: none;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-royal);
}

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

.honeypot {
    position: absolute;
    left: -9999px;
}

/* Footer */
.footer {
    background-color: var(--background-white);
    padding: 2rem 0;
    margin-top: auto;
    width: 100%;
}

.footer .container {
    text-align: center;
}

.footer-content {
    text-align: center;
    width: 100%;
}

.footer-content p {
    color: var(--text-light);
    margin: 0 auto 0.5rem auto;
    text-align: center;
    width: 100%;
}

.footer-tagline {
    font-size: 0.875rem;
    text-align: center;
    margin: 0 auto;
}

.footer-link {
    font-size: 0.8rem;
    opacity: 0.5;
    text-align: center;
    margin: 0.5rem auto 0;
}

.footer-link a {
    color: var(--text-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-link a:hover {
    opacity: 1;
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* Tablet and Desktop Styles */
@media (min-width: 768px) {
    /* Navigation */
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        padding: 0;
        display: flex;
        align-items: center;
        box-shadow: none;
    }
    
    .nav-item {
        margin-bottom: 0;
        margin-left: 2rem;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.5rem 0;
    }
    
    /* Hero */
    .hero {
        padding: 5rem 0;
    }
    
    /* Grid Layouts */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Sections */
    .section {
        padding: 5rem 0;
    }
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.scale-in {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stagger animation delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Icon color variations */
.icon-royal { color: var(--accent-royal); }
.icon-burgundy { color: var(--accent-burgundy); }
.icon-muted { color: var(--text-muted); }

/* More Projects Section */
.more-projects-section {
    background: linear-gradient(to bottom, var(--background-light) 0%, var(--background-white) 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.more-projects-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 40%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.projects-marquee {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.mini-project {
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mini-project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-royal) 0%, var(--accent-burgundy) 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.mini-project:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-royal-15);
}

.mini-project:hover::before {
    transform: translateX(0);
}

.mini-project-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.mini-project:nth-child(2) .mini-project-icon {
    animation-delay: 1s;
}

.mini-project:nth-child(3) .mini-project-icon {
    animation-delay: 2s;
}

.mini-project h4 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: var(--font-weight-semibold);
}

.mini-project p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.mini-project-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-royal);
    background: var(--accent-royal-5);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.mini-project:hover .mini-project-tag {
    background: var(--accent-royal-10);
    transform: translateX(5px);
}

.mini-project-wide {
    grid-column: span 2;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .projects-marquee {
        grid-template-columns: 1fr;
    }
    
    .mini-project-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .more-projects-section {
        padding: 3rem 0;
    }
    
    .mini-project {
        padding: 1.5rem;
    }
    
    .mini-project-icon {
        font-size: 2rem;
    }
    
    .mini-project h4 {
        font-size: 1.125rem;
    }
    
    .mini-project p {
        font-size: 0.9rem;
    }
}

/* ===================== Portfolio — Magazine Grid ===================== */

/* Entrance animations */
@keyframes pf-rise {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pf-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* --- Shared Card Base --------------------------------------------------- */
.pf-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    display: block;
    text-decoration: none;
    background: var(--hero-primary);
    cursor: pointer;
    min-height: 280px;
    animation: pf-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--delay, 0) * 0.1s);
}

.pf-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

.pf-card:hover img {
    transform: scale(1.06);
    filter: brightness(0.6);
}

/* Gradient scrim over images */
.pf-card__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(6, 14, 30, 0.92) 0%,
        rgba(6, 14, 30, 0.55) 40%,
        rgba(6, 14, 30, 0.15) 70%,
        transparent 100%
    );
    z-index: 1;
    transition: background 0.4s ease;
}

.pf-card:hover .pf-card__scrim {
    background: linear-gradient(
        to top,
        rgba(6, 14, 30, 0.96) 0%,
        rgba(6, 14, 30, 0.7) 50%,
        rgba(6, 14, 30, 0.35) 100%
    );
}

/* Content overlay — bottom of card */
.pf-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.75rem 1.75rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transform: translateY(12px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-card:hover .pf-card__content {
    transform: translateY(0);
}

/* Always-visible for dark/icon tiles */
.pf-card__content--always {
    transform: translateY(0);
}

/* Tag chip */
.pf-card__tag {
    display: inline-block;
    width: fit-content;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--hero-accent);
    border: 1px solid rgba(59, 130, 246, 0.35);
    padding: 0.2rem 0.65rem;
    border-radius: 3px;
    backdrop-filter: blur(4px);
    background: rgba(59, 130, 246, 0.08);
}

/* Title */
.pf-card__title {
    color: #fff;
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 0.15rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* Description */
.pf-card__desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    line-height: 1.45;
    margin-bottom: 0;
    max-width: 40ch;
}

/* CTA arrow link */
.pf-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hero-accent);
    margin-top: 0.6rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.35s ease, transform 0.35s ease, gap 0.25s ease;
}

.pf-card__cta svg {
    transition: transform 0.25s ease;
}

.pf-card:hover .pf-card__cta {
    opacity: 1;
    transform: translateX(0);
}

.pf-card:hover .pf-card__cta svg {
    transform: translateX(3px);
}

/* Always show CTA on dark cards */
.pf-card__content--always .pf-card__cta {
    opacity: 0.6;
    transform: translateX(0);
}

.pf-card--dark:hover .pf-card__content--always .pf-card__cta,
.pf-card--glass:hover .pf-card__content--always .pf-card__cta {
    opacity: 1;
}

/* Corner accent line (decorative) */
.pf-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hero-accent), transparent);
    z-index: 3;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-card:hover::after {
    width: 60%;
}

/* --- Mosaic Grid (Websites) --------------------------------------------- */
/* Layout: ZooCards spans left 2 rows, TC-NW is right-top tall,
   PolyGrabbers & Colin's Forge sit bottom row */
.pf-mosaic {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.pf-mosaic .pf-card--hero {
    grid-row: 1 / 3;
    min-height: 520px;
}

.pf-mosaic .pf-card--hero .pf-card__title {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.pf-mosaic .pf-card--hero .pf-card__desc {
    max-width: 50ch;
}

.pf-mosaic .pf-card--tall {
    min-height: 250px;
}

/* --- Bento Grid (Applications) ------------------------------------------ */
/* 3-column grid, wide items span 2 cols */
.pf-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.pf-bento .pf-card--wide {
    grid-column: span 2;
}

.pf-bento .pf-card {
    min-height: 260px;
}

/* --- Dark Card Variant (no screenshot, icon-based) ---------------------- */
.pf-card--dark {
    background:
        radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        linear-gradient(145deg, #0c1a30 0%, #0f2040 40%, #162a4a 100%);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.pf-card--dark:hover {
    border-color: rgba(59, 130, 246, 0.25);
}

/* Emoji icon in background */
.pf-card__icon-bg {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-60%);
    font-size: 5rem;
    opacity: 0.12;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    filter: grayscale(40%);
}

.pf-card:hover .pf-card__icon-bg {
    opacity: 0.2;
    transform: translateY(-60%) scale(1.12) rotate(-5deg);
    filter: grayscale(0%);
}

/* --- Glass Card (Hardware dark section) --------------------------------- */
.pf-section--dark {
    background: var(--hero-primary);
    position: relative;
    overflow: hidden;
}

.pf-section--dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 600px at 20% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle 400px at 80% 30%, rgba(96, 165, 250, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.pf-card--glass {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pf-card--glass:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
}

.pf-card__icon-bg--glass {
    opacity: 0.18;
    filter: grayscale(0%);
}

.pf-card--glass:hover .pf-card__icon-bg--glass {
    opacity: 0.3;
}

/* Hardware strip — 3 equal columns */
.pf-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.pf-strip .pf-card {
    min-height: 300px;
}

/* ===================== Project Detail Pages ===================== */
/* Branded project hero — uses CSS custom properties set via inline style */
.project-hero {
    padding: 5rem 0 4rem;
    background: var(--ph-base, var(--background-soft));
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Atmospheric glow when branded */
.project-hero[style]::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 600px at 25% 60%, var(--ph-glow) 0%, transparent 50%),
        radial-gradient(circle 400px at 75% 20%, var(--ph-accent) 0%, transparent 40%),
        linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
    pointer-events: none;
}

.project-hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

/* When branded, swap text to light */
.project-hero[style] h1 {
    color: #fff;
}

.project-hero[style] .project-hero-tagline {
    color: rgba(255, 255, 255, 0.85);
}

.project-hero[style] .project-category-tag {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-hero[style] .project-hero-quip {
    color: rgba(255, 255, 255, 0.6);
}

.project-category-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-royal);
    background: rgba(65, 105, 225, 0.08);
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
}

.project-hero-tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 700px;
}

.project-hero-quip {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--accent-royal);
    margin-top: 1.5rem;
    opacity: 0.7;
}

.project-gallery-section {
    padding: 3rem 0 2rem;
    overflow: hidden;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

.project-gallery-img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.project-gallery-img:hover {
    transform: scale(1.02);
}

/* --- Project accent color threading --- */
/* The .project-page wrapper sets --project-accent via inline style */

/* Category tag uses accent */
.project-page .project-category-tag {
    color: var(--project-accent);
    background: transparent;
    border: 1.5px solid var(--project-accent);
    padding: 0.3rem 0.9rem;
    border-radius: 3px;
}

.project-hero[style] .project-category-tag {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

/* Story block headings get a left accent bar */
.project-page .project-story-block h3 {
    padding-left: 1rem;
    border-left: 3px solid var(--project-accent);
}

/* Code quip uses accent */
.project-page .project-hero-quip {
    color: var(--project-accent);
    opacity: 0.85;
}

.project-hero[style] .project-hero-quip {
    color: rgba(255, 255, 255, 0.6);
}

/* Tech tags get accent border */
.project-page .tech-tag {
    border-color: var(--project-accent);
    color: var(--project-accent);
}

/* Visit Site button uses accent */
.project-page .showcase-link {
    color: var(--project-accent);
    border-color: var(--project-accent);
}

.project-page .showcase-link:hover {
    background: var(--project-accent);
    color: #fff;
}

/* Gallery images get a subtle accent shadow on hover */
.project-page .project-gallery-img:hover {
    box-shadow: 0 8px 30px -8px color-mix(in srgb, var(--project-accent) 40%, transparent);
}

/* Section divider — colored line between gallery and story */
.project-page .project-story-section::before {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--project-accent);
    margin: 0 auto 0;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.project-page .project-story-section {
    position: relative;
}

.project-story {
    max-width: 800px;
    margin: 0 auto;
}

.project-story-block {
    margin-bottom: 2.5rem;
}

.project-story-block h3 {
    font-size: 1.375rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.project-story-block p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.0625rem;
}

.project-detail-meta {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.showcase-link {
    display: inline-block;
    color: var(--accent-royal);
    font-weight: var(--font-weight-semibold);
    font-size: 0.9375rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-royal);
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.showcase-link:hover {
    background: var(--accent-royal);
    color: white;
}

.project-more-section {
    padding: 3rem 0;
}

.project-more-section h2 {
    margin-bottom: 1.5rem;
}

/* --- More Sites Thumbnails ---------------------------------------------- */
.pf-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.pf-thumb {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    display: block;
    text-decoration: none;
    border: 1px solid var(--border-light);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.pf-thumb:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.pf-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-thumb:hover img {
    transform: scale(1.06);
}

.pf-thumb__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(6, 14, 30, 0.95) 0%, rgba(6, 14, 30, 0.65) 60%, transparent 100%);
    padding: 2.5rem 1.25rem 1.25rem;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pf-thumb__name {
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

.pf-thumb__desc {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* ===================== Portfolio & Project Responsive ===================== */

/* Tablet */
@media (max-width: 1024px) {
    .pf-mosaic {
        grid-template-columns: 1fr 1fr;
    }

    .pf-mosaic .pf-card--hero {
        grid-row: auto;
        min-height: 360px;
        grid-column: span 2;
    }

    .pf-mosaic .pf-card--tall {
        min-height: 260px;
    }

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

    .pf-bento .pf-card--wide {
        grid-column: span 2;
    }

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

    .pf-strip .pf-card:last-child {
        grid-column: span 2;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .pf-section {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .pf-mosaic {
        grid-template-columns: 1fr;
    }

    .pf-mosaic .pf-card--hero {
        grid-column: 1;
        min-height: 320px;
    }

    .pf-mosaic .pf-card--tall {
        min-height: 240px;
    }

    .pf-bento {
        grid-template-columns: 1fr;
    }

    .pf-bento .pf-card--wide {
        grid-column: 1;
    }

    .pf-bento .pf-card {
        min-height: 220px;
    }

    .pf-strip {
        grid-template-columns: 1fr;
    }

    .pf-strip .pf-card:last-child {
        grid-column: 1;
    }

    .pf-strip .pf-card {
        min-height: 240px;
    }

    .pf-card__icon-bg {
        font-size: 3.5rem;
        right: 1rem;
    }

    .project-page .project-story-block h3 {
        padding-left: 0.75rem;
    }

    .pf-thumbs {
        grid-template-columns: 1fr;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

    .project-detail-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===================== Lightbox ===================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(6, 14, 30, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 25px 80px -15px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s ease;
    z-index: 1;
}

.lightbox-close:hover {
    color: #fff;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-prev { left: 0.75rem; }
    .lightbox-next { right: 0.75rem; }
}

/* ===================== ZooCards — Custom Page Styles ===================== */

/* Gallery: two wide screenshots flanking one card */
.zoocards-gallery {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    grid-template-rows: auto auto;
    gap: 1.25rem;
    align-items: start;
}

.zoocards-gallery-wide:first-child {
    grid-column: 1;
    grid-row: 1;
}

.zoocards-gallery-card {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    border-radius: 0.75rem;
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.3);
    transform: rotate(2deg);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.zoocards-gallery-card:hover {
    transform: rotate(0deg) scale(1.03);
    box-shadow: 0 20px 50px -10px rgba(192, 57, 43, 0.35);
}

.zoocards-gallery-wide:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
}

/* Tribal border divider */
.zoocards-border-divider {
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.zoocards-border-divider img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 60px;
}

/* ====== Story layout: text + floating image aside (shared) ====== */
.project-story-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 3rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.project-story-aside {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    padding-top: 0.5rem;
}

.project-floating-image {
    width: 100%;
    border-radius: 0.75rem;
    box-shadow:
        0 15px 40px -8px rgba(0, 0, 0, 0.25),
        0 0 0 1px color-mix(in srgb, var(--project-accent) 15%, transparent);
    transform: rotate(-3deg);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-floating-image:hover {
    transform: rotate(1deg) scale(1.04);
}

@media (max-width: 900px) {
    .project-story-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-story-aside {
        position: static;
        text-align: center;
    }

    .project-floating-image {
        max-width: 200px;
        margin: 0 auto;
        transform: rotate(0deg);
    }
}

/* ====== ZooCards overrides ====== */
.zoocards-story-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 3rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.zoocards-story-aside {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    padding-top: 0.5rem;
}

.zoocards-floating-card {
    width: 100%;
    border-radius: 0.75rem;
    box-shadow:
        0 15px 40px -8px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(192, 57, 43, 0.1);
    transform: rotate(-3deg);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.zoocards-floating-card:hover {
    transform: rotate(1deg) scale(1.04);
}

/* Responsive */
@media (max-width: 900px) {
    .zoocards-gallery {
        grid-template-columns: 1fr;
    }

    .zoocards-gallery-card {
        grid-column: 1;
        grid-row: auto;
        max-width: 280px;
        margin: 0 auto;
        transform: rotate(0deg);
    }

    .zoocards-gallery-wide:nth-child(3) {
        grid-column: 1;
        grid-row: auto;
    }

    .zoocards-story-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .zoocards-story-aside {
        position: static;
        text-align: center;
    }

    .zoocards-floating-card {
        max-width: 200px;
        margin: 0 auto;
        transform: rotate(0deg);
    }
}

/* =========================
   Consulting Page
   ========================= */

.consulting-body {
    max-width: 750px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-color);
}

.consulting-body p {
    margin-bottom: 1.5rem;
}

.consulting-body a {
    color: var(--accent-royal);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.consulting-body a:hover {
    border-bottom-color: var(--accent-royal);
}

.consulting-body code {
    background: var(--background-muted);
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    color: var(--accent-royal);
}

.consulting-callout {
    font-size: 1.35rem;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    margin: 2rem 0;
}

.consulting-section-heading {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.consulting-articles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.consulting-article-card {
    display: block;
    padding: 2rem;
    background: var(--background-soft);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-royal);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.consulting-article-card:hover {
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.consulting-article-card h3 {
    font-size: 1.2rem;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.consulting-article-card p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.consulting-read-link {
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    color: var(--accent-royal);
    letter-spacing: 0.02em;
}

.consulting-article-card:hover .consulting-read-link {
    color: var(--accent-royal-hover);
}

.consulting-nudge {
    font-style: italic;
    color: var(--text-muted);
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .consulting-articles {
        grid-template-columns: repeat(2, 1fr);
    }
}