/* General Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    scroll-behavior: smooth;
}

/* Body and Section Styling */
body {
    background-color: #0f0f0f;
    color: #ffffff;
    line-height: 1.6;
}

/* Section Styling */
section {
    padding: 60px 20px;
    text-align: center;
    background-color: #1d1d1d;
    margin: 20px auto;
    border-radius: 15px;
    max-width: 1200px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 30px;
    color: #ffffff;
}

/* Header Styling */
header {
    background: #0f0f0f;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styling */
.logo h1 {
    font-family: var(--font-special);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

/* Navigation Links */
.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links li a {
    font-family: var(--font-special);
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.02em;
    color: #e0e0e0;
    text-decoration: none;
    padding: 10px 15px;
    transition: color 0.3s, background 0.3s;
    border-radius: 5px;
}

.nav-links li a:hover {
    color: #f0f0f0; /* Changed hover color to whitish */
    background: rgba(255, 255, 255, 0.1);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger i {
    font-size: 28px;
    color: #ffffff;
}

/* Unified Card Styling for Skills, Projects, and Certifications */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: #1d1d1d;
    color: #e0e0e0;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
    background: #2b2b2b;
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover img {
    transform: scale(1.05);
}

.card h3 {
    font-family: var(--font-special);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 20px 0;
    color: #ffffff;
}

.card p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
    color: #bbbbbb;
    padding: 0 20px 20px 20px;
}

/* Icon Styling */
.skill-icon {
    font-size: 50px;
    margin: 20px 0;
    transition: color 0.3s, transform 0.3s;
    color: #e0e0e0; /* Initial color to match theme */
}

/* Adding Color to Icons and Cards */
.card:hover .skill-icon {
    color: #f0f0f0; /* Changed color on hover to whitish */
    transform: rotate(10deg);
}

/* About Section */
#about .about-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Additional Hover Effects */
section:hover {
    box-shadow: 0 4px 30px rgba(255, 255, 255, 0.1);
}

/* Styling for GitHub Project Links */
.project-link {
    display: inline-block;
    margin: 10px 0;
    padding: 10px 20px;
    background: #2b2b2b; /* Updated color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}

.project-link:hover {
    background: #1a1a1a; /* Updated hover color */
    color: #f0f0f0; /* Updated hover text color */
}

/* Responsive Design for Header */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        position: absolute;
        right: 0;
        top: 60px;
        background: #0f0f0f;
        width: 200px;
        padding: 20px;
        border-radius: 5px;
        box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }
}

/* Button Styling */
.btn {
    display: inline-block;
    margin: 10px 0;
    padding: 10px 20px;
    background: #2b2b2b; /* Updated color */
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    font-size: 16px;
    text-decoration: none;
    font-family: var(--font-special);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
}

.btn:hover {
    background: #1a1a1a; /* Updated hover color */
    color: #f0f0f0; /* Updated hover text color */
}

/* Contact Form Button */
form button[type="submit"] {
    background: #2b2b2b; /* Updated color */
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 10px;
    font-size: 16px;
    transition: background 0.3s, color 0.3s;
    font-family: var(--font-special);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
}

form button[type="submit"]:hover {
    background: #1a1a1a; /* Updated hover color */
    color: #f0f0f0; /* Updated hover text color */
}

/* Contact Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

form input, form textarea {
    padding: 10px;
    border: 1px solid #333333;
    border-radius: 5px;
    background: #2b2b2b;
    color: #ffffff;
    font-size: 16px;
    font-family: var(--font-body);
    font-weight: 400;
}

form textarea {
    resize: none;
    height: 150px;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.modal-content {
    position: relative;
    width: 80%;
    max-width: 900px;
    background: #121212;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
}

iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 5px;
}

/* Modern Variable Colors */
:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --background-dark: #0f0f0f;
    --card-dark: #1d1d1d;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Font families */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-special: 'Outfit', sans-serif;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Hero Section Styling */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.highlight:hover::after {
    transform: scaleX(1);
}

.typed-container {
    min-height: 50px;
    margin: 20px 0;
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-family: var(--font-special);
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* Modern Card Styling */
.card {
    background: var(--card-dark);
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: var(--transition);
}

.card:hover::before {
    opacity: 1;
}

/* Modern Button Styling */
.btn {
    position: relative;
    overflow: hidden;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transform: translateY(0);
    transition: var(--transition);
}

.primary-btn {
    background: var(--primary-color);
    color: white;
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Animated Section Headers */
section h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 50px;
}

section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

/* Modern Form Styling */
form input, form textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

form input:focus, form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    outline: none;
}

/* Skill Icon Animation */
.skill-icon {
    position: relative;
    z-index: 1;
}

.skill-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
}

.card:hover .skill-icon::after {
    opacity: 0.1;
    transform: scale(1.2);
}

/* Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--text-secondary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: loading 0.75s infinite linear;
}

@keyframes loading {
    to { transform: rotate(360deg); }
}

/* Update heading styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Logo styling */
.logo h1 {
    font-family: var(--font-special);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

/* Navigation links */
.nav-links li a {
    font-family: var(--font-special);
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.02em;
}

/* Hero section */
.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.typed-container {
    font-family: var(--font-special);
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* Section headers */
section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* Card titles */
.card h3 {
    font-family: var(--font-special);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Card content */
.card p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
}

/* Buttons */
.btn {
    font-family: var(--font-special);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
}

/* Form elements */
form input, form textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
}

/* Footer */
footer p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
}