/* --- RESET & VARIABLES --- */
:root {
    --navbar-bg: rgba(255, 255, 255, 0.9);
    --bg-color: #ffffff;
    --text-main: #0a0a0a;
    --text-muted: #737373;
    --accent: #2563eb;
    --border: #e5e5e5;
    --tag-bg: #f5f5f5;
    --image-bg: #f5f5f5;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --container-width: 1200px;
    --section-padding: 120px;
    --transition: all 0.3s ease;
}

body.dark-mode {
    --navbar-bg: rgba(10, 10, 10, 0.9);
    --bg-color: #0a0a0a;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --border: #262626;
    --card-bg: #171717;
    --tag-bg: #262626;
    --image-bg: #262626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.6;
}

img {
    max-width: 100%;
    border-radius: 4px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 5%;
}

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

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.navbar.scrolled {
    border-color: var(--border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

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

.theme-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.theme-btn:hover {
    transform: scale(1.1);
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

/* --- HERO --- */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

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

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 24px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.btn-group {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-color);
}

.btn-primary:hover {
    background: #333;
    color: #fff;
    opacity: 1;
}

.btn-outline {
    border-color: var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--text-main);
    opacity: 1;
}

/* --- HERO STATS --- */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- SECTION TITLES --- */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    margin-top: 8px;
}

/* --- PROFILE SECTION --- */
.profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgb(34, 197, 94);
}

body.dark-mode .availability-badge {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: rgb(34, 197, 94);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}


/* --- ABOUT --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    border-top: 1px solid var(--border);
    padding-top: 60px;
}

.section-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: block;
}

.about-text p {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 24px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    padding: 8px 16px;
    background: var(--tag-bg);
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- EDUCATION --- */
.education-timeline {
    position: relative;
    max-width: 800px;
    margin-top: 24px;
}

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

.timeline-item:last-child {
    border-left: 1px solid transparent;
}

.timeline-dot {
    position: absolute;
    left: -5px;
    top: 0;
    width: 10px;
    height: 10px;
    background-color: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-color);
    box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.timeline-content .institution {
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-main);
}

.timeline-content .description {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- PROJECTS --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-image {
    background: var(--image-bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 16/10;
    transition: background-color 0.3s ease;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.project-card:hover .project-image img {
    transform: scale(1.03);
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.project-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.btn-text {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
    margin-top: 12px;
    display: inline-block;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.2s;
    font-family: inherit;
}

.btn-text:hover {
    opacity: 0.8;
}

/* --- CERTIFICATES --- */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 992px) {
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .certificates-grid {
        grid-template-columns: 1fr;
    }
}

.certificate-item {
    display: block;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.certificate-item:hover {
    transform: translateY(-5px);
    border-color: var(--text-main);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.cert-image {
    background: var(--image-bg);
    overflow: hidden;
    aspect-ratio: 4/3;
    border-bottom: 1px solid var(--border);
}

.cert-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.certificate-item:hover .cert-image img {
    transform: scale(1.05);
}

.cert-info {
    padding: 20px;
}

.cert-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.cert-issuer {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- SERVICES --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--text-main);
    transform: translateY(-4px);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: var(--tag-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-main);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.service-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* --- TESTIMONIALS --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

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

.testimonial-card:hover {
    border-color: var(--text-main);
    transform: translateY(-4px);
}

.rating {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    color: #fbbf24;
}

.rating svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: none;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.testimonial-author strong {
    font-weight: 600;
    color: var(--text-main);
}

.testimonial-author span {
    font-size: 0.85rem;
    color: var(--text-muted);
}


/* --- CONTACT --- */
.contact-section {
    text-align: center;
    padding: 160px 0;
}

.contact-section h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 32px;
}

.contact-section a {
    font-size: 1.5rem;
    text-decoration: underline;
    text-underline-offset: 6px;
    color: var(--text-muted);
    transition: color 0.3s;
}

.contact-section a:hover {
    color: var(--text-main);
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-socials {
    display: flex;
    gap: 24px;
}

.footer-socials a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.footer-socials a:hover {
    color: var(--text-main);
}

/* --- BACK TO TOP --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--text-main);
    transform: translateY(-5px);
}

/* --- MODAL --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-color);
    color: var(--text-main);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2001;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-muted);
    transition: color 0.2s;
    z-index: 10;
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.modal-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    line-height: 1.1;
}

.modal-meta {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.modal-section {
    margin-bottom: 32px;
}

.modal-section h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.modal-section p {
    color: var(--text-muted);
    line-height: 1.7;
}

.modal-list {
    list-style: none;
    margin-top: 16px;
}

.modal-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.modal-list li::before {
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* --- UPWORK BUTTON --- */
.btn-upwork {
    background: linear-gradient(135deg, #14a800 0%, #1a9f00 100%);
    color: #ffffff !important;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(20, 168, 0, 0.25);
}

.btn-upwork:hover {
    background: linear-gradient(135deg, #12920a 0%, #158a00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 168, 0, 0.35);
    opacity: 1;
}

.btn-upwork svg {
    width: 18px;
    height: 18px;
}

.nav-links .btn-upwork {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* --- FAQ SECTION --- */
.faq-section {
    background: var(--bg-color);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--text-muted);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: var(--tag-bg);
}

.faq-question span {
    flex: 1;
    padding-right: 16px;
}

.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-question svg {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 24px 24px;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.faq-answer ul {
    list-style: none;
    margin: 12px 0;
}

.faq-answer ul li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    color: var(--text-muted);
    line-height: 1.5;
}

.faq-answer ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.faq-answer ul li strong {
    color: var(--text-main);
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .profile-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--border);
        gap: 20px;
        align-items: flex-start;
    }

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

    .nav-links .theme-btn {
        align-self: flex-start;
        padding: 0;
    }

    .menu-toggle {
        display: block;
    }

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

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

    footer .container {
        flex-direction: column;
        gap: 20px;
    }

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

    .btn-group {
        flex-direction: column;
        gap: 12px;
    }

    .btn-group .btn {
        text-align: center;
        justify-content: center;
    }

    .nav-links .btn-upwork {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .certificates-grid {
        grid-template-columns: 1fr;
    }
}