:root {
    --bg-color: #0f1115;
    --bg-secondary: #161b22;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --primary-color: #2f81f7;
    --primary-glow: rgba(47, 129, 247, 0.4);
    --accent-color: #a371f7;
    --card-bg: rgba(22, 27, 34, 0.7);
    --border-color: rgba(240, 246, 252, 0.1);
    --font-family: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

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

/* --- Utilities --- */
a { text-decoration: none; color: inherit; transition: var(--transition-speed); }
ul { list-style: none; }

/* Glassmorphism Card Style */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 2rem;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    padding: 1rem 2rem;
    background: rgba(15, 17, 21, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-dot {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

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

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

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 6rem 2rem 2rem;
    background: radial-gradient(circle at top right, rgba(47, 129, 247, 0.1), transparent 40%);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    width: 100%;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-greeting {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.hero-name {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 2em;
}

.hero-title::after {
    content: '|';
    animation: blink 0.7s infinite;
    color: var(--primary-color);
}

.hero-description {
    max-width: 500px;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: rgba(47, 129, 247, 0.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-secondary:hover {
    color: var(--text-primary);
}

/* Hero Image */
.hero-image-wrapper {
    flex: 0 0 350px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-blob {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    filter: blur(20px);
    z-index: 0;
    animation: pulse 4s infinite alternate;
}

.profile-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%; /* Circle crop */
    border: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: transform 0.5s ease;
}

.profile-img:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
}

/* Scroll Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

/* --- Sections General --- */
main { padding: 0 2rem; }

.resume-section {
    max-width: 1000px;
    margin: 8rem auto;
    /* 
       Fix for anchored navigation:
       This property ensures that when clicking a link (e.g., #about), 
       the scroll position stops 6rem (approx 96px) above the element, 
       clearing the fixed navbar.
    */
    scroll-margin-top: 6rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.resume-section.hidden {
    opacity: 0;
    transform: translateY(40px);
}

.section-header {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
}

.section-header::after {
    content: '';
    display: block;
    height: 1px;
    flex: 1;
    background: var(--border-color);
}

/* --- Skills Enhanced --- */
.skills-grid {
    display: grid;
    /* Forces 2 columns for desktop to create a 2x2 layout for 4 items */
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Accent Colors Definition */
.accent-blue   { --card-accent: #2f81f7; }
.accent-green  { --card-accent: #3fb950; }
.accent-purple { --card-accent: #a371f7; }
.accent-orange { --card-accent: #d29922; }

.skill-card {
    border-top: 3px solid transparent; /* Placeholder for accent */
    height: 100%;
}

/* Apply specific border accent color */
.skill-card.accent-blue   { border-top-color: var(--card-accent); }
.skill-card.accent-green  { border-top-color: var(--card-accent); }
.skill-card.accent-purple { border-top-color: var(--card-accent); }
.skill-card.accent-orange { border-top-color: var(--card-accent); }

/* Override generic hover border to use accent color */
.skill-card:hover {
    border-color: var(--card-accent);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--card-accent) inset;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.skill-icon {
    font-size: 1.5rem;
    color: var(--card-accent);
    background: rgba(255, 255, 255, 0.05);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    background: var(--card-accent);
    color: #fff;
    transform: rotate(10deg) scale(1.1);
}

.skill-card ul li {
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    padding-left: 0.5rem;
    transition: color 0.2s;
}

/* Colored arrow for list items */
.skill-card ul li::before {
    content: '›';
    color: var(--card-accent);
    margin-right: 0.75rem;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 0;
    vertical-align: middle;
}

.skill-card:hover ul li {
    color: var(--text-primary);
}


/* --- Experience Timeline --- */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    margin-left: 1rem;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 2.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.timeline-content h3 {
    font-size: 1.4rem;
}

.timeline-content .company {
    display: block;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.timeline-content ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1rem;
}

.timeline-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* --- Projects --- */
.projects-grid {
    display: grid;
    /* Forces 2 columns for desktop to create a 2x2 layout for 4 items */
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.project-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.tech-stack {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tech-stack span {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent-color);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.project-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* --- Education --- */
.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.edu-header h3 { color: var(--text-primary); }
.grad-date { color: var(--text-secondary); font-family: var(--font-mono); }
.institution { color: var(--primary-color); font-weight: 500; margin-bottom: 1rem; }
.edu-details { color: var(--text-secondary); max-width: 80ch; }


/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4rem;
}

/* --- Animations --- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes scroll { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(10px); } }
@keyframes pulse { 0% { transform: scale(0.95); opacity: 0.5; } 100% { transform: scale(1.05); opacity: 0.8; } }

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column-reverse; /* Image on top for mobile */
        text-align: center;
        gap: 2rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image-wrapper {
        flex: 0 0 auto;
        width: 100%;
    }

    .profile-img {
        width: 200px;
        height: 200px;
    }

    .nav-links {
        display: none; /* Simple hide for mobile for now, or add hamburger menu logic */
    }
    
    .nav-container {
        justify-content: center;
    }
    
    /* Ensure grids go to single column on mobile */
    .skills-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
}