/* ─── Individual Portfolio ─── */
html {
    scroll-behavior: smooth;
}

/* ─── Progress Bar ─── */
.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(10, 10, 15, 0.9);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* ─── Floating Navigation ─── */
.floating-nav {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.nav-toggle {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.45);
}

.nav-menu {
    position: absolute;
    bottom: 64px;
    right: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    min-width: 150px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.floating-nav:hover .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    color: rgba(200, 200, 220, 0.6);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.25s ease;
    font-size: 0.88rem;
    white-space: nowrap;
    font-weight: 500;
}

.floating-nav .nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #e0e7ff;
}

.floating-nav .nav-link.active {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.floating-nav .nav-link i {
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}

/* ─── Hero Section ─── */
.hero {
    padding: 2rem 2rem 3rem;
    background: linear-gradient(160deg, #07070b 0%, #0d0d14 40%, #111118 100%);
    color: #f0f0f5;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 25% 30%, rgba(99, 102, 241, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 70%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: #818cf8;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(200, 200, 220, 0.5);
    margin-bottom: 2rem;
    max-width: 500px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary {
    background: transparent;
    color: #a5b4fc;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(165, 180, 252, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.6s;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #e0e7ff;
    border-color: rgba(165, 180, 252, 0.4);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

/* ─── Profile Photo ─── */
.profile-photo {
    width: 350px;
    height: 480px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.3));
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}

.profile-image:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
}

.profile-photo i {
    font-size: 4rem;
    color: #818cf8;
    margin-bottom: 0.5rem;
}

.photo-placeholder {
    font-size: 0.85rem;
    color: rgba(200, 200, 220, 0.4);
    font-weight: 500;
}

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

/* ─── Sections ─── */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #f0f0f5;
    letter-spacing: -0.03em;
}

/* ─── Skills Section ─── */
.skills {
    background: #07070b;
}

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

.skill-item {
    background: rgba(15, 15, 22, 0.8);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.skill-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.skill-item:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.skill-item:hover::after {
    opacity: 1;
}

.skill-item i {
    font-size: 2.2rem;
    color: #818cf8;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.08);
    transition: all 0.3s ease;
}

.skill-item:hover i {
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

.skill-item h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #f0f0f5;
    letter-spacing: -0.01em;
}

.skill-item p {
    color: rgba(200, 200, 220, 0.45);
    margin: 0;
    font-size: 0.9rem;
}

/* ─── Projects Section ─── */
.projects {
    background: #0a0a0f;
}

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

.project-card {
    background: rgba(15, 15, 22, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.15);
}

.project-card:hover::before {
    opacity: 1;
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #0f0f16, #161620);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.project-icon-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon-container i {
    position: absolute;
    color: #818cf8;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-icon-container .fas:first-child {
    font-size: 3.5rem;
    z-index: 3;
}

.project-icon-container .project-icon-secondary {
    font-size: 1.8rem;
    top: 22%;
    right: 26%;
    color: #a78bfa;
    opacity: 0.5;
    z-index: 2;
}

.project-icon-container .project-icon-tertiary {
    font-size: 1.3rem;
    bottom: 26%;
    left: 22%;
    color: rgba(200, 200, 220, 0.3);
    z-index: 1;
}

.project-card:hover .project-icon-container i {
    transform: scale(1.08);
}

.project-card:hover .project-icon-secondary {
    transform: scale(1.08) rotate(8deg);
}

.project-card:hover .project-icon-tertiary {
    transform: scale(1.08) rotate(-8deg);
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #f0f0f5;
    letter-spacing: -0.01em;
}

.project-tech {
    color: #818cf8;
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.project-description {
    color: rgba(200, 200, 220, 0.45);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

.project-impact {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.25rem 0;
}

.impact-metric {
    background: rgba(99, 102, 241, 0.08);
    color: #a5b4fc;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.1);
    letter-spacing: 0.02em;
}

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

.project-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.55rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    font-size: 0.85rem;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    cursor: pointer;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s;
}

.project-link:hover::before {
    left: 100%;
}

.project-link:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.12);
}

/* ─── Contact Section ─── */
.contact {
    background: #07070b;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-description {
    color: rgba(200, 200, 220, 0.45);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgba(240, 240, 245, 0.7);
    font-size: 0.95rem;
}

.contact-item i {
    color: #818cf8;
    width: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(15, 15, 22, 0.8);
    color: rgba(200, 200, 220, 0.6);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 1.1rem;
}

.social-link:hover {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white;
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

/* ─── Modal Styles ─── */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: modalFadeIn 0.3s ease;
}

.modal-content {
    background: #0a0a0f;
    margin: 3% auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 88vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.05);
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.35);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 15, 22, 0.6);
    border-radius: 16px 16px 0 0;
    backdrop-filter: blur(10px);
}

.modal-header h2 {
    color: #f0f0f5;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.close {
    color: rgba(200, 200, 220, 0.4);
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.25s ease;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.close:hover {
    color: #f0f0f5;
    background: rgba(255, 255, 255, 0.05);
}

.modal-body {
    padding: 2rem;
    color: #f0f0f5;
}

.modal-section {
    margin-bottom: 2.5rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    color: #a5b4fc;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    letter-spacing: -0.01em;
}

.modal-section p {
    color: rgba(200, 200, 220, 0.5);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.modal-section ul,
.modal-section ol {
    color: rgba(200, 200, 220, 0.5);
    line-height: 1.7;
    padding-left: 1.25rem;
}

.modal-section li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.modal-section li strong {
    color: #e0e7ff;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.75rem;
}

.tech-item {
    background: rgba(15, 15, 22, 0.6);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(200, 200, 220, 0.5);
    line-height: 1.5;
    font-size: 0.9rem;
}

.tech-item strong {
    color: #818cf8;
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    text-align: center;
}

.impact-item {
    background: rgba(15, 15, 22, 0.6);
    padding: 1.5rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.impact-item:hover {
    border-color: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.impact-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
    line-height: 1;
}

.impact-label {
    color: rgba(200, 200, 220, 0.45);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ─── Animations ─── */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

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

.project-card {
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:nth-child(2) { animation-delay: 0.15s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }

.skill-item {
    animation: fadeInUp 0.6s ease forwards;
}

.skill-item:nth-child(2) { animation-delay: 0.08s; }
.skill-item:nth-child(3) { animation-delay: 0.16s; }
.skill-item:nth-child(4) { animation-delay: 0.24s; }

.profile-photo {
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 1rem 3rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

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

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        justify-content: center;
    }

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

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

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

    .floating-nav {
        bottom: 1rem;
        right: 1rem;
    }

    .nav-toggle {
        width: 44px;
        height: 44px;
        font-size: 0.95rem;
    }

    .nav-menu {
        bottom: 56px;
        min-width: 130px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .impact-number {
        font-size: 1.8rem;
    }

    .project-impact {
        justify-content: center;
    }
}
