/* Core Configurations & Modern Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

:root {
    --bg-main: #0b0f19;
    --bg-surface: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Glassmorphism Navbar */
nav {
    position: sticky;
    top: 0;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

.nav h2 {
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav a {
    text-decoration: none;
    color: var(--text-secondary);
    margin-left: 20px;
    font-weight: 600;
    position: relative;
    padding: 4px 0;
}

.nav a:hover, .nav a.active {
    color: var(--accent-cyan);
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-cyan);
    transition: width 0.3s ease;
}

.nav a:hover::after, .nav a.active::after {
    width: 100%;
}

/* Flex-Grid Interactive Hero Section */
.hero {
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent), 
                linear-gradient(135deg, #0f172a, #020617);
    color: var(--text-primary);
    padding: 120px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    text-align: left;
}

/* AI Image Styling with subtle neon tech glow */
.hero-image-wrapper {
    flex-shrink: 0;
}

.hero-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-cyan);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
}

.hero-text {
    flex-grow: 1;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 5px;
}

.hero h3 {
    font-size: 1.4rem;
    color: var(--accent-cyan);
    margin: 10px 0;
    font-weight: 500;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* Button Variants */
.hero-cta-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-blue);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

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

.section h2 {
    margin-bottom: 35px;
    font-size: 2rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 4px;
    background: var(--accent-blue);
    border-radius: 2px;
}

p {
    color: var(--text-secondary);
}

/* Project Grid & GitHub Linked Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    text-decoration: none; /* Clears anchor default behaviors */
    display: block;
}

.card {
    background: var(--bg-surface);
    padding: 30px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-icon {
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.card p, .card ul {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.card ul {
    padding-left: 20px;
}

.card ul li {
    margin-bottom: 8px;
}

/* Card Interact Hover Upgrades */
.card:hover {
    transform: translateY(-6px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.15);
}

.project-card:hover .project-icon {
    color: var(--accent-cyan);
}

/* Skill Badges */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skills span {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 500;
    color: var(--accent-cyan);
    font-size: 0.9rem;
}

.skills span:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-cyan);
    transform: scale(1.05);
}

#contact p {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

footer {
    background: #020617;
    color: var(--text-secondary);
    text-align: center;
    padding: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

/* --- JS Dynamic Animation Hooks --- */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Media Breakdown */
@media (max-width: 768px) {
    .hero-layout {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    .hero h1 { font-size: 2.8rem; }
    .hero-cta-buttons {
        justify-content: center;
    }
    .nav { flex-direction: column; gap: 15px; text-align: center; }
    .nav a { margin: 0 10px; }
    .section { padding: 60px 0; }
}