/* CSS VARIABLES */
:root {
    --bg-main: #f8fafc;
    --bg-secondary: #e2e8f0;
    --text-main: #0f172a;
    --text-secondary: #475569;
    --accent-primary: #0ea5e9;
    --accent-secondary: #38bdf8;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
    --navbar-bg: rgba(248, 250, 252, 0.85);
}

body.dark {
    --bg-main: #020617;
    --bg-secondary: #0f172a;
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --card-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.6);
    --navbar-bg: rgba(2, 6, 23, 0.85);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

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

/*TYPOGRAPHY & ACCENTS*/
span {
    color: var(--accent-primary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: block;
}

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

/*BUTTONS*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.5);
}

.btn.secondary {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn.secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/*GLASS EFFECT*/
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--card-shadow-hover);
}

/*HEADER & NAVBAR*/
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    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(--glass-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: 1px;
}

nav {
    display: flex;
    gap: 25px;
}

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

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

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

nav a:hover::after {
    width: 100%;
}

.resume-btn {
    padding: 10px 20px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.resume-btn:hover {
    background: var(--accent-primary);
    color: #020617;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/*DARK MODE TOGGLE*/
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--accent-primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--accent-primary);
    color: #fff;
}

/*ABOUT SECTION*/
.section {
    padding: 100px 0 60px;
    min-height: auto;
}

#about {
    padding-top: 150px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.about-box {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-box h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--text-main), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing {
    font-size: 1.8rem;
    color: var(--accent-primary);
    margin-bottom: 25px;
    height: 40px;
}

.about-box p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.photo-frame {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-effect {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--accent-primary);
    filter: blur(100px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: -1;
    animation: pulseGlow 4s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.8);
        opacity: 0.15;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

.photo-img {
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    object-position: center top; /* Shift focus up to prevent hair cropping */
    border-radius: 24px;
    border: 2px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/*GRID LAYOUTS*/
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/*SKILLS SECTION*/
.card {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(56, 189, 248, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover .icon-wrapper {
    background: var(--accent-primary);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

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

.skill-tags span {
    position: relative;
    background: rgba(56, 189, 248, 0.05);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(56, 189, 248, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.skill-tags span::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.skill-tags span:hover::before {
    left: 100%;
}

.skill-tags span:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.3);
    color: var(--accent-primary);
}

/*EXPERIENCE */
.timeline-container {
    max-width: 800px;
    position: relative;
    padding-left: 30px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    padding: 30px;
    margin-bottom: 30px;
    width: 100%;
}

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 35px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-item h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.company {
    color: var(--accent-primary);
    font-weight: 500;
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-style: italic;
}

.timeline-item ul {
    list-style: none;
}

.timeline-item li {
    color: var(--text-secondary);
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.timeline-item li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

/*PROJECTS*/
.project-category {
    text-align: left;
    font-size: 1.8rem;
    color: var(--text-main);
    margin: 40px 0 20px;
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 10px;
    font-family: 'Outfit', sans-serif;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 5px 40px 5px;
    scrollbar-width: none;
    width: 100%;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(56, 189, 248, 0.15);
    backdrop-filter: blur(8px);
    color: var(--accent-primary);
    border: 1px solid rgba(56, 189, 248, 0.3);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4);
}

.carousel-btn.prev-btn {
    left: -20px;
}

.carousel-btn.next-btn {
    right: -20px;
}

.project-card {
    flex: 0 0 auto;
    padding: 0;
    overflow: hidden;
    width: 340px;
    max-width: 340px;
    margin: 0;
}

.project-img {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.project-info {
    padding: 25px;
    position: relative;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.tech-stack {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tech-stack span {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: var(--accent-primary);
    background: rgba(56, 189, 248, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

.project-buttons {
    display: flex;
    gap: 15px;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    position: absolute;
    bottom: 20px;
    left: 25px;
}

.project-card:hover .project-buttons {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.project-card:hover .tech-stack {
    opacity: 0;
    pointer-events: none;
}

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

.certificate-card {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.cert-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.cert-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
    transition: transform 0.5s ease;
}

.zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    font-size: 2rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.certificate-card:hover .cert-img-wrapper img {
    transform: scale(1.05);
}

.certificate-card:hover .zoom-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cert-info {
    padding: 25px;
    text-align: center;
}

.cert-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.cert-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.cert-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.cert-btn:hover {
    color: var(--accent-primary);
}

/*EDUCATION*/
.text-center {
    text-align: center;
}

.edu-card {
    align-items: center;
    padding: 40px;
}

.icon-wrapper.large {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
}

.edu-degree {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.edu-years {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 20px;
}

.edu-highlight {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 215, 0, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.edu-highlight i {
    color: #fbbf24;
}

/*CONTACT*/
.contact-section {
    text-align: center;
}

.contact-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    margin-top: -20px;
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.contact-card {
    flex: 1 1 300px;
    max-width: 380px;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(145deg, var(--glass-bg), rgba(255, 255, 255, 0.02));
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

.contact-icon-wrapper {
    width: 70px;
    height: 70px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-primary);
    margin: 0 auto 20px auto;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-icon-wrapper {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

.contact-card h3 {
    margin-bottom: 5px;
}

.contact-data {
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.contact-btn {
    border-color: rgba(56, 189, 248, 0.4);
}

.contact-btn:hover {
    background: rgba(56, 189, 248, 0.1);
}

/*FOOTER*/
footer {
    background: var(--bg-secondary);
    padding: 60px 0 20px;
    margin-top: 50px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo h2 {
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.footer-logo p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.footer-socials a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.footer-socials a:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/*MODAL*/
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--accent-primary);
}

/*ANIMATIONS & EFFECTS*/
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/*RESPONSIVE DESIGN*/
@media (max-width: 992px) {
    .about-box {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-box h1 {
        font-size: 2.8rem;
    }

    .about-box p {
        margin: 0 auto 30px;
    }

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

    .photo-frame {
        order: -1;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--navbar-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        gap: 20px;
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.4s ease;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

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

    .resume-btn {
        display: none;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline-container::before {
        left: 0;
    }

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

    .timeline-dot {
        left: -51px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .about-box h1 {
        font-size: 2.2rem;
    }

    .typing {
        font-size: 1.3rem;
    }

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

    .btn {
        width: 100%;
    }
}