/* 
 * Component Styles
 */

/* =========================================
   Buttons & Links
   CONCEPT: Modularity
   Components like buttons are reusable classes (e.g., '.btn-primary') that can be applied to 
   any element (<a>, <button>) to give it a specific look.
   ========================================= */

/* Primary Button (Solid) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: var(--action-default);
    color: var(--bg-primary);
    font-family: var(--font-body);
    font-weight: var(--weight-medium);
    font-size: var(--text-body-md);
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-subtle);
}

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

/* Secondary Link (Underlined) */
.btn-link {
    position: relative;
    display: inline-block;
    color: var(--text-primary);
    font-weight: var(--weight-medium);
    padding-bottom: 2px;
}

.btn-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--border-subtle);
    transform-origin: bottom right;
    transition: background-color var(--duration-fast) ease-out;
}

.btn-link:hover::after {
    background-color: var(--action-default);
}

/* =========================================
   Navigation
   CONCEPT: Fixed Positioning
   'position: fixed' keeps the navbar at the top of the viewport even when scrolling.
   'backdrop-filter; blur' creates the frosted glass effect.
   ========================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: var(--space-md) 0;
    background: rgba(var(--bg-primary), 0.8);
    /* Requires RGB conversion ideally, fallback: */
    background-color: transparent;
    /* Let's keep it clean or add a backdrop-filter */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--duration-default) ease;
}

/* Optional: Add border on scroll (requires JS toggling a class, omitting for now per No-JS rule, 
   so we stick to a permanent subtle border or pure transparency) */
.navbar-scrolled {
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-primary);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: var(--text-heading-sm);
    color: var(--text-primary);
    font-style: italic;
    white-space: nowrap;
    /* Prevent wrapping */
}

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

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: var(--space-xs);
        padding-top: var(--space-xs);
    }
}

.nav-item a {
    font-size: var(--text-caption);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--text-secondary);
}

.nav-item a:hover {
    color: var(--text-primary);
}

/* =========================================
   Cards (Minimal)
   CONCEPT: Component Composition
   A card is built from sub-elements: wrapper, image, title, meta.
   We use nesting (.card-project:hover .card-image) to trigger effects on child elements 
   when the parent is hovered.
   ========================================= */

/* Project Card */
.card-project {
    display: block;
    /* Conceptual grouping */
    /* Conceptual grouping */
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--bg-secondary);
    margin-bottom: var(--space-md);
    border-radius: 2px;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-default) var(--ease-cinematic);
}

/* Hover effect on parent card */
.card-project:hover .card-image {
    transform: scale(1.03);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-xs);
}

.card-title {
    font-family: var(--font-display);
    font-size: var(--text-heading-sm);
    color: var(--text-primary);
}

.card-category {
    font-size: var(--text-caption);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

/* =========================================
   Footer
   ========================================= */

.footer {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-3xl);
}

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

.footer-link {
    color: var(--text-tertiary);
    font-size: var(--text-caption);
    transition: color var(--duration-fast) ease;
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-column-right {
    text-align: right;
}

.footer-links.right-aligned {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .footer {
        padding: var(--space-lg) 0;
        margin-top: var(--space-2xl);
        text-align: center;
    }

    .footer-column-right {
        text-align: center;
        margin-top: var(--space-md);
    }

    .footer-links.right-aligned {
        justify-content: center;
    }
}