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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #fafafa;
    -webkit-font-smoothing: antialiased;
}

/* ===========================
   Typography
   =========================== */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

p {
    margin-bottom: 1rem;
    color: #4a5568;
}

a {
    color: #3182ce;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #2c5aa0;
    text-decoration: underline;
}

strong {
    font-weight: 600;
    color: #1a1a1a;
}

blockquote {
    font-style: italic;
    color: #4a5568;
    margin: 0;
}

/* ===========================
   Layout
   =========================== */
body {
    padding-top: 140px; /* Space for fixed header */
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-content {
    min-height: calc(100vh - 240px); /* Viewport height minus header and footer */
}

/* ===========================
   Page System
   =========================== */
.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    margin-bottom: 4rem;
}

/* ===========================
   Fixed Header
   =========================== */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e0e0e0;
    z-index: 1000;
    padding: 1.5rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-text h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
}

.nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: #718096;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: none;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #3182ce;
    text-decoration: none;
}

.nav-link.active {
    color: #3182ce;
}

.nav-link:focus,
.nav-link:focus-visible {
    outline: none;
    box-shadow: none;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -6px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.6;
}

/* ===========================
   Intro
   =========================== */
.intro {
    margin-bottom: 4rem;
}

.lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #2d3748;
}

/* ===========================
   Cards
   =========================== */
.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card.featured {
    border-color: #3182ce;
    border-width: 2px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.card-header h3 {
    margin: 0;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* ===========================
   Tags
   =========================== */
.tag {
    display: inline-block;
    background: #edf2f7;
    color: #4a5568;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.tag.highlight-tag {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.year {
    display: inline-block;
    color: #a0aec0;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge {
    display: inline-block;
    background: #3182ce;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    text-transform: uppercase;
}

/* ===========================
   Grid
   =========================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

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

/* ===========================
   Product Grid (Compact Image Grid)
   =========================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

.product-item {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.product-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.product-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-item-image {
    transform: scale(1.1);
}

/* Life section - larger grid for 4 images */
#life .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

#life .product-item {
    aspect-ratio: unset;
    height: 250px;
    overflow: hidden;
}

#life .product-item .product-item-image {
    object-fit: cover;
    object-position: center;
}

/* Life hover: simple scale effect consistent with other items */
#life .product-item {
    background: #000;
}


@media (max-width: 640px) {
    #life .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.product-item:hover .product-item-overlay {
    opacity: 1;
}

.product-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.product-item-year {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.product-item-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.product-item-link {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 20; /* Ensure above overlay and image */
}

.product-item-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    text-decoration: none;
}

/* ===========================
   Logo Grid
   =========================== */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
}

@media (max-width: 640px) {
    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 100px;
}

.logo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.logo-item img {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Fix for SVG logos that reference external CSS classes */
.logo-item svg .st0 {
    fill: #000000;
}

/* ===========================
   Lists
   =========================== */
.simple-list {
    list-style: none;
    padding: 0;
}

.simple-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.simple-list li:last-child {
    border-bottom: none;
}

/* ===========================
   Work History
   =========================== */
.work-history {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.work-history h3 {
    margin-bottom: 1rem;
}

/* ===========================
   Links
   =========================== */
.link {
    display: inline-flex;
    align-items: center;
    color: #3182ce;
    font-weight: 500;
}

.link:hover {
    color: #2c5aa0;
}

.links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.links a {
    font-weight: 500;
}

/* ===========================
   Attribution & Notes
   =========================== */
.attribution {
    font-size: 0.875rem;
    color: #a0aec0;
    margin: 0;
}

.note {
    text-align: center;
    color: #718096;
    margin-top: 1.5rem;
}

/* ===========================
   Stats Grid (Home Page)
   =========================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #3182ce;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3182ce;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===========================
   Footer
   =========================== */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 2px solid #e0e0e0;
    text-align: center;
    color: #a0aec0;
    font-size: 0.875rem;
    background: #fafafa;
}

/* ===========================
   Product Images
   =========================== */
.product-image-placeholder {
    width: 100%;
    height: 180px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.product-image-placeholder.bg-green {
    background: #292929;
    border-color: #292929;
}

.product-image-placeholder.bg-orange {
    background: #292929;
    border-color: #292929;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .product-image {
    transform: scale(1.05);
}

/* ===========================
   Hobby Cards
   =========================== */
.hobby-card {
    text-align: center;
}

.hobby-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ===========================
   Product Categories
   =========================== */
.product-category {
    margin-bottom: 4rem;
}

.product-category.highlight {
    background: #fffbeb;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #fbbf24;
    margin-left: -2rem;
    margin-right: -2rem;
}

@media (max-width: 768px) {
    .product-category.highlight {
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 1.5rem;
    }
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-header h3 {
    margin: 0;
}

.category-description {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.product-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.stats {
    font-size: 1.125rem;
    color: #2d3748;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    text-align: center;
}

.product-list {
    margin-top: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #4a5568;
}

/* ===========================
   Press Section
   =========================== */
.press-category {
    margin-bottom: 3rem;
}

.press-category h3 {
    margin-bottom: 1.5rem;
    color: #2d3748;
}

.press-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.press-clipping {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.2s ease;
    text-decoration: none;
    height: 100%;
}

.press-clipping:hover {
    border-color: #3182ce;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
}

.press-clipping-img {
    width: 100%;
    height: 120px;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
}

.press-clipping-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.press-clipping:hover .press-clipping-img img {
    filter: grayscale(0%);
    opacity: 1;
}

.press-clipping-content {
    padding: 1.25rem;
}

.press-source {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #3182ce;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.press-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.press-date {
    font-size: 0.875rem;
    color: #a0aec0;
}

.press-excerpt {
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    body {
        font-size: 15px;
        padding-top: 180px; /* More space for wrapped header */
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .container {
        padding: 0 1rem;
    }

    .header-fixed {
        padding: 1rem 0;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-text h1 {
        font-size: 1.25rem;
    }

    .nav {
        width: 100%;
        gap: 0.75rem;
        font-size: 0.875rem;
    }

    .lead {
        font-size: 1.125rem;
    }

    .links {
        flex-direction: column;
        gap: 0.75rem;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    body {
        background: white;
    }

    .nav {
        display: none;
    }

    .card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* ===========================
   Accessibility
   =========================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

/* ===========================
   Selection
   =========================== */
::selection {
    background-color: #bee3f8;
    color: #1a202c;
}
