/* General Styles */
:root {
    --primary-color: #2a2a2a;
    --secondary-color: #4a90e2;
    --accent-color: #64ffda;
    --text-color: #333;
    --text-light: #666;
    --background: #ffffff;
    --background-dark: #f5f5f5;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #1a1b26;
}

section {
    padding: 80px 0;
}

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

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary-color);
}

/* Navigation */
.navbar {
    position: fixed;
    width: 100%;
    padding: 1rem 2rem;
    background: #1a1b26;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #64ffda;
}

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

.nav-links a {
    color: #7dcfff;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
                url('/images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.highlight {
    color: #7aa2f7;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contact-info a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.contact-info a:hover {
    color: #7aa2f7;
}

/* About Section */
.about {
    background-color: #1a1b26;
}

.about h2 {
    color: #7dcfff;
}

.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-text {
    flex: 1;
    font-size: 16px;
    color: #7aa2f7;
}

/* Education Section */
.education {
    background-color: var(--background);
}

.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.education-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-5px);
}

.education-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.grade {
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.location {
    color: var(--text-light);
    font-style: italic;
}

.duration {
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Achievements Section */
.achievements {
    background-color: var(--background-dark);
}

.achievements-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.achievement-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.achievement-card:hover {
    transform: translateY(-5px);
}

.achievement-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Contact Section */
.contact {
    background-color: var(--background);
}

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

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contact-form input,
#contact-form textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

#contact-form textarea {
    min-height: 150px;
}

#contact-form button {
    padding: 1rem 2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

#contact-form button:hover {
    background: var(--primary-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* Footer Section */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-social a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--accent-color);
}

.footer-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Utility Classes */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
}

.btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.text-center {
    text-align: center;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--secondary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--background-dark);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Typewriter effect styles */
.typewriter {
    border-right: 3px solid var(--accent-color);
    animation: cursor-blink 1s step-end infinite;
    white-space: nowrap;
    display: inline-block;
}

@keyframes cursor-blink {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-color); }
}

/* Optional: Add these styles to ensure smooth animation */
.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    min-height: 4rem; /* Prevents layout shift during typing */
}

.project-card, .profile-card, .education-card {
    transition: all 0.3s ease;
}

.project-card:hover, .profile-card:hover, .education-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 22px 43px rgba(0, 0, 0, 0.15);
}

.skill-progress {
    width: 0;
    animation: skillFill 1.5s ease-in-out forwards;
}

@keyframes skillFill {
    from { width: 0; }
    to { width: var(--skill-percentage); }
}

.social-links a {
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.social-links a:hover::before {
    left: 100%;
}

.hero {
    position: relative;
    /* background: linear-gradient(-45deg, #395681, #112240, #38a5c4, #112240); */
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Add a subtle overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Enhanced contact info styling */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.contact-info a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.1);
}

.contact-info a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Enhanced CTA button */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-color);
}

.cta-button:hover {
    background: var(--accent-color);
    color: black;
    transform: translateY(-2px);
}