/**
 * Mason Made This - The Mason Style
 * Deep sea / bioluminescent aesthetic with OKLCH color framework
 * 
 * @version 10
 * @author Mason
 */

/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    /* Text */
    --text-surface: #c9cdd6;
    --text-mid: #8b919e;
    --text-deep: #5c6170;
    
    /* Bioluminescence - glow effects only */
    --neon-purple: #a78bfa;
    --neon-coral: #fb7185;
    --neon-cyan: #22d3ee;
    --neon-green: #4ade80;
    --neon-teal: #2dd4bf;
    --neon-pink: #f472b6;
    
    /* Glow intensities */
    --glow-subtle: 0 0 20px;
    --glow-medium: 0 0 40px;
    --glow-strong: 0 0 60px;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-surface);
    line-height: 1.6;
    overflow-x: hidden;
    
    /* 
     * OKLCH gradient with collapsing chroma
     * As luminance decreases, chroma approaches 0
     * Hue 260 = cool blue-ish, but irrelevant at low chroma
     * Result: smooth transition to true neutral black
     */
    background: linear-gradient(180deg in oklch,
        oklch(20% 0.020 260) 0%,
        oklch(14% 0.015 260) 15%,
        oklch(10% 0.010 260) 30%,
        oklch(6% 0.005 260) 50%,
        oklch(3% 0.002 260) 70%,
        oklch(1% 0.000 0) 85%,
        oklch(0% 0 0) 100%
    );
    min-height: 100vh;
    position: relative;
}

/* Noise overlay - extremely subtle, breaks OLED uniformity */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.008;
    pointer-events: none;
    z-index: 10000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* ============================================
   ASCII CREATURES
   ============================================ */
.ascii-creature {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.2;
    white-space: pre;
    pointer-events: none;
    color: #4a4a52;
}

/* Opacity by depth */
.creature-surface { opacity: 0.2; }
.creature-shallow { opacity: 0.22; }
.creature-mid { opacity: 0.25; }
.creature-deep { opacity: 0.5; }
.creature-abyss { opacity: 0.6; }

/* Glow classes - color comes from glow, not fill */
.glow-purple { 
    color: var(--neon-purple); 
    text-shadow: var(--glow-medium) var(--neon-purple);
}
.glow-cyan { 
    color: var(--neon-cyan); 
    text-shadow: var(--glow-medium) var(--neon-cyan);
}
.glow-coral { 
    color: var(--neon-coral); 
    text-shadow: var(--glow-medium) var(--neon-coral);
}
.glow-teal { 
    color: var(--neon-teal); 
    text-shadow: var(--glow-medium) var(--neon-teal);
}
.glow-green { 
    color: var(--neon-green); 
    text-shadow: var(--glow-medium) var(--neon-green);
}
.glow-pink { 
    color: var(--neon-pink); 
    text-shadow: var(--glow-medium) var(--neon-pink);
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-surface);
    text-decoration: none;
}

.nav-logo span {
    color: var(--neon-coral);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-mid);
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--neon-cyan);
    background: rgba(34, 211, 238, 0.1);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--neon-teal);
    text-shadow: 0 0 10px var(--neon-teal);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--neon-teal);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-teal);
    animation: pulse 2s ease infinite;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 6rem 0;
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--neon-coral);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3.5rem, 10vw, 6rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

.hero-title .line { display: block; }
.hero-title .purple { color: var(--neon-purple); }
.hero-title .coral { color: var(--neon-coral); }

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-mid);
    max-width: 500px;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.hero-desc strong {
    color: var(--text-surface);
    font-weight: 500;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--neon-cyan);
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-deep);
    text-transform: uppercase;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 5rem 0;
    position: relative;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.section-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--neon-coral);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section-title span {
    color: var(--neon-purple);
}

/* Titles glow in deeper sections */
.section-deep .section-title span {
    text-shadow: var(--glow-subtle) var(--neon-purple);
}

/* ============================================
   PROJECTS
   ============================================ */
.project {
    display: grid;
    grid-template-columns: 60px 1fr 100px;
    gap: 2rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    align-items: start;
    transition: all 0.2s ease;
}

.project:last-child {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.project:hover {
    padding-left: 1rem;
}

.project:hover .project-title {
    color: var(--neon-purple);
    text-shadow: var(--glow-subtle) var(--neon-purple);
}

.project-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-deep);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-mid);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-deep);
    padding: 0.3rem 0.6rem;
    background: rgba(255,255,255,0.03);
    border-radius: 3px;
}

.tag.live {
    color: var(--neon-teal);
    background: rgba(45, 212, 191, 0.1);
}

.tag.gated {
    color: var(--neon-coral);
    background: rgba(251, 113, 133, 0.1);
}

.project-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    text-align: right;
}

.project-status.live { color: var(--neon-teal); }
.project-status.gated { color: var(--neon-coral); }

/* ============================================
   EXPERTISE
   ============================================ */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.expertise-card {
    padding: 1.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.expertise-card:hover {
    border-color: var(--neon-purple);
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.15);
}

.expertise-icon {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: var(--glow-medium) currentColor;
}

.expertise-icon.infra { color: var(--neon-cyan); }
.expertise-icon.security { color: var(--neon-coral); }
.expertise-icon.ops { color: var(--neon-green); }

.expertise-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.expertise-text {
    font-size: 0.85rem;
    color: var(--text-mid);
    line-height: 1.6;
}

/* ============================================
   TECH STACK
   ============================================ */
.stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.stack-item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-deep);
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.stack-item:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    text-shadow: var(--glow-subtle) var(--neon-cyan);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    padding: 8rem 0;
    text-align: center;
    position: relative;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cta-title span {
    color: var(--neon-coral);
    text-shadow: var(--glow-strong) var(--neon-coral);
}

.cta-text {
    color: var(--text-mid);
    margin-bottom: 2.5rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--neon-purple);
    color: black;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: var(--glow-medium) var(--neon-purple);
}

.cta-btn:hover {
    box-shadow: var(--glow-strong) var(--neon-purple);
    transform: translateY(-2px);
}

/* ============================================
   KELP GARDEN
   ============================================ */
.kelp-garden {
    position: relative;
    height: 180px;
    overflow: hidden;
    pointer-events: none;
}

.kelp {
    position: absolute;
    bottom: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    line-height: 1;
    white-space: pre;
    animation: sway 4s ease-in-out infinite;
    text-shadow: var(--glow-subtle) currentColor;
}

.kelp-green { color: var(--neon-green); }
.kelp-teal { color: var(--neon-teal); }
.kelp-cyan { color: var(--neon-cyan); }
.kelp-pink { color: var(--neon-pink); }

.kelp-1 { left: 3%; opacity: 0.6; animation-delay: 0s; }
.kelp-2 { left: 10%; opacity: 0.4; animation-delay: -1s; }
.kelp-3 { left: 18%; opacity: 0.7; animation-delay: -2s; }
.kelp-4 { left: 28%; opacity: 0.3; animation-delay: -0.5s; }
.kelp-5 { left: 38%; opacity: 0.5; animation-delay: -1.5s; }
.kelp-6 { left: 50%; opacity: 0.6; animation-delay: -2.5s; }
.kelp-7 { left: 60%; opacity: 0.4; animation-delay: -3s; }
.kelp-8 { left: 72%; opacity: 0.5; animation-delay: -1s; }
.kelp-9 { left: 82%; opacity: 0.6; animation-delay: -2s; }
.kelp-10 { left: 92%; opacity: 0.4; animation-delay: -0.5s; }

.anemone {
    position: absolute;
    bottom: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.45rem;
    line-height: 1;
    white-space: pre;
    text-shadow: var(--glow-subtle) currentColor;
}

.anemone-coral { color: var(--neon-coral); }
.anemone-purple { color: var(--neon-purple); }
.anemone-pink { color: var(--neon-pink); }

/* ============================================
   FOOTER
   ============================================ */
footer {
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.03);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-deep);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-deep);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--neon-coral);
    text-shadow: var(--glow-subtle) var(--neon-coral);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--neon-teal); }
    50% { opacity: 0.5; box-shadow: 0 0 4px var(--neon-teal); }
}

@keyframes sway {
    0%, 100% { transform: rotate(-3deg) translateX(0); }
    50% { transform: rotate(3deg) translateX(2px); }
}

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

/* ============================================
   RESPONSIVE - Mobile First Approach
   ============================================ */

/* Tablet and below (max-width: 900px) */
@media (max-width: 900px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero {
        min-height: 80vh;
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4.5rem);
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .project {
        grid-template-columns: 50px 1fr 80px;
        gap: 1rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    /* Reduce creature density on tablet */
    .ascii-creature:nth-child(even) {
        display: none;
    }
}

/* Mobile landscape and large phones (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
    
    /* Navigation */
    .nav-links {
        display: none;
    }
    
    .nav-inner {
        padding: 0;
    }
    
    .nav-logo {
        font-size: 0.85rem;
    }
    
    /* Hero */
    .hero {
        min-height: auto;
        padding: 3rem 0 4rem;
    }
    
    .hero-title {
        font-size: clamp(2.2rem, 14vw, 3.5rem);
        margin-bottom: 1.5rem;
    }
    
    .hero-desc {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    /* Sections */
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Projects */
    .project {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1.5rem 0;
    }
    
    .project:hover {
        padding-left: 0.5rem;
    }
    
    .project-num {
        display: none;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .project-desc {
        font-size: 0.85rem;
    }
    
    .project-status {
        text-align: left;
        margin-top: 0.25rem;
    }
    
    /* Expertise */
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .expertise-card {
        padding: 1.25rem;
    }
    
    .expertise-icon {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .expertise-title {
        font-size: 0.95rem;
    }
    
    .expertise-text {
        font-size: 0.8rem;
    }
    
    /* Stack */
    .stack-list {
        gap: 0.5rem;
    }
    
    .stack-item {
        font-size: 0.7rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* CTA */
    .cta-section {
        padding: 4rem 0;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-text {
        font-size: 0.95rem;
    }
    
    .cta-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Kelp garden */
    .kelp-garden {
        height: 120px;
    }
    
    .kelp {
        font-size: 0.4rem;
    }
    
    .anemone {
        font-size: 0.35rem;
    }
    
    /* Hide most creatures on mobile */
    .ascii-creature {
        display: none;
    }
    
    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Small phones (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Nav */
    nav {
        padding: 1rem 0;
    }
    
    .nav-logo {
        font-size: 0.8rem;
    }
    
    .nav-status {
        font-size: 0.6rem;
    }
    
    .status-dot {
        width: 5px;
        height: 5px;
    }
    
    /* Hero */
    .hero {
        padding: 2rem 0 3rem;
    }
    
    .hero-eyebrow {
        font-size: 0.55rem;
        letter-spacing: 0.15em;
        margin-bottom: 1rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 15vw, 3rem);
        margin-bottom: 1.25rem;
    }
    
    .hero-desc {
        font-size: 0.9rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }
    
    .hero-stats {
        gap: 1rem;
        justify-content: space-between;
    }
    
    .stat {
        flex: 1;
        min-width: 80px;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    /* Sections */
    .section {
        padding: 2.5rem 0;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .section-num {
        font-size: 0.6rem;
    }
    
    .section-title {
        font-size: 1.35rem;
    }
    
    /* Projects */
    .project {
        padding: 1.25rem 0;
    }
    
    .project-title {
        font-size: 1rem;
    }
    
    .project-desc {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .project-tags {
        gap: 0.35rem;
    }
    
    .tag {
        font-size: 0.55rem;
        padding: 0.25rem 0.5rem;
    }
    
    .project-status {
        font-size: 0.6rem;
    }
    
    /* Expertise */
    .expertise-card {
        padding: 1rem;
    }
    
    .expertise-icon {
        font-size: 1.1rem;
    }
    
    .expertise-title {
        font-size: 0.9rem;
    }
    
    .expertise-text {
        font-size: 0.75rem;
        line-height: 1.5;
    }
    
    /* Stack */
    .stack-item {
        font-size: 0.65rem;
        padding: 0.35rem 0.6rem;
    }
    
    /* CTA */
    .cta-section {
        padding: 3rem 0;
    }
    
    .cta-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .cta-text {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
    
    /* Kelp garden */
    .kelp-garden {
        height: 80px;
    }
    
    /* Hide half the kelp on very small screens */
    .kelp:nth-child(even) {
        display: none;
    }
    
    /* Footer */
    .footer-inner {
        font-size: 0.7rem;
    }
    
    .footer-links {
        gap: 1rem;
    }
    
    .footer-links a {
        font-size: 0.7rem;
    }
}

/* Extra small phones (max-width: 360px) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .stat {
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.55rem;
    }
    
    .cta-title {
        font-size: 1.3rem;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        margin-top: 1rem;
    }
}

/* High DPI / Retina adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .status-dot {
        box-shadow: 0 0 6px var(--neon-teal);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .status-dot,
    .kelp,
    .ascii-creature {
        animation: none;
    }
    
    .project,
    .expertise-card,
    .stack-item,
    .cta-btn,
    .nav-links a,
    .footer-links a {
        transition: none;
    }
}

/* Dark mode is default, but ensure consistency */
@media (prefers-color-scheme: light) {
    /* Site is intentionally dark - no light mode override */
}
