/* --- Custom Fonts --- */
@font-face {
    font-family: 'BigBlueTerm';
    src: url('fonts/BigBlueTerm.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; 
}

/* --- Nord Color Palette --- */
:root {
    --nord-0: #2E3440;
    --nord-1: #3B4252;
    --nord-2: #434C5E;
    --nord-3: #4C566A;
    --nord-4: #D8DEE9;
    --nord-5: #E5E9F0;
    --nord-6: #ECEFF4;
    --nord-7: #8FBCBB; 
    --nord-8: #88C0D0; /* Cyan - Main Accent */
    --nord-9: #81A1C1; 
    --nord-10: #5E81AC;
    --nord-11: #BF616A;
    --nord-14: #A3BE8C; /* Green */

    /* Assignments */
    --bg-color: var(--nord-0);
    --secondary-bg: var(--nord-1);
    --text-color: var(--nord-4);
    --accent-color: var(--nord-8);
    --accent-hover: var(--nord-7);
    --border-color: var(--nord-2);
    --muted-color: var(--nord-3);
    
    --font-mono: 'BigBlueTerm', 'VT323', 'Courier New', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: none;
    font-smooth: never;
    text-rendering: optimizeSpeed;
    position: relative;
    z-index: 1;
}

/* --- Background Canvas --- */
#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Send to back */
    opacity: 0.6; /* Subtle effect */
    pointer-events: none;
}

.container {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Typography --- */
h1, h2, h3 {
    font-weight: normal;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.2rem;
    color: var(--accent-color);
}

h2 {
    font-size: 1.4rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
    color: var(--nord-9);
}

p {
    margin-bottom: 1rem;
}

strong {
    color: var(--nord-6);
    font-weight: normal;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* --- Header Section --- */
header {
    /* Slight transparency to show particles behind header */
    background-color: rgba(59, 66, 82, 0.9); 
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-bottom: 2rem;
    backdrop-filter: blur(5px);
}

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

.subtitle {
    color: var(--nord-4);
    font-size: 1rem;
    margin-bottom: 0;
    opacity: 0.8;
}

.links {
    display: flex;
    gap: 1rem;
    text-align: center;
}

/* --- Improved Skills Terminal Code Block --- */
.code-block {
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black */
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.cmd-group {
    display: block;
    color: var(--nord-8); /* Cyan headers */
    margin-top: 1rem;
    margin-bottom: 0.3rem;
    font-weight: bold;
}
.cmd-group:first-child {
    margin-top: 0;
}

.cmd-line {
    display: block;
    padding-left: 0.5rem;
    color: var(--nord-4);
}

.prompt {
    color: var(--nord-14); /* Green prompt */
    font-weight: bold;
    margin-right: 8px;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background-color: var(--nord-4);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Timeline (Achievements) --- */
.achievement-list {
    list-style: none;
    border-left: 2px solid var(--border-color);
    padding-left: 1.5rem;
    margin-left: 0.5rem;
    margin-bottom: 2rem;
}

.achievement-list li {
    margin-bottom: 1.5rem;
    position: relative;
}

.achievement-list li::before {
    content: "";
    position: absolute;
    left: -1.88rem;
    top: 0.4rem;
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border: 2px solid var(--bg-color);
}

.achievement-date {
    display: block;
    font-size: 0.9rem;
    color: var(--nord-9);
    margin-bottom: 0.2rem;
}

.achievement-title {
    display: block;
    font-size: 1.15rem;
    color: var(--nord-6);
    margin-bottom: 0.2rem;
    font-weight: bold;
}

/* --- Cards (Projects & Writeups) --- */
.card-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.card-list li {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
    border-radius: 4px;
}

.card-list li:hover {
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
}

.tag {
    background-color: var(--nord-2);
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    color: var(--nord-6);
    border-radius: 2px;
}

.card-desc {
    font-size: 1rem;
    margin-bottom: 0;
    color: var(--nord-4);
    opacity: 0.9;
}

.date {
    display: block;
    font-size: 0.9rem;
    color: var(--nord-9);
    margin-bottom: 0.3rem;
}

/* --- Footer --- */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px dashed var(--border-color);
    font-size: 0.9rem;
    color: var(--muted-color);
    background-color: var(--bg-color); /* Cover the canvas at the bottom */
}

/* --- Profile Picture Integration --- */
.profile-wrapper {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--nord-8); /* Cyan border */
    box-shadow: 0 0 10px rgba(136, 192, 208, 0.2);
    
    /* This filter makes the sunny photo match the dark hacker aesthetic */
    filter: grayscale(80%) contrast(1.1) brightness(0.9);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.profile-pic:hover {
    /* Reveals original colors slightly on hover and pops out */
    filter: grayscale(20%) contrast(1.1) brightness(1);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(136, 192, 208, 0.5);
}

/* Adjust header flex for mobile so it doesn't break */
@media (max-width: 600px) {
    .profile-wrapper {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
        width: 100%;
    }
    .header-flex {
        justify-content: center;
    }
}
