/* --- Global Styles & Variables --- */
:root {
    --bg-color: #111827;       
    --card-bg: rgba(31, 41, 55, 0.75); 
    --card-border: rgba(55, 65, 81, 0.8); 
    --item-bg: rgba(17, 24, 39, 0.6);
    --text-main: #f9fafb;      
    --text-muted: #9ca3af;     
    --btn-bg: rgba(255, 255, 255, 0.05);
    --btn-hover: rgba(255, 255, 255, 0.1);
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
    
    /* --- BACKGROUND --- */
    background-color: var(--bg-color);
    background-image: linear-gradient(rgba(17, 24, 39, 0.3), rgba(17, 24, 39, 0.3)), url('images/fox-bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* --- Global Layout --- */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

h1 {
    font-weight: 800;
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* --- Profile Page (index.html) --- */
.link-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start; 
    gap: 3rem;
    width: 100%;
    max-width: 800px; 
    padding: 3rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.profile-section {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: sticky; 
    top: 2rem;
}

.profile-section h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.profile-section .subtitle {
    margin-bottom: 1.5rem;
}

.profile-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-border);
    margin-bottom: 1.5rem;
    background-color: #374151; 
}

.conventions {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    width: 100%;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.conventions strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 0.5rem;
}

/* Minimal Link Styling */
.minimal-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.minimal-link:hover {
    color: var(--text-main);
    text-decoration: underline;
}

.links-section {
    flex: 1.2; 
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: var(--btn-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.link-btn:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
    border-color: #4b5563;
}

.link-btn:active {
    transform: translateY(0);
}

.btn-icon {
    width: 20px;
    height: 20px;
    fill: currentColor; 
}

/* --- Conventions Page (cons.html) --- */
.con-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 900px; 
    padding: 3rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-section {
    text-align: center;
    position: relative;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.header-section h1 {
    font-size: 2.2rem;
    margin-bottom: 0.25rem;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--btn-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background-color: var(--btn-hover);
    border-color: #4b5563;
    transform: translateX(-3px);
}

.stats-badge {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.4rem 1rem;
    background-color: rgba(59, 130, 246, 0.15); 
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.con-item {
    background-color: var(--item-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.con-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent-blue);
}

.con-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.years-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.year-pill {
    background-color: var(--btn-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    border-radius: 9999px; 
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.year-pill.special {
    background-color: rgba(59, 130, 246, 0.15); 
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa; 
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .link-card {
        flex-direction: column;
        gap: 2rem;
        padding: 2.5rem 1.5rem;
    }
    .profile-section {
        position: static;
    }
    .links-section {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .con-card {
        padding: 2rem 1.5rem;
    }
    .header-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .back-btn {
        position: static;
        align-self: flex-start;
    }
}