/* Modern Professional Portfolio Design */
:root {
    /* Color Palette - "Apple-esque" Minimal */
    --bg-body: #ffffff;
    --bg-alt: #f5f5f7;
    /* Light gray for section distinction */
    --text-main: #1d1d1f;
    /* Nearly black */
    --text-secondary: #86868b;
    /* Gray text */
    --accent-color: #0071e3;
    /* Professional Blue */
    --accent-hover: #0077ed;
    --border-color: #d2d2d7;
    --card-bg: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.8);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Spacing */
    --container-width: 1000px;
    --section-padding: 100px 0;

    /* Transitions */
    --theme-transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-body: #000000;
    --bg-alt: #1c1c1e;
    --text-main: #f5f5f7;
    --text-secondary: #98989d;
    --accent-color: #0a84ff;
    --accent-hover: #409cff;
    --border-color: #38383a;
    --card-bg: #1c1c1e;
    --navbar-bg: rgba(28, 28, 30, 0.8);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: var(--theme-transition);
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* Typography Utilities */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

h2 {
    font-size: 40px;
    margin-bottom: 15px;
}

h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

p {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.2s ease;
}

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

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: var(--section-padding);
}

.bg-alt {
    background-color: var(--bg-alt);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
    transition: var(--theme-transition);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 18px;
    color: var(--text-main);
    text-decoration: none;
}

.nav-profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

[data-theme="dark"] .nav-profile-photo {
    border-color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--text-main);
    text-decoration: none;
}

/* Hero Section - Centered */
.hero {
    padding-top: 180px;
    padding-bottom: 120px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 60px;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
}

.hero-image {
    width: 100%;
    max-width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    box-shadow: 0 10px 40px rgba(0, 113, 227, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .hero-image {
    box-shadow: 0 10px 40px rgba(10, 132, 255, 0.3);
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.hero-text {
    flex: 1;
}

.hero-subtitle {
    font-size: 21px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    background: linear-gradient(135deg, #1d1d1f 0%, #434344 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

[data-theme="dark"] .hero-title {
    background: linear-gradient(135deg, #f5f5f7 0%, #e0e0e0 100%);
    background-clip: text;
    -webkit-background-clip: text;
}

.hero-description {
    font-size: 21px;
    max-width: 700px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 980px;
    /* Pill shape */
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: white;
    transform: scale(1.02);
    text-decoration: none;
}

.btn-secondary {
    color: var(--accent-color);
    margin-left: 20px;
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* About Section & Timeline */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 40px;
    border-left: 2px solid var(--border-color);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
}

.timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

.timeline-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
}

.timeline-subtitle {
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 10px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.skill-tag {
    background: #e5e5e7;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.project-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

.project-tech {
    margin-top: auto;
    padding-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    border-top: 1px solid var(--bg-alt);
}

/* Project Links */
.project-links {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

.project-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.project-links a:hover {
    color: var(--accent-hover);
    transform: translateX(3px);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.2);
}

[data-theme="dark"] .contact-photo {
    box-shadow: 0 4px 15px rgba(10, 132, 255, 0.3);
}

.contact-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
    margin: 5px 0;
}

.contact-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-alt);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 18px;
}

.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: var(--theme-transition);
}

[data-theme="dark"] .contact-form {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-body);
    color: var(--text-main);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

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

.copyright {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Nav Right (Theme Toggle + Hamburger) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 16px;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
}

.theme-toggle:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: rotate(15deg) scale(1.05);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

/* Project Filters - FIXED */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
}

.filter-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}

/* Project Card Updates */
.project-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 113, 227, 0.12);
}

[data-theme="dark"] .project-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .project-card:hover {
    box-shadow: 0 12px 35px rgba(10, 132, 255, 0.2);
}

.project-card.hide {
    display: none;
}

/* ========== ADVANCED SCROLL ANIMATIONS ========== */

/* Base animation class */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
}

/* Fade in from bottom */
.fade-up {
    transform: translateY(50px);
}

.fade-up.animated {
    transform: translateY(0);
}

/* Fade in from left */
.fade-left {
    transform: translateX(-50px);
}

.fade-left.animated {
    transform: translateX(0);
}

/* Fade in from right */
.fade-right {
    transform: translateX(50px);
}

.fade-right.animated {
    transform: translateX(0);
}

/* Scale animation */
.scale-in {
    transform: scale(0.9);
}

.scale-in.animated {
    transform: scale(1);
}

/* Stagger delays */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

.delay-6 {
    transition-delay: 0.6s;
}

/* Section title animations */
h2 {
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

h2.animated::after {
    transform: translateX(-50%) scaleX(1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 38px;
    }

    .hero-description {
        font-size: 17px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .contact-profile {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .contact-photo {
        width: 100px;
        height: 100px;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: calc(100vh - 60px);
        background: var(--navbar-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        padding: 40px 20px;
        gap: 25px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 18px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }

    .filter-btn {
        font-size: 13px;
        padding: 8px 18px;
    }

    .project-filters {
        gap: 8px;
    }
}


/* About Section Improvements */
.about-intro {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.skills-grid {
    display: grid;
    gap: 25px;
}

.skill-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 113, 227, 0.15);
}

.skill-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 15px;
}

.skill-card h4 {
    color: var(--text-main);
    margin-bottom: 10px;
    font-size: 18px;
}

.skill-card p {
    font-size: 14px;
    margin-bottom: 15px;
}

.skill-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.skill-tags span {
    background: var(--bg-alt);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-main);
}

/* Contact Links */
.contact-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
}

.contact-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.contact-info-item h4 {
    margin-bottom: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.modal-icon.success {
    background: #d4edda;
    color: #28a745;
}

.modal-icon.error {
    background: #f8d7da;
    color: #dc3545;
}

.modal-content h3 {
    color: var(--text-main);
    margin-bottom: 15px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.modal-content .btn {
    min-width: 120px;
}
