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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --accent-color: #3b82f6;
    --gray-light: #f3f4f6;
    --transition: all 0.3s ease;
    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;

}

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

/* Navigation */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

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

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

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

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    margin-top: 80px; /* account for fixed navbar */
}

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

.profile-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.profile-image img:hover {
    transform: scale(1.05);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.typing-text {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* About Section */
.about {
    padding: 5rem 2rem;
    background-color: white;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.about-text {
    font-size: 1.1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Skills Section */
.skills {
    padding: 5rem 2rem;
    background-color: var(--gray-light);
}

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

.skill-category {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.skill-item {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Experience Section */
.experience {
    padding: 5rem 2rem;
    background-color: white;
}

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

.experience-card {
    background-color: var(--gray-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.experience-header {
    margin-bottom: 1.5rem;
}

.experience-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.company {
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.duration {
    color: #333;
    font-size: 0.9rem;
}

.experience-content ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.experience-content li {
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

/* Projects Section */
.projects {
    padding: 5rem 2rem;
    background-color: white;
}

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

.project-card {
    text-decoration: none;      /* Remove underline */
    color: inherit;             /* Inherit text color from parent */
    display: block;             /* Make the link fill the card */
    height: 100%;               /* Ensure it fills the card vertically */
    width: 100%;                /* Ensure it fills the card horizontally */
    cursor: pointer;    
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    z-index: 1;
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.project-card::before {
    content: '';
    position: absolute;
    inset: -3px;
    z-index: -1;
    background: linear-gradient(120deg, #ffffff, #98b9ff);
    background-size: 300% 300%;
    border-radius: 18px;
    filter: blur(0.5px);
    animation: borderGradient 4s ease-in-out infinite;
}
.project-card:hover::before {
    filter: blur(2px);
}
.project-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.15);
}
@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.project-card a:visited {
    color: inherit;             /* Prevent visited links from changing color */
}
.project-card a:hover,
.project-card a:focus {
    text-decoration: none;      /* No underline on hover/focus */
    color: inherit;             /* No color change on hover/focus */
}

.project-info {
    padding: 1.5rem;
}

.project-tech {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    background-color: var(--gray-light);
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-form button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

.contact-form button:active {
    transform: translateY(0);
}

.social-links {
    display: flex;
    gap: 1rem;
}

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

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

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

/* Common Section Styles */
section {
    padding: 5rem 2rem;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-weight: 800;
    background: linear-gradient(90deg, #2563eb, #3b82f6 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

/* Glassmorphism utility */
.section-glass {
    background: rgba(255,255,255,0.6);
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.18);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.95);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 2rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

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

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        margin-top: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .contact-item {
        justify-content: center;
    }

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

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

/* Improved contrast for duration */
.duration {
    color: #333;
}

/* Focus outlines for accessibility */
a:focus, .btn:focus {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* Button variants */
.btn.danger {
    background: #ef4444;
    color: #fff;
}
.btn:disabled, .btn[disabled] {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}
.btn.neu {
    background: #e0e5ec;
    box-shadow: 8px 8px 16px #a3b1c6, -8px -8px 16px #ffffff;
    color: #2563eb;
}

/* Touch targets */
.btn, .nav-links a, .social-links a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 3D tilt effect for project cards */
.project-card:hover {
    transform: perspective(600px) rotateY(4deg) scale(1.03);
    transition: transform 0.4s cubic-bezier(.23,1,.32,1);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.15);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Fade-in utility for sections */
.fade-in {
    animation: fadeIn 1s ease-out;
}
