/* --- Global Styles & Variables --- */
:root {
    --primary-color: #00aaff;
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Typography & Links --- */
h1, h2 {
    color: var(--heading-color);
    font-weight: 600;
    margin-bottom: 20px;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* --- Reusable Components --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: #0088cc;
    transform: translateY(-3px);
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}


.content-section {
    padding: 100px 10%;
    /* Fade-in animation setup */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Header & Navigation --- */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 10%;
    transition: background-color 0.3s;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading-color);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-link {
    color: var(--text-color);
    font-weight: 400;
    position: relative;
    padding-bottom: 5px;
}

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

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

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(18, 18, 18, 0.7), rgba(18, 18, 18, 0.7)), url('https://via.placeholder.com/1920x1080/121212/121212?text=') no-repeat center center/cover;
}

.hero h1 {
    font-size: 4rem;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

#typing-effect {
    color: var(--primary-color);
    font-weight: 600;
}

/* --- About Section --- */
#about {
    background-color: var(--surface-color);
}
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}
.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.4);
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.skill-card {
    background-color: var(--surface-color);
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 170, 255, 0.2);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* --- Projects Section --- */
#projects {
    background-color: var(--bg-color);
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--surface-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

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

.project-card img {
    width: 100%;
    display: block;
}

.project-info {
    padding: 20px;
}

/* --- Contact Form Section --- */
#contact {
    background-color: var(--surface-color);
}

#contact-form {
    max-width: 600px;
    margin: 40px auto 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #444;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
}

.error-message {
    color: #ff5555;
    font-size: 0.8rem;
    display: none; /* Hidden by default */
}


/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    background-color: #0c0c0c;
}

/* --- Media Queries for Responsiveness --- */
@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }

    .nav-links { display: none; } /* Simplified for demo, can be replaced with a hamburger menu */
    
    .about-container {
        flex-direction: column;
        text-align: center;
    }
}