/* -------------------------------------------------------------------
   CSS CUSTOM PROPERTIES
   ------------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --color-youtube: #FF0000;
    --color-codex: #FFBF00;
    --color-podcast: #872EC4;
    
    /* Typography */
    --font-heading: 'Lora', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Theme Colors */
    --color-bg: #FBF8F3;
    --color-panel: #FFFEF7;
    --color-text: #1C1917;
    --color-text-muted: #78716C;
    --color-pop: #1E40AF;
    --color-border: #E7E5E4;
}

/* -------------------------------------------------------------------
   RESET & BASE STYLES
   ------------------------------------------------------------------- */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 100px; 
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.7;
}

.container { 
    width: 90%; 
    max-width: 1280px; 
    margin: 0 auto; 
}

/* -------------------------------------------------------------------
   TYPOGRAPHY
   ------------------------------------------------------------------- */
h1, h2, h3, h4, h5 { 
    font-family: var(--font-heading); 
    font-weight: 600; 
    line-height: 1.3; 
    color: var(--color-text); 
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2rem); }
h3 { font-size: 1.25rem; }

p { 
    color: var(--color-text-muted); 
    max-width: 65ch; 
}

a { 
    color: var(--color-pop); 
    text-decoration: none; 
    transition: color 0.2s ease; 
}
a:hover { opacity: 0.8; }

.panel-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-pop);
    margin-bottom: 0px;
    display: block;
}

.section-title { 
    margin-bottom: 48px; 
    font-size: 1.5rem; 
    text-align: center; 
    letter-spacing: 0.5px; 
}

/* -------------------------------------------------------------------
   LAYOUT COMPONENTS
   ------------------------------------------------------------------- */
main { padding: 32px 0; }
.section { margin-bottom: 80px; }

.panel { 
    background-color: var(--color-panel); 
    box-shadow: 0 4px 25px rgba(30, 64, 175, 0.05); 
    padding: 32px; 
    border-radius: 16px; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
}

.grid { display: grid; gap: 24px; }
.two-col { grid-template-columns: 1fr 1fr; }
.three-col { grid-template-columns: 1fr 1fr 1fr; }

/* -------------------------------------------------------------------
   HEADER
   ------------------------------------------------------------------- */
.site-header {
    padding: 24px 0;
    border-bottom: 1px solid var(--color-border);
    background-color: color-mix(in srgb, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(10px);
    position: sticky; 
    top: 0; 
    z-index: 100;
}

.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 16px; 
    text-decoration: none; 
}

.logo-placeholder { 
    width: 48px; 
    height: 48px; 
    background-color: var(--color-text); 
    border-radius: 8px; 
    flex-shrink: 0; 
}

.logo-text { 
    font-family: var(--font-heading); 
    font-size: 1.5rem; 
    font-weight: 600; 
    color: var(--color-text); 
}

.site-nav a { 
    color: var(--color-text); 
    font-weight: 500; 
    margin-left: 32px; 
    font-size: 1.1rem; 
}

/* -------------------------------------------------------------------
   HERO SECTION
   ------------------------------------------------------------------- */
.hero-panel {
    background-color: var(--color-panel);
    box-shadow: 0 4px 25px rgba(30, 64, 175, 0.05);
    border-radius: 16px;
    margin: 0 0 32px 0;
    overflow: hidden;
}

.hero-content { 
    display: grid; 
    grid-template-columns: 1fr 55%; 
    align-items: center; 
    min-height: 350px;
}

.hero-image { 
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
}

.journeyman-image { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center; 
}

.hero-text { 
    padding: 48px; 
    display: flex; 
    flex-direction: column; 
    gap: 24px; 
}

.hero-text h1 { 
    color: var(--color-text); 
    margin-bottom: 0; 
    font-weight: 600; 
}

.hero-description { 
    font-size: 1.1rem; 
    color: var(--color-text); 
    max-width: none; 
    margin-bottom: 0; 
}

/* -------------------------------------------------------------------
   CATEGORIES SECTION
   ------------------------------------------------------------------- */
.categories-section { margin-bottom: 80px; }
.categories-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 24px; 
}

.category-panel {
    background-color: var(--color-panel);
    box-shadow: 0 4px 25px rgba(30, 64, 175, 0.05);
    padding: 32px 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s ease;
}
.category-panel:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.1); 
}

.category-image { 
    width: 100%; 
    height: auto; 
    object-fit: cover; 
}

.category-title { 
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem; 
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-pop);
    margin-bottom: 16px;
    text-align: center; 
}

.category-branches {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    width: 100%;
    text-align: left;
}

.sub-branch { 
    color: var(--color-text-muted); 
    font-weight: 400; 
}

/* -------------------------------------------------------------------
   WORK & PROJECTS SECTION
   ------------------------------------------------------------------- */
.featured-project { 
    background-color: var(--color-panel); 
    box-shadow: 0 4px 25px rgba(30, 64, 175, 0.05); 
    padding: 48px; 
    border-radius: 16px; 
    margin-bottom: 24px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 32px; 
}

.featured-project-info h2 { 
    margin-bottom: 12px; 
    letter-spacing: 0.5px; 
}

.featured-project-info p { 
    margin-bottom: 0; 
    font-size: 1.125rem; 
}

.work-tiles { 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
}

.work-tile { 
    background-color: var(--color-panel); 
    box-shadow: 0 4px 25px rgba(30, 64, 175, 0.05); 
    padding: 24px; 
    border-radius: 12px; 
    transition: all 0.2s ease; 
}
.work-tile:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.1); 
}

.work-tile h3 { font-size: 1.125rem; }
.work-tile .category { 
    font-size: 0.8rem; 
    color: var(--color-text-muted); 
    margin-top: 4px; 
}

.view-all-link { 
    text-align: right; 
    margin-top: 24px; 
    font-weight: 600; 
}

/* -------------------------------------------------------------------
   BUTTONS & CTAs
   ------------------------------------------------------------------- */
.cta-button { 
    display: inline-block; 
    background-color: var(--color-pop); 
    color: var(--color-bg); 
    font-family: var(--font-heading); 
    font-weight: 600; 
    font-size: 1rem; 
    padding: 16px 32px; 
    border-radius: 50px; 
    transition: all 0.2s ease; 
    flex-shrink: 0; 
    white-space: nowrap; 
    min-width: 0; 
}
.cta-button:hover { 
    opacity: 0.85; 
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.15); 
}

.hub-cta { 
    font-size: 0.9rem; 
    padding: 12px 24px; 
}
.hub-cta.disabled { 
    background-color: var(--color-text-muted); 
    opacity: 0.7; 
    cursor: not-allowed; 
}

/* -------------------------------------------------------------------
   JOURNEYMAN/PROFILE SECTION
   ------------------------------------------------------------------- */
.journeyman-panel-new { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 48px; 
}

.journeyman-left .section-header { margin-bottom: 32px; }

.profile-new { 
    display: grid; 
    grid-template-columns: 120px 1fr; 
    gap: 24px; 
    align-items: start; 
    margin-bottom: 20px; 
}

.headshot-new { 
    width: 120px; 
    height: 120px; 
    border-radius: 50%; 
    object-fit: cover; 
}

.profile-text { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}

.greeting-new { 
    font-family: var(--font-body); 
    font-weight: 600; 
    font-size: 1.1rem; 
    color: var(--color-text); 
    margin-bottom: 0; 
}

.bio-new { 
    font-size: 1.1rem; 
    color: var(--color-text); 
    margin-bottom: 0; 
    max-width: none; 
}

.connect-links-new { 
    display: flex; 
    gap: 16px; 
    flex-wrap: wrap; 
}
.connect-links-new a { 
    color: var(--color-text-muted); 
    text-decoration: none; 
    font-weight: 500; 
    font-size: 1rem; 
}
.connect-links-new a:hover { color: var(--color-pop); }

.journeyman-right .panel-title { margin-bottom: 24px; }

.now-list-new { list-style: none; }
.now-list-new li { 
    margin-bottom: 16px; 
    padding-left: 24px; 
    position: relative; 
    font-size: 1rem; 
}
.now-list-new li::before { 
    content: '→'; 
    position: absolute; 
    left: 0; 
    color: var(--color-pop); 
}

/* -------------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------------- */
.site-footer { 
    padding: 40px 0; 
    border-top: 1px solid var(--color-border); 
}

.footer-grid { 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
}

.footer-block { 
    border-radius: 16px; 
    overflow: hidden; 
    background-color: var(--color-bg); 
    color: var(--color-text); 
    text-align: center; 
    padding: 32px; 
}

.footer-block.youtube-block { 
    background-color: var(--color-youtube); 
    color: white; 
}
.footer-block.codex-block { 
    background-color: var(--color-codex); 
    color: var(--color-text); 
}
.footer-block.podcast-block { 
    background-color: var(--color-podcast); 
    color: white; 
}

.footer-block .panel-title { 
    color: inherit; 
    opacity: 0.7; 
    margin-bottom: 12px; 
    font-family: 'Inter', sans-serif; 
    font-weight: 600; 
}

.footer-block h3 { 
    font-family: 'Inter', sans-serif; 
    font-weight: 600; 
}

.footer-block p { 
    color: inherit; 
    opacity: 0.9; 
    margin: 16px auto; 
}

.footer-block .invite-button { 
    display: inline-block; 
    background-color: rgba(255, 255, 255, 0.9); 
    color: var(--color-text); 
    padding: 12px 24px; 
    border-radius: 50px; 
    font-weight: 600; 
    transition: all 0.2s ease; 
    font-family: 'Inter', sans-serif; 
}
.footer-block .invite-button:hover { 
    background-color: rgba(255, 255, 255, 1); 
    transform: translateY(-2px); 
}

.youtube-block .invite-button { color: var(--color-youtube); }
.codex-block .invite-button { color: #A87B00; }
.podcast-block .invite-button { color: var(--color-podcast); }

.copyright { 
    text-align: center; 
    font-size: 0.9rem; 
    color: var(--color-text-muted); 
    padding-top: 80px; 
}

/* -------------------------------------------------------------------
   HUB PAGE STYLES
   ------------------------------------------------------------------- */
.hub-hero {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 48px;
    align-items: center;
    margin: 0 0 80px 0;
    padding: 32px;
    background-color: var(--color-panel);
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(30, 64, 175, 0.05);
}

.hub-hero-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.hub-subtitle {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-top: 16px;
}

.hub-card { text-align: center; }
.hub-card .category-title { font-size: 1.5rem; }
.hub-card p { margin: 0 auto 24px auto; }

/* -------------------------------------------------------------------
   ABOUT PAGE STYLES
   ------------------------------------------------------------------- */
.about-philosophy {
    text-align: center;
    padding-bottom: 0;
}

.philosophy-headline {
    font-size: clamp(2rem, 5vw, 3rem);
}

.philosophy-subheadline {
    max-width: 750px;
    margin: 24px auto 0 auto;
    font-size: 1.15rem;
    color: var(--color-text);
}

.about-story-section { padding-top: 0; }

.story-text { 
    max-width: 700px; 
    margin: 0 auto; 
    background-color: var(--color-panel); 
    padding: 48px; 
    border-radius: 16px; 
    box-shadow: 0 4px 25px rgba(30, 64, 175, 0.05); 
}
.story-text p { margin-bottom: 24px; }

.about-story-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 64px;
    align-items: flex-start;
}

.story-image-container {
    position: sticky;
    top: 120px; /* Aligns with scroll padding */
}

.story-headshot {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
}

.story-headline {
    margin-bottom: 24px;
}

.story-text-content p {
    margin-bottom: 24px;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.start-here-section {
    background-color: var(--color-panel);
}

.start-here-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.start-here-card {
    border: 1px solid var(--color-border);
    padding: 24px;
    border-radius: 12px;
}

.start-here-card .card-pre-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.start-here-card h4 {
    margin: 4px 0 16px 0;
    font-size: 1.5rem;
}

.start-here-card a {
    font-weight: 600;
}

.principles-grid {
    gap: 48px;
}

.principle-item h3 {
    margin-bottom: 8px;
}

.final-cta-section {
    background-color: var(--color-text);
    color: var(--color-bg);
    text-align: center;
    padding: 64px 24px;
    border-radius: 16px;
}

.final-cta-section .cta-headline {
    color: var(--color-bg);
}

.final-cta-section p {
    color: var(--color-bg);
    opacity: 0.8;
    margin: 16px auto 32px auto;
}

/* ===================================================================
   RESPONSIVE DESIGN
   =================================================================== */

@media (max-width: 1100px) { 
    .categories-grid { 
        grid-template-columns: repeat(2, 1fr); 
    } 
}

@media (max-width: 900px) {
    .hero-content { grid-template-columns: 1fr; }
    .hero-text { text-align: center; }
    
    .journeyman-panel-new, 
    .two-col, 
    .three-col { 
        grid-template-columns: 1fr; 
        gap: 32px; 
        padding: 32px; 
    }
    
    .site-header { padding: 16px 0; }
    .site-nav { display: none; }
    
    .featured-project { 
        flex-direction: column; 
        text-align: center; 
    }
    
    .hub-hero { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    .hub-hero-image { 
        margin: 0 auto 24px auto; 
    }
    
    .about-story-grid {
        grid-template-columns: 1fr;
    }
    .story-image-container {
        position: static;
        max-width: 300px;
        margin: 0 auto 32px auto;
    }
}

@media (max-width: 780px) {
    .cta-button { 
        font-size: 0.9rem; 
        padding: 14px 24px; 
    }
    
    .hero-text { 
        padding: 32px 24px; 
    }
    .hero-panel { 
        margin: 16px 0; 
    }
    
    .hero-image { 
        display: block; 
        max-height: 250px; 
    } 
    
    .categories-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .profile-new { 
        grid-template-columns: 80px 1fr; 
        gap: 16px;
        text-align: left;
        align-items: center;
    }
    .headshot-new { 
        width: 80px; 
        height: 80px; 
    }
}
