:root {
    --bg-color: #050505;
    --text-main: #e0e0e0;
    --text-dim: #a0a0a0;
    --accent: #00f0ff; 
    --accent-glow: rgba(0, 240, 255, 0.2);
    --card-bg: rgba(20, 20, 20, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

#cv-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.8;
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: #fff;
}

h1 { font-size: 3.5rem; font-weight: 700; letter-spacing: -1px; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 2rem; border-left: 3px solid var(--accent); padding-left: 15px; }
h3 { font-size: 1.25rem; font-weight: 600; }

a { text-decoration: none; color: inherit; transition: 0.3s; }
.dim { color: var(--text-dim); font-size: 0.9rem; }

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    margin-bottom: 60px;
}
.logo { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--accent); }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a:hover { color: var(--accent); }

/* Hero */
header {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* This restricts width on desktop to keep it readable, 
   but we override this in the media query below for mobile/tablets */
.hero-text { max-width: 600px; } 

.badge { 
    display: inline-block; 
    padding: 5px 12px; 
    border: 1px solid var(--accent); 
    color: var(--accent); 
    border-radius: 50px; 
    font-size: 0.85rem; 
    margin-bottom: 15px;
    font-family: var(--font-head);
}
.hero-text p { font-size: 1.1rem; color: var(--text-dim); margin-bottom: 2rem; }

.hero-btns { display: flex; gap: 15px; }
.btn { 
    padding: 12px 25px; 
    border-radius: 4px; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: 0.3s ease;
    white-space: nowrap;
}
.btn.primary { background: var(--accent); color: #000; }
.btn.primary:hover { background: #fff; box-shadow: 0 0 15px var(--accent-glow); }

.btn.secondary { 
    border: 1px solid var(--card-border); 
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn.secondary:hover { 
    border-color: var(--accent); 
    color: var(--accent); 
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

/* Sections */
section { padding: 80px 0; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; }

/* Card Styles */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

.card-link { display: block; }

.interactive-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--accent); 
}

.icon-accent { color: var(--accent); margin-bottom: 15px; width: 32px; height: 32px; }

/* Timeline/List Containers */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 30px; 
}

.timeline-item { display: flex; gap: 30px; }

.timeline-item .date { 
    min-width: 170px; 
    color: var(--accent); 
    font-family: var(--font-head); 
    text-align: right; 
    padding-top: 5px;
    font-weight: 500;
}

.timeline-content { 
    border-left: 2px solid var(--card-border); 
    padding-left: 30px; 
    padding-bottom: 5px;
    width: 100%;
}
.timeline-content h4 { color: var(--text-dim); font-weight: 400; margin-bottom: 10px; font-size: 0.95rem;}

.project-card .card-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.tag { font-size: 0.75rem; background: rgba(255,255,255,0.1); padding: 4px 8px; border-radius: 4px; }

/* Footer */
footer { padding: 100px 0 50px; text-align: center; }

/* Email Link */
.email-link { 
    font-size: 1.5rem; 
    color: var(--accent);
    font-weight: 600; 
    display: inline-block; 
    margin-bottom: 30px;
    border-bottom: 1px solid transparent; 
    word-break: break-all;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}
.email-link:hover { 
    color: #fff;
    border-bottom-color: #fff; 
}

.footer-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.copyright { color: var(--text-dim); font-size: 0.8rem; }

/* --- Mobile / Responsive Tweaks --- */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 0 15px;
    }

    /* Allow hero text to take full width on smaller screens */
    .hero-text {
        max-width: 100%;
    }

    h1 { font-size: 2.5rem; word-wrap: break-word; }
    h2 { font-size: 1.75rem; }

    /* Force 1 column on mobile to fill width */
    .grid-3, .grid-2 { 
        grid-template-columns: 1fr; 
    }

    /* Reduce Card Padding on mobile */
    .card {
        padding: 20px;
    }

    /* Timeline Stack */
    .timeline-item { flex-direction: column; gap: 8px; }
    
    .timeline-item .date { 
        text-align: left; 
        min-width: auto; 
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .timeline-content { 
        border-left: none; 
        padding-left: 0; 
        border-top: 1px solid var(--card-border); 
        padding-top: 15px;
    }

    /* Hero Buttons: Stack vertically */
    .hero-btns {
        flex-direction: column;
        width: 100%;
    }
    .hero-btns .btn {
        width: 100%;
        justify-content: center;
    }

    /* Navigation */
    .nav-links { display: none; } 

    /* Footer Buttons: Stack and fill width */
    .footer-btns { 
        flex-direction: column; 
        align-items: stretch;
        gap: 15px;
    }
    .footer-btns .btn {
        width: 100%;
        justify-content: center;
    }
    
    .email-link {
        font-size: 1.2rem;
    }
}