/* Josh Dzieza - Portfolio Styles */

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

:root {
    --bg-color: #fafafa;
    --text-color: #1a1a1a;
    --text-muted: #666;
    --text-light: #888;
    --border-color: #e5e5e5;
    --link-hover: #444;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 17px;
}

a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--text-muted);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
}

/* Navigation */
nav {
    padding: 40px 48px 60px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.nav-name {
    font-size: 1.5rem;
    font-weight: 400;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-name:hover {
    text-decoration: none;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
}

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

/* Homepage */
.hero {
    padding: 40px 48px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.4;
}

.hero p {
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Featured Work Grid */
.featured-section {
    padding: 60px 48px 80px;
    border-top: 1px solid var(--border-color);
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.featured-grid {
    column-count: 3;
    column-gap: 24px;
}

/* Alternate uniform grid layout */
.featured-grid--uniform {
    column-count: unset;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.featured-grid--uniform .featured-item {
    margin-bottom: 0;
}

.featured-grid--uniform .featured-image {
    aspect-ratio: 4/3;
    margin-bottom: 12px;
}

.featured-grid--uniform .featured-image img,
.featured-grid--uniform .featured-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .featured-grid--uniform {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .featured-grid--uniform {
        grid-template-columns: 1fr;
    }
}

.featured-item {
    text-decoration: none;
    display: block;
    break-inside: avoid;
    margin-bottom: 24px;
}

.featured-item:hover {
    text-decoration: none;
}

.featured-image {
    overflow: hidden;
    margin-bottom: 12px;
}

.featured-image img,
.featured-image video {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.featured-item:hover .featured-image img,
.featured-item:hover .featured-image video {
    transform: scale(1.02);
}

.featured-title {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 6px;
}

.featured-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 6px;
}

.featured-pub {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Writing Page */
.page-header {
    padding: 20px 0 50px;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 400;
}

.article-list {
    list-style: none;
    padding-bottom: 80px;
    max-width: 900px;
}

.article-list li {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.article-list li:first-child {
    border-top: 1px solid var(--border-color);
}

.article-link {
    display: block;
    text-decoration: none;
}

.article-link:hover .article-title {
    color: var(--text-muted);
}

.article-title {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.article-meta {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-description {
    margin-top: 8px;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* About Page */
.about-content {
    padding: 20px 0 80px;
    max-width: 900px;
}

.about-photo {
    width: 180px;
    aspect-ratio: 3/4;
    background-color: var(--border-color);
    float: left;
    margin-right: 32px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, sans-serif;
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 24px;
}

.about-text::after {
    content: "";
    display: table;
    clear: both;
}

.about-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.about-section h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.awards-list {
    list-style: none;
}

.awards-list li {
    padding: 8px 0;
    font-size: 1rem;
}

/* Contact Page */
.contact-content {
    padding: 20px 0 80px;
    max-width: 700px;
}

.contact-intro {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact-links {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
}

.contact-item {
    margin-bottom: 16px;
}

.contact-label {
    color: var(--text-muted);
    display: inline-block;
    width: 80px;
}

/* Newsletter */
.newsletter-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.newsletter-section h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.newsletter-section p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 400px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 10px 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--text-muted);
}

.newsletter-form button {
    padding: 10px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    background: var(--text-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.newsletter-form button:hover {
    background: var(--text-muted);
}

/* Footer */
footer {
    padding: 40px 24px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

/* Responsive - Tablet */
@media (max-width: 900px) {
    nav {
        padding: 40px 24px 60px;
    }

    .container {
        padding: 0 24px;
    }

    .hero {
        padding-left: 24px;
        padding-right: 24px;
    }

    .featured-section {
        padding: 60px 24px 80px;
    }

    .featured-grid {
        column-count: 2;
        column-gap: 20px;
    }
}

/* Responsive - Mobile */
@media (max-width: 640px) {
    nav {
        flex-direction: column;
        gap: 20px;
        padding: 30px 20px 40px;
    }

    .nav-links {
        gap: 24px;
    }

    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 30px 20px 60px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .featured-section {
        padding: 40px 20px 60px;
    }

    .featured-grid {
        column-count: 1;
    }

    .featured-item {
        margin-bottom: 32px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .about-photo {
        float: none;
        margin-right: 0;
        margin-bottom: 32px;
    }

    .article-list,
    .about-content,
    .contact-content {
        max-width: none;
    }

}
