/* ============================================
   Stephen McGill Personal Website
   Design: Editorial / Literary aesthetic
   ============================================ */

/* --- CSS Variables --- */
:root {
    /* Colors - Warm, sophisticated palette */
    --color-bg: #FDFBF7;
    --color-bg-alt: #F5F2EB;
    --color-text: #2C2825;
    --color-text-muted: #6B6560;
    --color-accent: #8B4513;
    --color-accent-hover: #A0522D;
    --color-border: #E5E0D8;
    --color-border-dark: #D1CCC3;
    
    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Layout */
    --max-width: 1100px;
    --max-width-narrow: 720px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 var(--space-sm);
    color: var(--color-text);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    margin: 0 0 var(--space-sm);
}

ul {
    margin: 0;
    padding-left: 1.25rem;
}

li {
    margin-bottom: 0.5rem;
}

/* --- Navigation --- */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}

.nav-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.02em;
}

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

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

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition-base);
}

/* --- Hero Section --- */
.hero {
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.hero-content {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
}

.hero-eyebrow {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

.hero-title {
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
}

.hero-divider {
    width: 60px;
    height: 1px;
    background: var(--color-border-dark);
    margin: var(--space-lg) auto;
}

.hero-intro {
    font-size: 1.1875rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

/* --- About Section --- */
.about {
    padding: var(--space-xl) var(--space-lg);
    background: var(--color-bg-alt);
}

.about-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-xl);
    max-width: var(--max-width);
    margin: 0 auto;
    align-items: start;
}

.about-image {
    position: sticky;
    top: var(--space-lg);
}

.image-placeholder {
    aspect-ratio: 1;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    border-radius: 4px;
}

.image-placeholder.tall {
    aspect-ratio: 2/3;
}

.about-text h2 {
    margin-bottom: var(--space-md);
}

.about-text p {
    color: var(--color-text-muted);
}

.about-links {
    margin-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.text-link {
    font-weight: 500;
}

/* --- Newsletter Section --- */
.newsletter {
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    background: var(--color-text);
    color: var(--color-bg);
}

.newsletter.compact {
    padding: var(--space-xl) var(--space-lg);
}

.newsletter-content {
    max-width: 540px;
    margin: 0 auto;
}

.newsletter h2 {
    color: var(--color-bg);
    margin-bottom: var(--space-sm);
}

.newsletter p {
    color: rgba(253, 251, 247, 0.8);
    margin-bottom: var(--space-lg);
}

.signup-form {
    margin-top: var(--space-md);
}

.form-row {
    display: flex;
    gap: var(--space-xs);
    max-width: 420px;
    margin: 0 auto;
}

.signup-form input[type="email"] {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    border: 1px solid rgba(253, 251, 247, 0.3);
    border-radius: 4px;
    background: rgba(253, 251, 247, 0.1);
    color: var(--color-bg);
    transition: var(--transition-base);
}

.signup-form input[type="email"]::placeholder {
    color: rgba(253, 251, 247, 0.5);
}

.signup-form input[type="email"]:focus {
    outline: none;
    border-color: rgba(253, 251, 247, 0.6);
    background: rgba(253, 251, 247, 0.15);
}

.signup-form button {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--color-text);
    background: var(--color-bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-base);
}

.signup-form button:hover {
    background: var(--color-bg-alt);
    transform: translateY(-1px);
}

.form-note {
    font-size: 0.8125rem;
    color: rgba(253, 251, 247, 0.5);
    margin-top: var(--space-sm);
    margin-bottom: 0;
}

/* --- Contact Section --- */
.contact {
    padding: var(--space-xl) var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
}

.contact h2 {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    max-width: 700px;
    margin: 0 auto;
}

.contact-item {
    text-align: center;
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: var(--transition-base);
}

.contact-item:hover {
    border-color: var(--color-border-dark);
    background: var(--color-bg-alt);
}

.contact-item h3 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.contact-item p {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.contact-item a {
    font-weight: 500;
}

/* --- Page Headers --- */
.page-header {
    padding: var(--space-2xl) var(--space-lg) var(--space-xl);
    text-align: center;
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
}

.page-eyebrow {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.page-intro {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 560px;
    margin: 0 auto;
}

.header-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 4px;
    transition: var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    color: white;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

/* --- Fiction Page --- */
.works-section {
    padding: var(--space-lg) var(--space-lg) var(--space-xl);
    max-width: var(--max-width);
    margin: 0 auto;
}

.works-section h2 {
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-lg);
}

.work-feature {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-lg);
}

.work-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: rgba(139, 69, 19, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    margin-bottom: var(--space-sm);
}

.work-feature-content h3 {
    font-size: 1.75rem;
    margin-bottom: var(--space-xs);
}

.work-genre {
    font-size: 0.9375rem;
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.work-description {
    color: var(--color-text-muted);
}

.coming-soon-note {
    padding: var(--space-lg);
    background: var(--color-bg-alt);
    border-radius: 4px;
    text-align: center;
}

.coming-soon-note p {
    margin: 0;
    color: var(--color-text-muted);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.work-card {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition-base);
}

.work-card:hover {
    border-color: var(--color-border-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.work-card-content {
    padding: var(--space-md);
}

.work-card-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.work-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

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

.prose-item {
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.prose-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.writing-philosophy {
    background: var(--color-bg-alt);
    padding: var(--space-xl) var(--space-lg);
    margin: var(--space-lg) 0;
}

.philosophy-content {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    font-size: 1.0625rem;
    color: var(--color-text-muted);
}

/* --- Professional Page --- */
.resume-section {
    padding: var(--space-lg) var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
}

.resume-section h2 {
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-lg);
}

.summary-content {
    max-width: var(--max-width-narrow);
    font-size: 1.0625rem;
    color: var(--color-text-muted);
}

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

.achievement {
    text-align: center;
    padding: var(--space-md);
    background: var(--color-bg-alt);
    border-radius: 4px;
}

.achievement-metric {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.achievement p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

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

.experience-item {
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.experience-item:last-child {
    border-bottom: none;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.experience-header h3 {
    margin-bottom: 0;
}

.experience-header .company {
    color: var(--color-accent);
    font-weight: 500;
    margin: 0;
}

.experience-header .dates {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.experience-content p {
    color: var(--color-text-muted);
}

.experience-highlights {
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.skill-category h3 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    color: var(--color-text-muted);
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.education-item h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-xs);
}

.education-item .institution {
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 0;
}

.education-item .year {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.certifications-list {
    list-style: none;
    padding: 0;
}

.certifications-list li {
    padding: var(--space-xs) 0;
    color: var(--color-text-muted);
}

.resume-cta {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--color-bg-alt);
    margin-top: var(--space-lg);
}

.resume-cta p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

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

/* --- Footer --- */
.main-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-xl);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-content p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: var(--space-md);
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-links a:hover {
    color: var(--color-text);
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        position: static;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .work-feature {
        grid-template-columns: 1fr;
    }
    
    .work-feature-image {
        max-width: 160px;
    }
}

@media (max-width: 700px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 3rem;
        --space-2xl: 4rem;
    }
    
    .main-nav {
        padding: var(--space-sm) var(--space-md);
    }
    
    .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-md);
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .signup-form button {
        width: 100%;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .experience-header {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: center;
    }
}
