/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    /* Navbar backgrounds (use alpha for translucency) */
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.98);
}

/* Dark theme overrides */
body.dark-theme {
    --text-primary: #e2e8f0;
    --text-secondary: #a8b0bd;
    --text-light: #9aa6b2;
    --bg-primary: #0b1220;
    --bg-secondary: #0a0f1d;
    --bg-dark: #020617;
    --card-bg: #111827;
    --border-color: #273142;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.6), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-medium: 0 6px 10px -2px rgba(0,0,0,0.5), 0 3px 6px -2px rgba(0,0,0,0.4);
    --shadow-large: 0 14px 24px -6px rgba(0,0,0,0.6), 0 6px 12px -6px rgba(0,0,0,0.5);
    --nav-bg: rgba(2, 6, 23, 0.75);
    --nav-bg-scrolled: rgba(2, 6, 23, 0.9);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

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

@media (max-width: 1400px) {
    .container {
        max-width: 1100px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 900px;
        padding: 0 25px;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.navbar.scrolled {
    background: var(--nav-bg-scrolled);
    box-shadow: var(--shadow-medium);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

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

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

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

.nav-link.active {
    color: var(--primary-color);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding-top: 70px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.profile-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-large);
    transform: rotate(5deg);
    transition: var(--transition);
}

.profile-card:hover {
    transform: rotate(0deg) scale(1.05);
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder {
    font-size: 6rem;
    color: white;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

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

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-secondary);
    font-weight: 500;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-item {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.skill-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skill-item p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Experience Section */
.experience {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    flex: 0 0 120px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    position: relative;
    z-index: 2;
}

.timeline-content {
    flex: 1;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    margin: 0 2rem;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

.timeline-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
    margin-top: 1rem;
}

.timeline-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.timeline-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background: var(--bg-primary);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skills-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.skills-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

.skills-category h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-large);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-placeholder {
    font-size: 3rem;
    color: white;
    opacity: 0.8;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

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

.project-links .btn {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Education Section */
.education {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.education-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    display: flex;
    gap: 1.5rem;
    transition: var(--transition);
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

.education-icon {
    flex: 0 0 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.education-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.education-content h4 {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-date {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1rem !important;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-items {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 20px;
}

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

.social-link {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

.footer p {
    color: #94a3b8;
    margin: 0;
}

/* Responsive Design */
/* Responsive Design - Enhanced */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-container {
        gap: 2rem;
    }
    
    .about-content {
        gap: 2rem;
    }
    
    .skills-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .education-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Tablets */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
    background-color: var(--card-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 60px;
    }

    .timeline-date {
        position: absolute;
        left: -60px;
        width: 120px;
        text-align: center;
    }

    .timeline-content {
        margin: 0;
        width: 100%;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .education-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .education-item {
        min-width: auto;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-links {
        flex-direction: column;
        gap: 1rem;
    }

    .project-links .btn {
        flex: none;
        width: 100%;
        text-align: center;
    }
    
    /* Better section spacing */
    .hero, .about, .experience, .skills, .projects, .education, .contact {
        padding: 3rem 0;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .btn {
        text-align: center;
        width: 100%;
        padding: 15px 20px;
    }

    .profile-image {
        width: 250px;
        height: 250px;
    }

    .avatar-placeholder {
        font-size: 4rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .skills-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .skill-tags {
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }

    /* Typography adjustments */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.3rem; }
    
    .section-title {
        margin-bottom: 2rem;
    }
}

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

    .hero-container {
        padding: 1rem 0;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .profile-card {
        padding: 1rem;
    }

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

    .avatar-placeholder {
        font-size: 3rem;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-date {
        left: -50px;
        width: 100px;
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    .education-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .education-icon {
        align-self: center;
        margin-bottom: 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contact-item i {
        font-size: 1.5rem;
    }
    
    .social-links {
        justify-content: center;
        gap: 1rem;
    }
    
    /* Typography for very small screens */
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }
    
    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    /* Better section spacing for mobile */
    .hero, .about, .experience, .skills, .projects, .education, .contact {
        padding: 2rem 0;
    }
    
    .section-title {
        margin-bottom: 1.5rem;
        font-size: 1.5rem;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .timeline-item {
        padding-left: 30px;
    }
    
    .timeline-date {
        left: -40px;
        width: 80px;
        font-size: 0.7rem;
    }
    
    .skill-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .about-stats .stat h3 {
        font-size: 1.5rem;
    }
}

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

/* Better touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn, .nav-link, .social-link {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hamburger {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Better focus states for accessibility */
.btn:focus, .nav-link:focus, .social-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
