/* ==========================================================================
   CSS Variables
   ========================================================================== */
   :root {
    /* Colors */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-secondary: #000000;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e5e7eb;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Spacing & Layout */
    --container-width: 900px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    
    /* Transitions & Shadows */
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 60px; /* Accounts for sticky header */
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul {
    list-style: none;
}

/* Focus Accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* Fluid Typography using clamp() */
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 500; margin-bottom: 0.25rem; }
p { font-size: 1rem; color: var(--text-secondary); margin-bottom: 1.25rem; }

/* ==========================================================================
   Layout & Containers
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.bg-alt {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    text-align: left;
    margin-bottom: 3rem;
}

.content-wrapper {
    max-width: 70ch;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.logo {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

/* Hidden by default when at the top of the page */
.nav-logo {
    height: 24px;
    width: auto;
    max-width: 28px;
    opacity: 0;
    transform: scale(0.8) translateX(-8px);
    margin-right: 0;
    overflow: hidden;
    /* Smooth entrance matching your site's luxury easing curve */
    transition: 
        max-width 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s ease,
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        margin-right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reveals and slides into place when scrolled */
.site-header.scrolled .nav-logo {
    max-width: 28px; /* Gives the icon room to reveal */
    opacity: 1;
    transform: scale(1) translateX(0);
    margin-right: 0.65rem;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    color: #000000 !important;

    border-bottom: none;

    transition:
        background 0.3s ease,
        backdrop-filter 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.site-header.scrolled {
    background: rgba(250,250,250,0.92);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-bottom: 1px solid var(--border-color);

    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}
/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
    position: relative;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    padding: 4rem 6rem;

    overflow: hidden;
}

/* ------------------------------
   Mountain Banner
------------------------------- */

.hero-banner {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Dark overlay */

.hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            rgba(20,25,35,.45),
            rgba(20,25,35,.35)
        );
}

/* Fade into page */


/* ------------------------------
   Glass Card
------------------------------- */

.hero-content {
    position: relative;
    z-index: 3;

    width: min(650px, 90vw);

    padding: 3rem;

    background: rgba(255,255,255,.14);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255,255,255,.25);

    border-radius: 24px;

    box-shadow:
        0 30px 80px rgba(0,0,0,.25),
        inset 0 1px 1px rgba(255,255,255,.2);

    text-align: left;
}

.hero-content h1,
.hero-content h2,
.hero-content h3,
.hero-content p {
    text-align: left;
}

/* ------------------------------
   Logo
------------------------------- */

.hero-logo {
    width: 100%;
    /* Scales smoothly from ~220px on mobile to ~315px on desktop to mirror "Noah Dewar" */
    max-width: clamp(220px, 29vw, 315px);
    height: auto;

    margin: 0 0 -0.3rem 0;

    display: block;
}

/* ------------------------------
   Typography
------------------------------- */

.hero h1,
.hero h2,
.hero h3 {

    color: white;

    text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.hero-subtitle {

    font-size: clamp(1.35rem,2vw,1.7rem);

    font-weight: 400;

    margin-bottom: 1.5rem;

    letter-spacing: .04em;
}

.hero-description {

    color: rgba(255,255,255,.95);

    max-width: 700px;

    margin: 0 auto 2.75rem;

    font-size: clamp(1.1rem,2vw,1.3rem);

    line-height: 1.8;
}

/* ------------------------------
   Buttons
------------------------------- */

.hero-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero .btn-primary {

    background: white;

    color: #111827;

    border: none;
}

.hero .btn-primary:hover {

    background: #f3f3f3;

    transform: translateY(-2px);
}

.hero .btn-secondary {

    background: rgba(255,255,255,.08);

    color: white;

    border: 1px solid rgba(255,255,255,.45);

    backdrop-filter: blur(6px);
}

.hero .btn-secondary:hover {

    background: rgba(255,255,255,.18);
}

/* ------------------------------
   Mobile
------------------------------- */
@media (max-width: 768px) {

    .hero {
        justify-content: center;
        padding: 2rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content h1,
    .hero-content h2,
    .hero-content h3,
    .hero-content p {
        text-align: center;
    }

    .hero-logo {
        margin: 0 auto -0.3rem;
    }

    .hero-buttons {
        justify-content: center;
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-secondary);
}

.btn-primary:hover {
    background-color: #374151;
    color: var(--bg-secondary);
}

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

.btn-secondary:hover {
    background-color: var(--border-color);
}

/* ==========================================================================
   Cards & Grids
   ========================================================================== */
.grid {
    display: grid;
    gap: 1.5rem;
}

.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #d1d5db;
}

.card h3 {
    margin-bottom: 0.75rem;
}

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

/* ==========================================================================
   Lists & Timeline
   ========================================================================== */
.feature-list {
    margin-top: 2rem;
}

.feature-list li {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--border-color);
}

.feature-list strong {
    color: var(--text-primary);
    font-weight: 500;
}

.experience-timeline {
    border-left: 1px solid var(--border-color);
    padding-left: 2rem;
    margin-left: 0.5rem;
}

.experience-timeline li {
    position: relative;
    margin-bottom: 2.5rem;
}

.experience-timeline li:last-child {
    margin-bottom: 0;
}

.experience-timeline li::before {
    content: '';
    position: absolute;
    left: -2.35rem; /* center on border */
    top: 0.25rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.experience-timeline li:hover::before {
    border-color: var(--accent);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-card {
    max-width: 500px;
}

.contact-role {
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.contact-link {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.contact-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.contact-note {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.contact-note p {
    font-size: 0.875rem;
    margin: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-size: 0.875rem;
}

/* ==========================================================================
   Animations (Modular System)
   ========================================================================== */
/* Base setup for all animated elements */
.reveal-up, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 0;
    will-change: opacity, transform;
    /* Premium easing curve for a buttery-smooth feel */
    transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1.0s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Starting Positions */
.reveal-up { transform: translateY(20px); }
.reveal-left { transform: translateX(-30px); }
.reveal-right { transform: translateX(30px); }
.reveal-scale { transform: scale(0.95); }

/* The class added by JS to trigger the animation */
.is-visible.reveal-up, 
.is-visible.reveal-left, 
.is-visible.reveal-right,
.is-visible.reveal-scale {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Stagger Delays for Grids and Lists */
.stagger-1 { transition-delay: 0.07s; }
.stagger-2 { transition-delay: 0.14s; }
.stagger-3 { transition-delay: 0.21s; }
.stagger-4 { transition-delay: 0.28s; }

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal-up, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    
    .nav-links {
        display: none; /* Simplifies nav for pure CSS/HTML static site requirements without JS menus */
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}


/* ==========================================================================
   Images & Image Grids
   ========================================================================== */
.about-grid,
.philosophy-grid {
    display: grid;
    gap: 4rem;
    align-items: center;
}

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

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

.image-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    /* Soft shadow to match the cards */
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.feature-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    /* Subtle zoom effect on hover for a premium feel */
    transition: transform 0.5s ease;
}

.image-wrapper:hover .feature-image {
    transform: scale(1.02);
}

/* Make lists tighter when next to images */
.philosophy-grid .feature-list {
    margin-top: 1.5rem;
}

/* ==========================================================================
   Image Grid Mobile Responsive
   ========================================================================== */
@media (max-width: 850px) {
    .about-grid,
    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* Ensures the image shows up BEFORE the text on mobile for the Philosophy section */
    .image-first-mobile {
        order: -1; 
    }
}