/* ==========================================================================
   Christopher Culbreath Portfolio
   Typography-forward design with dark theme
   ========================================================================== */

/* Custom Properties */
:root {
    /* Colors - Deep space theme */
    --bg-primary: #0a0a14;
    --bg-secondary: #0d1117;
    --bg-tertiary: #161b22;
    --bg-elevated: #1c2128;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(230, 230, 230, 0.85);
    --text-muted: rgba(200, 200, 200, 0.6);

    /* Accent Colors - Warm gold/copper */
    --accent-gold: #d4a574;
    --accent-gold-light: #e8c9a0;
    --accent-gold-dim: rgba(212, 165, 116, 0.15);
    --accent-copper: #c9956c;
    --accent-coral: #e07a5f;

    /* Button gradient */
    --btn-gradient: linear-gradient(135deg, #e07a5f 0%, #d4a574 100%);
    --btn-gradient-hover: linear-gradient(135deg, #eb8f77 0%, #e8c9a0 100%);

    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(212, 165, 116, 0.15);

    /* Name SVG Colors */
    --grad-fill-light: #e8c9a0;
    --grad-fill-dark: #c9956c;
    --name-outline: #d4a574;

    /* Typography */
    --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

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

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Layout */
    --max-width: 1200px;
    --max-width-narrow: 900px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-secondary);
    background-color: var(--bg-primary);
}

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

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 500;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
}

/* Italic accent styling - the breezy italic */
em, .italic-accent {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    color: var(--accent-gold);
}

p {
    margin: 0 0 0.5rem;
}

/* Section Headlines */
.section-headline {
    margin-bottom: var(--space-lg);
}

.section-headline em {
    display: block;
    font-size: 0.9em;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-sm) var(--space-md);
    transition: all var(--transition-base);
}

.nav-scrolled {
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: var(--space-md);
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl) var(--space-md);
    position: relative;
    overflow: hidden;
    background: var(--bg-primary) url('assets/newbgs/hero_bg.jpg') center center / cover no-repeat;
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: start;
    padding-left: var(--space-lg);
    padding-top: var(--space-lg);
}

.hero-intro {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--accent-gold);
    margin-bottom: var(--space-xs);
}

/* Animated Name SVG Container */
.hero-name-container {
    margin-bottom: var(--space-md);
    margin-left: 0;
    margin-right: auto;
}

.hero-text {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-name-svg {
    position: relative;
    max-width: 100%;
    height: auto;
    margin-bottom: 0.25rem;
    margin-left: 0;
    margin-right: auto;
}

.hero-name-svg .svg-wrapper {
    position: relative;
    flex-shrink: 0;
}

.hero-name-svg.christopher .svg-wrapper {
    height: 90px;
    width: 620px;
}

.hero-name-svg.culbreath .svg-wrapper {
    height: 72px;
    width: 520px;
}

.hero-name-svg object,
.hero-name-svg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-name-svg .name-stroke {
    position: absolute;
    top: 0;
    left: 0;
}

.hero-name-svg .name-fill {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    animation: revealFill 1.5s ease-out forwards;
}

/* Stroke animation for each letter - smooth flow */
.hero-name-svg .letter {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: drawLetter 3.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}


/* Christopher letters (12 paths) - smooth overlapping flow */
.hero-name-svg.christopher .letter:nth-child(1)  { animation-delay: 0s;   }
.hero-name-svg.christopher .letter:nth-child(2)  { animation-delay: 0.2s; }
.hero-name-svg.christopher .letter:nth-child(3)  { animation-delay: 0.4s; }
.hero-name-svg.christopher .letter:nth-child(4)  { animation-delay: 0.6s; }
.hero-name-svg.christopher .letter:nth-child(5)  { animation-delay: 0.8s; }
.hero-name-svg.christopher .letter:nth-child(6)  { animation-delay: 1s;   }
.hero-name-svg.christopher .letter:nth-child(7)  { animation-delay: 1.2s; }
.hero-name-svg.christopher .letter:nth-child(8)  { animation-delay: 1.4s; }
.hero-name-svg.christopher .letter:nth-child(9)  { animation-delay: 1.6s; }
.hero-name-svg.christopher .letter:nth-child(10) { animation-delay: 1.8s; }
.hero-name-svg.christopher .letter:nth-child(11) { animation-delay: 2s;   }
.hero-name-svg.christopher .letter:nth-child(12) { animation-delay: 2.2s; }

.hero-name-svg.christopher .name-fill {
    animation-delay: 1.0s;
}

/* Culbreath letters (9 paths) - starts after Christopher's first few letters */
.hero-name-svg.culbreath .letter:nth-child(1) { animation-delay: 0s;   }
.hero-name-svg.culbreath .letter:nth-child(2) { animation-delay: 0.2s; }
.hero-name-svg.culbreath .letter:nth-child(3) { animation-delay: 0.4s; }
.hero-name-svg.culbreath .letter:nth-child(4) { animation-delay: 0.6s; }
.hero-name-svg.culbreath .letter:nth-child(5) { animation-delay: 0.8s; }
.hero-name-svg.culbreath .letter:nth-child(6) { animation-delay: 1s;   }
.hero-name-svg.culbreath .letter:nth-child(7) { animation-delay: 1.2s; }
.hero-name-svg.culbreath .letter:nth-child(8) { animation-delay: 1.4s; }
.hero-name-svg.culbreath .letter:nth-child(9) { animation-delay: 1.6s; }

.hero-name-svg.culbreath .name-fill {
    animation-delay: 0.1s;
}

@keyframes drawLetter {
    0% {
        stroke-dashoffset: 800;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes revealFill {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero-tagline-wrapper {
    position: relative;
}

.hero-tagline-ghost {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
    user-select: none;
}

.hero-tagline {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--text-primary);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.hero-tagline em {
    color: var(--accent-gold);
    display: inline;
    transition: opacity 0.3s ease;
}

.hero-tagline em.exit-up {
    opacity: 0;
    transform: translateY(-20px);
}

.hero-rotating-container {
    margin-bottom: var(--space-xs);
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 220px; /* Accommodate 2-line headline + 3-line blurb */
}

.hero-blurb {
    font-family: 'Urbanist', sans-serif;
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    min-height: 4em; /* Reserve space for wrapped blurb lines */
}

.blurb-line {
    display: block;
    transition: opacity 0.35s ease;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 6px;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--btn-gradient);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(224, 122, 95, 0.3);
}

.btn-primary:hover {
    background: var(--btn-gradient-hover);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(224, 122, 95, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(212, 165, 116, 0.1);
}

.btn-tertiary {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.875rem 1.5rem;
}

.btn-tertiary:hover {
    color: var(--accent-gold);
    background: transparent;
    box-shadow: none;
    transform: none;
}

/* Hero Image - Layered Portrait */
.hero-image {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    position: relative;
    margin-left: -150px;
    margin-top: -80px;
}

.hero-avatar-wrapper {
    position: relative;
    width: 100%;
    max-width: 475px;
    aspect-ratio: 1 / 1;
}

/* Layered portrait stack */
.hero-portrait-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-portrait-layer.screen-blend {
    mix-blend-mode: screen;
}

.hero-portrait-layer.photo {
    mix-blend-mode: normal;
}

.hero-portrait-layer.mask {
    mix-blend-mode: normal;
}

/* Legacy single avatar fallback */
.hero-avatar {
    width: 100%;
    border-radius: 50%;
}

/* Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.hero-scroll span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.scroll-indicator {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-gold), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    padding: var(--space-2xl) var(--space-md);
    background: var(--bg-primary) url('assets/newbgs/about_bg.png') center center / cover no-repeat;
    position: relative;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-sm);
    align-items: center;
    margin-bottom: var(--space-xl);
}

.about-body {
    font-size: 1.125rem;
}

.about-body p:last-child {
    margin-bottom: 0;
}

.about-highlight {
    font-size: 1.25rem;
    color: var(--text-primary);
    padding-left: var(--space-md);
    border-left: 2px solid var(--accent-gold);
    margin-top: var(--space-md);
}

.about-highlight em {
    font-family: var(--font-serif);
    color: var(--accent-gold);
}

.about-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-illustration {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.skill-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-md);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(20px);
}

.skill-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-card:hover {
    border-color: rgba(212, 165, 116, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    width: 56px;
    height: 56px;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-radius: 12px;
}

.skill-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 0.9;
}

.skill-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-gold);
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.skill-card p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
}

/* ==========================================================================
   Work / Timeline Section
   ========================================================================== */
.work {
    padding: var(--space-2xl) var(--space-md);
    background: var(--bg-primary) url('assets/newbgs/jobs.png') center center / cover no-repeat;
    position: relative;
}

.timeline {
    position: relative;
    padding-left: var(--space-lg);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent-gold), var(--bg-tertiary));
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-lg);
    opacity: 0;
    transform: translateX(-20px);
    transition: all var(--transition-slow);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: calc(-1 * var(--space-lg) - 6px);
    top: 0.25rem;
    width: 12px;
    height: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.timeline-item:hover .timeline-marker {
    background: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.2);
}

.timeline-content {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-md);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.timeline-item:hover .timeline-content {
    border-color: rgba(212, 165, 116, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.timeline-date {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    margin-bottom: var(--space-xs);
}

.timeline-content h3 {
    font-size: 1.375rem;
    margin-bottom: 0.25rem;
}

.timeline-role {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.timeline-content p:not(.timeline-role) {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: var(--space-sm);
}

.timeline-tags span {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    background: rgba(212, 165, 116, 0.15);
    color: var(--accent-gold);
    border-radius: 4px;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects {
    padding: var(--space-2xl) var(--space-md);
    background: var(--bg-primary) url('assets/newbgs/jobs.jpg') center center / cover no-repeat;
    position: relative;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(20px);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    min-height: 200px;
}

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

.project-card:hover {
    border-color: rgba(212, 165, 116, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Alternate layout - image on right */
.project-card:nth-child(even) {
    grid-template-columns: 1.5fr 1fr;
}

.project-card:nth-child(even) .project-image {
    order: 2;
}

.project-card:nth-child(even) .project-content {
    order: 1;
}

.project-featured {
    grid-column: span 1;
}

.project-sprung {
    grid-column: span 1;
}

.project-image {
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
    aspect-ratio: 16 / 10;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-image-light {
    background: #ffffff;
}

/* Crop the furnace image */
.project-card:nth-child(4) .project-image img {
    object-position: center 30%;
}

/* Placeholder image styling */
.project-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border: 1px dashed rgba(212, 165, 116, 0.3);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.6;
}

.placeholder-text {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

/* ==========================================================================
   Technology Section
   ========================================================================== */
.technology {
    padding: var(--space-2xl) var(--space-md);
    background: var(--bg-primary) url('assets/newbgs/tech.png') center center / cover no-repeat;
    position: relative;
}

.technology .section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.technology .section-headline {
    text-align: center;
    margin-bottom: var(--space-xs);
}

.tech-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.tech-category {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: var(--space-md);
    transition: all var(--transition-base);
}

.tech-category:hover {
    border-color: rgba(212, 165, 116, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tech-category h3 {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-gold);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: flex-start;
}

.tech-badge {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.75rem 0.375rem 0.75rem;
    transition: transform var(--transition-fast), opacity 0.5s ease, translate 0.5s ease;
    cursor: default;
    opacity: 0;
    translate: 0 20px;
}

.tech-badge.visible {
    opacity: 1;
    translate: 0 0;
}

.tech-badge:hover {
    transform: translateY(-4px);
}

.tech-badge img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.tech-badge img.landscape {
    width: 72px;
    height: 48px;
}

/* Tooltip on hover (desktop) */
.tech-badge .tech-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background: #BDC6D6;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #02172e;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    margin-top: 0;
}

.tech-badge:hover .tech-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Mobile label (always visible) */
.tech-badge .tech-label {
    display: none;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Text-based icons for missing SVGs */
.tech-badge-text .tech-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-gold);
    background: var(--accent-gold-dim);
    border-radius: 8px;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.tech-badge-text:hover .tech-icon {
    opacity: 0.85;
}

/* Mobile: show labels instead of tooltips */
@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }

    .tech-badge .tech-tooltip {
        display: none;
    }

    .tech-badge .tech-label {
        display: block;
    }

    .tech-badge img,
    .tech-badge-text .tech-icon {
        width: 40px;
        height: 40px;
    }
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
}

.project-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    margin-bottom: var(--space-xs);
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.project-content p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    flex-grow: 1;
}

.project-stats {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-gold);
    line-height: 1;
}

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

/* Sprung Project Card with Logo */
.project-sprung {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
}

.project-header-with-logo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xs);
}

.project-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: var(--space-sm);
}

@media (max-width: 1024px) {
    .project-sprung {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Philosophy Section / Quote Box
   ========================================================================== */
.philosophy {
    padding: var(--space-2xl) var(--space-md);
    background: var(--bg-primary) url('assets/newbgs/quotebox.png') center center / cover no-repeat;
    position: relative;
}

.philosophy-quote {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.philosophy-quote p {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

.philosophy-quote p::before {
    content: '"';
    position: absolute;
    top: -0.5em;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8rem;
    font-family: var(--font-serif);
    color: var(--accent-gold);
    opacity: 0.15;
    line-height: 1;
}

.philosophy-quote footer {
    font-size: 1rem;
    color: var(--text-secondary);
}

.philosophy-quote footer p {
    font-family: var(--font-sans);
    font-style: normal;
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.philosophy-personal {
    font-family: var(--font-serif) !important;
    font-style: italic !important;
    font-size: 1.25rem !important;
    color: var(--accent-gold) !important;
    margin-top: var(--space-sm);
}

/* ==========================================================================
   Gallery Section (Machining Work)
   ========================================================================== */
.gallery {
    padding: var(--space-lg) 0;
    background: var(--bg-primary);
}

.gallery-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-gold) var(--bg-primary);
    padding: var(--space-sm) var(--space-md);
}

.gallery-scroll::-webkit-scrollbar {
    height: 6px;
}

.gallery-scroll::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.gallery-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 3px;
}

.gallery-track {
    display: flex;
    gap: var(--space-sm);
    width: max-content;
}

.gallery-item {
    flex-shrink: 0;
    width: 350px;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-primary);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
    padding: var(--space-2xl) var(--space-md);
    background: var(--bg-primary) url('assets/newbgs/contact.png') center center / cover no-repeat;
    position: relative;
}

.contact-intro {
    font-size: 1.25rem;
    max-width: 700px;
    margin-bottom: var(--space-lg);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-md);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.contact-card:hover {
    border-color: rgba(212, 165, 116, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.contact-card h3 {
    font-size: 0.875rem;
    font-family: var(--font-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    margin-bottom: var(--space-xs);
}

.contact-card a,
.contact-card p {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin: 0;
}

.contact-cta {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-closing {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--accent-gold);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: var(--space-lg) var(--space-md);
    background: var(--bg-primary);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-name {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.footer-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--accent-gold);
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .hero {
        padding-top: var(--space-md);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-left: var(--space-sm);
        padding-top: var(--space-xs);
        gap: var(--space-sm);
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-avatar-wrapper {
        max-width: 280px;
    }

    .hero-image {
        justify-content: center;
        margin-left: 0;
        margin-top: 0;
    }

    .hero-name-container {
        margin-bottom: var(--space-xs);
    }

    .hero-cta {
        justify-content: center;
        margin-top: var(--space-md);
    }

    .hero-blurb {
        margin-left: auto;
        margin-right: auto;
        min-height: 2em;
    }

    .hero-rotating-container {
        margin-bottom: 0;
    }

    .hero-scroll {
        display: none;
    }

    .hero-text {
        text-align: left;
        align-items: flex-start;
    }

    .hero-name-container {
        width: 100%;
    }

    .hero-name-svg {
        margin-left: 0;
        margin-right: auto;
        width: 100%;
    }

    .hero-name-svg.christopher .svg-wrapper {
        width: 100%;
        max-width: 100%;
        height: 60px;
    }

    .hero-name-svg.culbreath .svg-wrapper {
        width: 100%;
        max-width: 100%;
        height: 50px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .about-image {
        order: -1;
    }

    .about-illustration {
        max-width: 100%;
    }

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

    /* Project cards stack on tablet/mobile */
    .project-card {
        grid-template-columns: 1fr;
    }

    .project-card:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .project-card:nth-child(even) .project-image,
    .project-card:nth-child(even) .project-content {
        order: unset;
    }

    .project-sprung {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
        --space-2xl: 6rem;
    }

    .nav-links {
        display: none;
    }

    .timeline {
        padding-left: var(--space-md);
    }

    .timeline-marker {
        left: calc(-1 * var(--space-md) - 6px);
    }

    .gallery-item {
        width: 280px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-avatar-wrapper {
        max-width: 220px;
    }

    .btn {
        width: 100%;
    }

    .hero-cta {
        flex-direction: column;
    }

    .project-stats {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* ==========================================================================
   Animation Classes
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for grid items */
.skill-card:nth-child(1) { transition-delay: 0ms; }
.skill-card:nth-child(2) { transition-delay: 100ms; }
.skill-card:nth-child(3) { transition-delay: 200ms; }

.timeline-item:nth-child(1) { transition-delay: 0ms; }
.timeline-item:nth-child(2) { transition-delay: 100ms; }
.timeline-item:nth-child(3) { transition-delay: 200ms; }
.timeline-item:nth-child(4) { transition-delay: 300ms; }
.timeline-item:nth-child(5) { transition-delay: 400ms; }
.timeline-item:nth-child(6) { transition-delay: 500ms; }

.project-card:nth-child(1) { transition-delay: 0ms; }
.project-card:nth-child(2) { transition-delay: 100ms; }
.project-card:nth-child(3) { transition-delay: 200ms; }
.project-card:nth-child(4) { transition-delay: 300ms; }
.project-card:nth-child(5) { transition-delay: 400ms; }
.project-card:nth-child(6) { transition-delay: 500ms; }

/* Selection styling */
::selection {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

::-moz-selection {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform var(--transition-base);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 4px;
}

.lightbox-image-wrapper.light-bg {
    background: white;
    padding: var(--space-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-image-wrapper.light-bg .lightbox-content {
    box-shadow: none;
}

.lightbox-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-primary);
}

.gallery-item {
    cursor: zoom-in;
}

/* ==========================================================================
   Rotating Student Quotes
   ========================================================================== */
.student-quotes {
    position: relative;
    min-height: 180px;
}

.student-quote {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.student-quote.active {
    opacity: 1;
}

.student-quote p {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    text-align: center;
}


.student-quote cite {
    display: block;
    font-family: var(--font-sans);
    font-style: normal;
    font-size: 0.875rem;
    color: var(--accent-gold);
    margin-top: var(--space-md);
    letter-spacing: 0.05em;
}

.quote-dots {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    margin-top: var(--space-md);
}

.quote-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}

.quote-dot.active,
.quote-dot:hover {
    background: var(--accent-gold);
    transform: scale(1.2);
}

/* ==========================================================================
   Photography Gallery
   ========================================================================== */
.gallery-section {
    padding: var(--space-2xl) var(--space-md);
    background: var(--bg-primary) url('assets/newbgs/photography.png') center center / cover no-repeat;
    position: relative;
}

.gallery-section .section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: var(--space-lg);
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-header h3 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.gallery-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.photo-gallery-item {
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(80, 200, 220, 0.3);
    transition: all var(--transition-base);
    box-shadow:
        0 0 15px rgba(80, 200, 220, 0.2),
        0 0 30px rgba(80, 200, 220, 0.1),
        inset 0 0 20px rgba(80, 200, 220, 0.05);
}

.photo-gallery-item:hover {
    border-color: rgba(80, 200, 220, 0.6);
    box-shadow:
        0 0 20px rgba(80, 200, 220, 0.4),
        0 0 40px rgba(80, 200, 220, 0.2),
        0 0 60px rgba(80, 200, 220, 0.1),
        inset 0 0 25px rgba(80, 200, 220, 0.1);
    transform: translateY(-4px);
}

.photo-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.photo-gallery-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 1024px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .student-quotes {
        min-height: 220px;
    }
}

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