/* --- VARIABLES --- */
:root {
    --bg-color: #0f1115;       /* Very dark blue-grey */
    --card-bg: #161b22;        /* Slightly lighter for cards */
    --text-main: #e6edf3;      /* Off-white */
    --text-muted: #8b949e;     /* Grey text */
    --primary: #2dba4e;        /* GitHub/Hacker Green */
    --primary-hover: #26a243;
    --border: #30363d;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- RESET & GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.highlight {
    color: var(--primary);
    font-weight: 600;
}

/* --- NAVIGATION --- */
.navbar {
    background: rgba(15, 17, 21, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

.nav-links i {
    font-size: 1.2rem;
}

/* --- HERO SECTION --- */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    background: radial-gradient(circle at top, #1c2128 0%, transparent 70%);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 2rem;
}

.bio {
    max-width: 600px;
    margin: 0 auto 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

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

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    border-color: var(--text-muted);
    background: var(--border);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    background: transparent;
}
.btn-small:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- PROJECTS GRID --- */
#projects {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* --- CARDS --- */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: var(--text-muted);
}

/* Special styling for the first "Featured" item to span full width */
.card.featured {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
}
.card.featured .card-img-wrapper {
    width: 50%;
    height: 100%;
}
.card.featured .card-content {
    width: 50%;
    padding: 3rem;
}

.card-img-wrapper {
    height: 220px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.date {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.card-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    
    .card.featured {
        grid-column: auto;
        flex-direction: column;
    }
    .card.featured .card-img-wrapper,
    .card.featured .card-content {
        width: 100%;
    }
    .card.featured .card-content {
        padding: 1.5rem;
    }
    .grid {
        grid-template-columns: 1fr;
    }
}