/* ============================================
   Sean Gibson Portfolio
   Elegant, Accessible, Vibrant
   ============================================ */

/* ---- CSS Custom Properties ---- */
:root {
    /* Colors */
    --color-bg: #faf9f6;
    --color-bg-alt: #f0eeea;
    --color-surface: #ffffff;
    --color-text: #1a1a2e;
    --color-text-secondary: #4a4a5e;
    --color-text-muted: #6e6e80;

    /* Vibrant Palette */
    --color-purple: #7c3aed;
    --color-purple-light: #a78bfa;
    --color-purple-dark: #5b21b6;
    --color-teal: #14b8a6;
    --color-teal-light: #5eead4;
    --color-coral: #f97316;
    --color-coral-light: #fdba74;
    --color-rose: #e11d48;
    --color-rose-light: #fda4af;
    --color-sky: #0ea5e9;
    --color-sky-light: #7dd3fc;
    --color-lime: #84cc16;
    --color-amber: #f59e0b;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #7c3aed 0%, #0ea5e9 50%, #14b8a6 100%);
    --gradient-warm: linear-gradient(135deg, #f97316 0%, #e11d48 50%, #7c3aed 100%);
    --gradient-cool: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 50%, #84cc16 100%);
    --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #e11d48 100%);
    --gradient-teal: linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%);
    --gradient-glass: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);

    /* Typography */
    --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;

    /* Sizing */
    --container-max: 72rem;
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(26, 26, 46, 0.06);
    --shadow-md: 0 4px 12px rgba(26, 26, 46, 0.08);
    --shadow-lg: 0 12px 40px rgba(26, 26, 46, 0.12);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);

    /* Motion */
    --transition-fast: 150ms ease-out;
    --transition-base: 250ms ease-out;
    --transition-slow: 400ms ease-out;

    /* Z-index */
    --z-skip: 1000;
    --z-nav: 100;
    --z-modal: 200;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ---- Accessibility ---- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-sm);
    z-index: var(--z-skip);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-text);
    color: var(--color-bg);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-sm);
    outline: 3px solid var(--color-teal);
    outline-offset: 2px;
}

*:focus-visible {
    outline: 3px solid var(--color-teal);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

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

    html {
        scroll-behavior: auto;
    }
}

/* ---- Typography ---- */
.font-display {
    font-family: var(--font-display);
}

.accent-italic {
    font-family: var(--font-display);
    font-style: italic;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    margin-bottom: var(--space-xl);
}

.section-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--gradient-glass);
    color: var(--color-purple);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-text);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    background: rgba(250, 249, 246, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(26, 26, 46, 0.06);
    transition: box-shadow var(--transition-base), background var(--transition-base);
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(250, 249, 246, 0.95);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.brand-name {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    padding: var(--space-xs) var(--space-sm);
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--color-purple);
    background: var(--gradient-glass);
}

.nav-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--gradient-glass);
}

.hamburger {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-fast);
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    top: 6px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-md);
    overflow: hidden;
    background: var(--color-bg);
}

.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--color-purple-light);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--color-teal-light);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--color-coral-light);
    top: 40%;
    right: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 200px;
    height: 200px;
    background: var(--color-sky-light);
    bottom: 20%;
    right: 10%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 50rem;
    text-align: center;
}

.hero-greeting {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.emoji-wave {
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
    transform-origin: 70% 70%;
    will-change: transform;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-10deg); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.hero-title em {
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    max-width: 36rem;
    margin: 0 auto var(--space-lg);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-hero);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 2px solid rgba(26, 26, 46, 0.1);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    border-color: var(--color-purple-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-emoji {
    font-size: 1.25rem;
    line-height: 1;
}

.scroll-hint {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    animation: bounce 2s ease-in-out infinite;
    will-change: transform;
}

.scroll-emoji {
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: var(--color-bg-alt);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.about-card {
    background: var(--color-surface);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
    line-height: 1;
}

.about-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.about-card p {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.card-highlight {
    border: 2px solid transparent;
    background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
                var(--gradient-hero) border-box;
}

.card-gradient-purple {
    background: linear-gradient(135deg, var(--color-surface) 0%, rgba(124, 58, 237, 0.06) 100%);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.card-gradient-teal {
    background: linear-gradient(135deg, var(--color-surface) 0%, rgba(20, 184, 166, 0.06) 100%);
    border: 1px solid rgba(20, 184, 166, 0.1);
}

.card-gradient-warm {
    background: linear-gradient(135deg, var(--color-surface) 0%, rgba(249, 115, 22, 0.06) 100%);
    border: 1px solid rgba(249, 115, 22, 0.1);
}

.card-gradient-cool {
    background: linear-gradient(135deg, var(--color-surface) 0%, rgba(20, 184, 166, 0.06) 100%);
    border: 1px solid rgba(20, 184, 166, 0.1);
}

.about-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.story-content {
    max-width: 40rem;
}

.story-lead {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.story-content p {
    margin-bottom: var(--space-sm);
    color: var(--color-text-secondary);
}

.story-content strong {
    color: var(--color-text);
    font-weight: 600;
}

.story-values {
    background: var(--color-surface);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.story-values h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.values-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.values-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 1rem;
}

.value-emoji {
    font-size: 1.5rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.value-text strong {
    color: var(--color-text);
}

/* ============================================
   WORK SECTION
   ============================================ */
.work {
    background: var(--color-bg);
}

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

.work-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.work-card-featured {
    grid-column: 1 / -1;
    flex-direction: row;
    min-height: 20rem;
}

.work-card-visual {
    position: relative;
    min-height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.work-card-featured .work-card-visual {
    min-height: auto;
    width: 40%;
}

.work-card:not(.card-featured) .work-card-visual {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.06) 0%, rgba(14, 165, 233, 0.06) 100%);
}

.visual-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
    will-change: transform;
    transform: translateZ(0);
}

.visual-1 {
    width: 200px;
    height: 200px;
    background: var(--color-purple-light);
    top: -50px;
    right: -50px;
}

.visual-2 {
    width: 150px;
    height: 150px;
    background: var(--color-teal-light);
    bottom: -30px;
    left: -30px;
}

.visual-3 {
    width: 120px;
    height: 120px;
    background: var(--color-coral-light);
    top: 20%;
    right: 10%;
}

.visual-4 {
    width: 100px;
    height: 100px;
    background: var(--color-sky-light);
    bottom: 10%;
    left: 20%;
}

.visual-5 {
    width: 130px;
    height: 130px;
    background: var(--color-lime);
    opacity: 0.4;
    top: 30%;
    left: 10%;
}

.work-emoji {
    font-size: 4rem;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.work-card-featured .work-emoji {
    font-size: 5rem;
}

.work-card-content {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.work-card-subtitle {
    font-size: 0.875rem;
    color: var(--color-purple);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.work-card p {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.work-highlights {
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(26, 26, 46, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.work-highlights li {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.card-featured {
    background: linear-gradient(135deg, var(--color-surface) 0%, rgba(124, 58, 237, 0.04) 50%, rgba(14, 165, 233, 0.04) 100%);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.card-featured .work-card-visual {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(14, 165, 233, 0.1) 50%, rgba(20, 184, 166, 0.1) 100%);
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills {
    background: var(--color-bg-alt);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: var(--space-md);
}

.skill-category {
    background: var(--color-surface);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.skill-icon {
    font-size: 2rem;
    line-height: 1;
}

.skill-header h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-text);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.skill-pill {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--gradient-glass);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: 1px solid rgba(124, 58, 237, 0.1);
    transition: all var(--transition-fast);
}

.skill-pill:hover {
    background: var(--gradient-hero);
    color: white;
    border-color: transparent;
}

/* ============================================
   COMMUNITY SECTION
   ============================================ */
.community {
    background: var(--color-bg);
    position: relative;
    overflow: hidden;
}

.community-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.community-content .section-tag {
    margin-bottom: var(--space-sm);
}

.community-content .section-title {
    margin-bottom: var(--space-md);
}

.community-lead {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.community-content p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.community-stats {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(26, 26, 46, 0.08);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--color-purple);
    font-weight: 600;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.community-visual {
    position: relative;
    min-height: 30rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.5;
    will-change: transform;
    transform: translateZ(0);
}

.community-1 {
    width: 250px;
    height: 250px;
    background: var(--color-rose-light);
    top: 10%;
    left: 10%;
}

.community-2 {
    width: 200px;
    height: 200px;
    background: var(--color-amber);
    opacity: 0.4;
    bottom: 20%;
    right: 10%;
}

.community-3 {
    width: 180px;
    height: 180px;
    background: var(--color-lime);
    opacity: 0.3;
    top: 40%;
    right: 20%;
}

.community-floating {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.float-emoji {
    font-size: 3rem;
    padding: var(--space-md);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float-emoji 6s ease-in-out infinite;
    line-height: 1;
}

.float-emoji:nth-child(1) { animation-delay: 0s; }
.float-emoji:nth-child(2) { animation-delay: -1.5s; }
.float-emoji:nth-child(3) { animation-delay: -3s; }
.float-emoji:nth-child(4) { animation-delay: -4.5s; }

@keyframes float-emoji {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: var(--gradient-hero);
    color: white;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.contact-inner {
    position: relative;
    z-index: 1;
}

.contact-content {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto var(--space-xl);
}

.contact-content .section-tag {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.contact-content .section-title {
    color: white;
    margin-bottom: var(--space-md);
}

.contact-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    line-height: 1.7;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    max-width: 50rem;
    margin: 0 auto;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.contact-link:hover,
.contact-link:focus-visible {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.contact-emoji {
    font-size: 2.5rem;
    line-height: 1;
}

.contact-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.contact-value {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
}

.card-gradient-warm {
    border-top: 4px solid var(--color-coral);
}

.card-gradient-cool {
    border-top: 4px solid var(--color-teal);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--color-text);
    color: var(--color-bg);
    padding: var(--space-xl) 0;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
}

.footer-motto {
    font-size: 1.125rem;
    opacity: 0.7;
    max-width: 30rem;
}

.footer-copyright {
    font-size: 0.9375rem;
    opacity: 0.5;
    margin-top: var(--space-sm);
}

/* ============================================
   TWEMOJI STYLES (to prevent flash)
   ============================================ */
img.emoji {
    height: 1em;
    width: 1em;
    margin: 0 0.05em 0 0.1em;
    vertical-align: -0.1em;
    display: inline-block;
}

/* Hide emoji until twemoji processes them */
.emoji-wave,
.btn-emoji,
.scroll-emoji,
.card-icon,
.work-emoji,
.work-highlights span,
.skill-icon,
.value-emoji,
.float-emoji,
.contact-emoji,
.footer-brand span,
.footer-copyright span {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.twemoji-loaded .emoji-wave,
body.twemoji-loaded .btn-emoji,
body.twemoji-loaded .scroll-emoji,
body.twemoji-loaded .card-icon,
body.twemoji-loaded .work-emoji,
body.twemoji-loaded .work-highlights span,
body.twemoji-loaded .skill-icon,
body.twemoji-loaded .value-emoji,
body.twemoji-loaded .float-emoji,
body.twemoji-loaded .contact-emoji,
body.twemoji-loaded .footer-brand span,
body.twemoji-loaded .footer-copyright span {
    opacity: 1;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    :root {
        --space-3xl: 5rem;
        --space-2xl: 4rem;
    }

    /* Disable expensive backdrop-filter on mobile for smooth scrolling */
    .site-header,
    .site-header.is-scrolled {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(250, 249, 246, 0.98);
    }

    /* Disable heavy blur animations during scroll on mobile */
    .shape {
        animation: none;
        filter: blur(30px);
        opacity: 0.35;
    }

    .float-emoji {
        animation: none;
    }

    .scroll-hint {
        animation: none;
    }

    .emoji-wave {
        animation: none;
    }

    .community-shape {
        filter: blur(25px);
        opacity: 0.3;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-xs);
        border-bottom: 1px solid rgba(26, 26, 46, 0.08);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 18rem;
        justify-content: center;
    }

    .about-story {
        grid-template-columns: 1fr;
    }

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

    .work-card-featured {
        flex-direction: column;
    }

    .work-card-featured .work-card-visual {
        width: 100%;
        min-height: 12rem;
    }

    .community-inner {
        grid-template-columns: 1fr;
    }

    .community-visual {
        min-height: 20rem;
        order: -1;
    }

    .community-stats {
        flex-direction: column;
        gap: var(--space-md);
    }

    .contact-links {
        grid-template-columns: 1fr;
        max-width: 24rem;
    }

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

@media (max-width: 480px) {
    body {
        font-size: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .story-lead,
    .community-lead {
        font-size: 1.25rem;
    }

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

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .site-header,
    .hero-shapes,
    .scroll-hint,
    .community-visual,
    .contact-links a[href^="mailto"] {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    .section {
        padding: 2rem 0;
    }

    body {
        background: white;
        color: black;
    }

    .work-card,
    .about-card,
    .skill-category {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    :root {
        --color-text: #000000;
        --color-text-secondary: #333333;
        --color-bg: #ffffff;
    }

    .btn-primary {
        border: 2px solid white;
    }

    .skill-pill {
        border: 2px solid currentColor;
    }

    .work-card,
    .about-card,
    .skill-category {
        border: 2px solid var(--color-text);
    }
}
