/**
 * James Osborn Portfolio - Main Stylesheet
 * Organized by: Base → Typography → Layout → Components → Utilities → Responsive
 */

/* ============================================================
   BASE & RESET
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    /* Colors */
    --primary-color: #1A1A1A;
    --secondary-color: #274E36;
    --accent-color: #7C1E29;
    --accent-light: #C7A570;

    /* Text Colors */
    --text-primary: #1A1A1A;
    --text-secondary: #3D3D3D;
    --text-light: #6b7280;

    /* Background Colors */
    --background: #ffffff;
    --background-light: #f8fafc;

    /* Border & Shadow */
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Navigation States */
    --nav-bg-default: rgba(255, 255, 255, 0.95);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.98);
    --nav-shadow-scrolled: 0 2px 20px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --section-padding: 5rem 0;
    --container-max-width: 1200px;
    --container-padding: 0 2rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-secondary);
    background-color: var(--background);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', sans-serif;
    color: var(--text-primary);
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--accent-color);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--secondary-color);
}

h4 {
    font-size: 1rem;
    font-weight: 600;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

.section {
    padding: var(--section-padding);
}

.section-alt {
    background-color: var(--background-light);
}

/* ============================================================
   COMPONENTS - Navigation
   ============================================================ */

.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg-default);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-scrolled {
    background: var(--nav-bg-scrolled);
    box-shadow: var(--nav-shadow-scrolled);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: var(--container-max-width);
    margin: 0 auto;
    min-height: 4rem;
}

.logo {
    height: 2rem;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Lato', sans-serif;
    transition: color 0.3s ease;
}

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

/* ============================================================
   COMPONENTS - Hero Section
   ============================================================ */

.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, var(--background) 0%, var(--background-light) 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text .lead {
    margin-bottom: 2rem;
}

.hero-stats {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.stat {
    text-align: center;
    margin-bottom: 1.5rem;
}

.stat:last-child {
    margin-bottom: 0;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    display: block;
    font-family: 'Lato', sans-serif;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   COMPONENTS - About Section
   ============================================================ */

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.expertise-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-light);
}

.expertise-item h4 {
    margin-bottom: 0.5rem;
}

.expertise-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================================
   COMPONENTS - Experience Section
   ============================================================ */

.experience-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-light);
    text-align: left;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.experience-title {
    flex: 1;
}

.experience-title h3 {
    margin-bottom: 0.25rem;
}

.experience-meta {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 2rem;
}

.company {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: 'Lato', sans-serif;
}

.company:hover {
    color: var(--secondary-color);
}

.company-logo {
    width: 80px;
    height: 40px;
    border-radius: 6px;
    object-fit: contain;
    background: white;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-right: 1rem;
    flex-shrink: 0;
}

.period {
    color: var(--text-light);
    font-size: 0.875rem;
    white-space: nowrap;
    margin-left: 2rem;
}

.experience-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.achievements {
    list-style: none;
}

.achievements li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.achievements li::before {
    content: "▸";
    color: var(--accent-light);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* ============================================================
   COMPONENTS - Leadership Section
   ============================================================ */

.leadership-content {
    text-align: center;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.leadership-content h2 {
    margin-bottom: 1.5rem;
}

.leadership-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ============================================================
   COMPONENTS - Blog Section
   ============================================================ */

.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-light);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.blog-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: inherit;
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    gap: 2rem;
}

.blog-content {
    flex: 1;
}

.blog-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-family: 'Lato', sans-serif;
}

.blog-date {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-image {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--background-light);
    flex-shrink: 0;
}

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

.blog-tag {
    background: var(--background-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.blog-error {
    text-align: center;
    padding: 3rem;
    color: var(--accent-color);
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.blog-error ul {
    text-align: left;
    margin: 1rem 0;
}

.blog-error .error-detail {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ============================================================
   COMPONENTS - Contact Section
   ============================================================ */

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content h2 {
    margin-bottom: 1.5rem;
}

.contact-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-item {
    text-align: center;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.25rem;
}

.contact-item a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
}

.contact-item a:hover {
    color: var(--accent-color);
}

/* ============================================================
   COMPONENTS - Logo Scroller
   ============================================================ */

.logo-scroller {
    margin: 3rem 0 2rem 0;
    overflow: hidden;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    border-left: 4px solid var(--accent-light);
}

.logo-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    animation: scroll 30s linear infinite;
    width: calc(200% + 6rem);
}

.logo-item {
    flex-shrink: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
}

.logo-item:hover {
    transform: scale(1.1);
    opacity: 1;
}

.scroller-logo {
    max-height: 50px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.logo-item:hover .scroller-logo {
    filter: grayscale(0%);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.logo-scroller:hover .logo-track {
    animation-play-state: paused;
}

/* ============================================================
   COMPONENTS - Footer
   ============================================================ */

.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p,
.footer-content {
    color: rgba(255, 255, 255, 0.7);
}

.footer-logo {
    height: 20px;
    width: auto;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    vertical-align: middle;
}

.footer-logo:hover {
    opacity: 0.9;
}

/* ============================================================
   COMPONENTS - Buttons
   ============================================================ */

.cta-button {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================================
   UTILITIES
   ============================================================ */

/* Skip Navigation Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

.imgicon {
    max-width: 30px;
    max-height: auto;
}

.blog-cta {
    margin-top: 2rem;
}

.hidden {
    display: none;
}

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

.text-center.blog-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

h2.text-center {
    margin-bottom: 3rem;
}

/* Accessibility - Focus styles */
a:focus,
.cta-button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE - Mobile & Tablet
   ============================================================ */

@media (max-width: 768px) {
    :root {
        --container-padding: 0 1rem;
        --section-padding: 3rem 0;
    }

    /* Typography adjustments */
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    /* Navigation */
    .nav-container {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    /* Experience */
    .experience-header {
        flex-direction: column;
        gap: 1rem;
    }

    .experience-meta {
        margin-left: 0;
        justify-content: space-between;
        width: 100%;
    }

    /* Contact */
    .contact-info {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Logo Scroller */
    .logo-scroller {
        margin: 2rem 0 1rem 0;
        padding: 1.5rem;
    }

    .logo-track {
        gap: 2rem;
        animation-duration: 20s;
    }

    .scroller-logo {
        max-height: 40px;
        max-width: 100px;
    }
}
