:root {
    --bg-base:        #0d1117;
    --bg-surface:     #1a1e22;
    --bg-card:        rgba(26, 30, 34, 0.85);
    --accent-cyan:    #00f2ff;
    --accent-red:     #ff0055;
    --accent-red-dark:#990033;
    --border-subtle:  rgba(255, 255, 255, 0.06);
    --border-accent:  rgba(0, 242, 255, 0.35);
    --text-muted:     #8b949e;
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      14px;
    --spacing-xs:     0.4rem;
    --spacing-sm:     0.75rem;
    --spacing-md:     1rem;
    --spacing-lg:     1.5rem;
    --spacing-xl:     3rem;
}

body {
    background-color: var(--bg-base) !important;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

/* ============================================
   NAV
   ============================================ */
nav.container {
    display: flex; /* Force horizontal */
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav a[role="button"] {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
}

nav a[role="button"]:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.25);
}

nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    margin: 0;
    padding: 0;
    align-items: center;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1 {
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    transition: color 0.4s ease, filter 0.4s ease, letter-spacing 0.4s ease;
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0));
}

h1:hover {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.5));
    letter-spacing: 1px;
}

h2 {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   ARTICLES / CARDS
   ============================================ */
article {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

article:hover {
    border-color: var(--border-accent);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.06);
}

article header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #cdd9e5;
    margin-bottom: var(--spacing-md);
}

/* ============================================
   ARTICLE FOOTER
   ============================================ */
article footer {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-subtle);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: auto;
}

article footer a.outline {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--accent-cyan);
    border-radius: var(--radius-sm);
    color: var(--accent-cyan);
    transition: all 0.25s ease;
    text-decoration: none;
}

article footer a.outline:hover {
    background: var(--accent-cyan);
    color: #0d1117;
    box-shadow: 0 0 14px rgba(0, 242, 255, 0.45);
    transform: translateY(-1px);
}

/* ============================================
   IMAGES
   ============================================ */
figure img {
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}

figure img:hover {
    transform: scale(1.02);
}

figure img,
article img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
}

.img-fit-entire {
    object-fit: contain;
    background: var(--bg-surface);
}

.img-top-focus {
    object-position: top;
}


.tag {
    position: relative;
    display: inline-block;
    min-width: 80px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: crosshair;
    color: #cdd9e5;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.tag:hover {
    color: transparent !important;
    background: var(--accent-cyan) !important;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
    transform: translateY(-2px);
}

.tag:hover::after {
    content: attr(data-debug);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d1117 !important;     
    font-size: 0.7rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    pointer-events: none;
    z-index: 10;
}

.tag-solo {
    background: #2d3748;
    color: #edf2f7;
    border: 1px dashed #4a5568;
}

.tag-core {
    background: linear-gradient(145deg, var(--accent-red), var(--accent-red-dark));
    color: white;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.4);
    border: 1px solid #ff4d88;
}

.tag-outline {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

article:hover .tag {
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
    border-color: rgba(0, 242, 255, 0.3);
}

article, article ul, article li {
    color: var(--text-muted) !important;
}

/* Ensure bold text inside lists is still pure white */
article li strong {
    color: #ffffff !important;
}

/* Fix for the Technical Skills section lists */
#skills-list ul li {
    color: var(--text-muted);
}

/* ============================================
   BIO TEXT
   ============================================ */
.bio-text {
   z-index: 5; /* Ensures it stays above the shader background */
    color: #ffffff !important; /* Pure white is easier to read over dark shaders */
    font-size: 1.1rem;
    max-width: 800px;
    
    /* THE FIX: A subtle shadow makes the letters pop against the bright noise */
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(13, 17, 23, 0.5);
    
    /* Stylized border from your previous version */
    border-left: 3px solid #00f2ff;
    padding-left: 1.5rem;
    margin: 2rem 0;
}

/* ============================================
   WORK SECTION GRID
   ============================================ */
#work .grid {
    display: grid; /* Add this line */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Add this line */
    grid-row-gap: var(--spacing-xl);
    grid-column-gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}
#work .grid article {
    height: 100%;
    margin-bottom: 0;
}

#work .grid article > p {
    flex-grow: 1;
}

/* ============================================
   FOOTER
   ============================================ */
footer.container {
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    color: var(--text-muted);
    font-size: 0.8rem;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--accent-cyan);
}