/* --- SHARED CSS: STRUCTURE, TYPOGRAPHY, NAV MECHANICS --- */

/* TYPOGRAPHY */
body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Outfit', sans-serif; font-weight: 700; }
.project-tagline { font-family: 'Outfit', sans-serif; font-weight: 500; }
.card-tag { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; text-transform: uppercase;}
.code-block, .tech-data { font-family: 'JetBrains Mono', monospace; }

/* CONTAINERS & GENERAL */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 100px 20px; /* space for footer/nav and breathing room */
}

a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
img { max-width: 100%; height: auto; display: block; }
.section-heading { text-align: center; margin-bottom: 50px; }

/* THE DYNAMIC PILL NAVIGATION: MECHANICS & POSITIONING */
.pill-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    border-radius: 50px;
    height: 50px;
    transition: width 0.4s ease, background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
    width: 50px; /* Closed state */
    overflow: hidden;
    cursor: pointer;
    z-index: 1000;
}

.pill-trigger {
    position: absolute;
    left: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    z-index: 10;
}

.pill-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5em;
    user-select: none;
}

.pill-content {
    display: flex;
    opacity: 0;
    visibility: hidden;
    padding-left: 60px; /* Offset the trigger icon */
    padding-right: 20px;
    white-space: nowrap;
    transition: opacity 0.3s ease 0.1s, visibility 0.3s ease 0.1s;
}

.pill-content a {
    margin: 0 15px;
    font-size: 0.9em;
    font-weight: 500;
}

/* Hover/active state: Expanding the pill */
.pill-nav:hover {
    width: 320px; /* Rough open state, adjusts automatically with flex */
}

.pill-nav:hover .pill-content {
    opacity: 1;
    visibility: visible;
}

/* PROJECT GRID: MECHANICS */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.card-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-info { padding: 20px; }
.card-info h3 { margin: 0 0 10px 0; font-size: 1.3em; }
.card-summary { font-size: 0.9em; margin-bottom: 15px; }
.card-tag { margin-right: 10px; opacity: 0.8; }

/* MODALS & OVERLAYS: STRUCTURE */
.details-overlay, .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.details-overlay.active, .modal.active {
    visibility: visible;
    opacity: 1;
}

.overlay-close, .modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 2010;
}

.overlay-close:hover, .modal-close:hover { transform: scale(1.1); }

/* The expanding animation source is handled by script.js but this centers the result */
.overlay-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.overlay-details {
    max-width: 900px;
    width: 90%;
    padding: 60px;
    overflow-y: auto;
    border-radius: 12px;
}