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

:root {
    --primary-color: #8b9aff;
    --secondary-color: #a78bfa;
    --accent-color: #c084fc;
    --text-color: #e5e7eb;
    --text-secondary: #9ca3af;
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --card-bg: #1e293b;
    --card-hover: #334155;
    --border-color: #334155;
    --gradient-start: #1e293b;
    --gradient-end: #0f172a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 100%;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 140px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(139, 154, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #ffffff 0%, #e5e7eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    opacity: 0.9;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
section {
    padding: 100px 0;
    position: relative;
}

section h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 3.5rem;
    text-align: center;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* About Section */
.about {
    background-color: var(--bg-secondary);
}

.about .container {
    max-width: 1100px;
}

.about h2 {
    margin-bottom: 3rem;
}

.about .bio-text {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    display: block;
    visibility: visible;
    opacity: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about .bio-text:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.about .bio-text p {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.9;
    color: var(--text-color) !important;
    text-align: left;
    margin-bottom: 1.5rem;
    display: block;
    visibility: visible;
    opacity: 1;
}

.about .bio-text .intro-text {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    font-weight: 500;
    color: var(--text-color) !important;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.about .bio-text p:last-child {
    margin-bottom: 0;
}

.about .highlight {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* About Content - Photo and Experience Side by Side */
.about-content {
    display: flex;
    gap: 3.5rem;
    align-items: flex-start;
    margin: 3.5rem 0;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.profile-photo {
    flex-shrink: 0;
    width: 320px;
    height: 320px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: var(--bg-color);
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.02);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.experience-text {
    flex: 1;
}

.experience-text h3 {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.experience-text p {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.9;
    color: var(--text-color) !important;
    text-align: left;
    margin-bottom: 1.5rem;
}

.experience-text p:last-child {
    margin-bottom: 0;
}

/* Projects Section */
.projects {
    background-color: var(--bg-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 154, 255, 0.25);
    border-color: var(--primary-color);
    background: var(--card-hover);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    font-weight: 600;
    line-height: 1.3;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
    flex-grow: 1;
    font-size: clamp(0.95rem, 1.2vw, 1rem);
}

.project-card .tech-stack {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.project-links a {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    display: inline-block;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.project-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 154, 255, 0.4);
}

.project-links a:active {
    transform: translateY(0);
}

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

.contact .container {
    max-width: 700px;
}

.contact-info {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.contact-item {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    line-height: 2.2;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item strong {
    color: var(--primary-color);
    font-weight: 600;
    margin-right: 0.5rem;
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-all;
}

.contact-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--bg-color);
    color: var(--text-secondary);
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
}

footer p {
    font-size: 0.9rem;
}

/* Responsive Design */
/* Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    section {
        padding: 80px 0;
    }

    .about-content {
        gap: 2.5rem;
        padding: 2.5rem;
    }

    .profile-photo {
        width: 280px;
        height: 280px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.75rem 0;
        width: 100%;
        text-align: center;
    }

    /* Hero */
    .hero {
        padding: 100px 0 80px;
        min-height: 400px;
    }

    .hero-title {
        margin-bottom: 1rem;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    section h2 {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    section h2::after {
        width: 60px;
        height: 3px;
    }

    /* About */
    .about .bio-text {
        padding: 2rem;
        margin-bottom: 2rem;
    }

    .about-content {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem;
        margin: 2rem 0;
    }

    .profile-photo {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }

    .experience-text h3 {
        font-size: 1.5rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .experience-text p {
        text-align: left;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-links {
        flex-direction: column;
    }

    .project-links a {
        width: 100%;
    }

    /* Contact */
    .contact-info {
        padding: 2rem;
    }

    .contact-item {
        font-size: 1.1rem;
        line-height: 2;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .hero {
        padding: 80px 0 60px;
        min-height: 350px;
    }

    section {
        padding: 50px 0;
    }

    section h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .about .bio-text,
    .about-content,
    .contact-info {
        padding: 1.5rem;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
    }

    .project-card {
        padding: 1.25rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
