* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}


/* ── THEME VARIABLES ── */

:root {
    --bg-color: #0a0a0a;
    --snd-bg-color: #1a1a1a;
    --text-color: #edf2f7;
    --main-color: gold;
}

[data-theme="light"] {
    --bg-color: #f9f6ef;
    --snd-bg-color: #ede9df;
    --text-color: #1a1a1a;
    --main-color: #c49a00;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
    scroll-padding-top: 80px;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.35s ease, color 0.35s ease;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}


/* ── HEADER ── */

.header {
    position: fixed;
    width: 100%;
    top: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 5%;
    background: var(--main-color);
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
}

.logo {
    font-size: 3rem;
    color: var(--bg-color);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    letter-spacing: 3px;
    text-shadow: 0 0 15px var(--bg-color);
}

.navbar a {
    font-size: 1.9rem;
    color: var(--bg-color);
    margin-left: 4rem;
    font-weight: 700;
    transition: 0.3s ease;
    position: relative;
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bg-color);
    transition: width 0.3s ease;
}

.navbar a:hover::after {
    width: 100%;
}

.navbar a:hover,
.navbar a.active {
    color: var(--text-color);
}

#menu_icon {
    font-size: 3.6rem;
    color: var(--bg-color);
    cursor: pointer;
    display: none;
    transition: transform 0.3s ease;
}

#menu_icon:hover {
    transform: scale(1.1);
}

.bx-x {
    animation: rotateMenu 0.3s ease;
}

@keyframes rotateMenu {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(180deg);
    }
}

.navbar.active {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ── THEME TOGGLE BUTTON ── */

#theme-toggle {
    background: transparent;
    border: 0.2rem solid var(--bg-color);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 2rem;
    font-size: 2rem;
    color: var(--bg-color);
    transition: 0.3s ease;
    flex-shrink: 0;
}

#theme-toggle:hover {
    background: var(--bg-color);
    color: var(--main-color);
    transform: rotate(20deg) scale(1.1);
}


/* ── HOME SECTION ── */

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#galaxy-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

[data-theme="light"] #galaxy-bg {
    opacity: 0.12;
}

.home>*:not(#galaxy-bg) {
    position: relative;
    z-index: 1;
}

.about,
.education,
.services,
.projects,
.contact,
.footer {
    position: relative;
    z-index: 1;
}

.home-img img {
    width: 25vw;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    animation: floatImage 4s ease-in-out infinite;
    transition: all 0.4s ease;
}

.home-img img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px var(--main-color), 0 0 50px rgba(255, 215, 0, 0.3);
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3.5rem);
    }
    100% {
        transform: translateY(0);
    }
}

.home-content {
    margin-left: 5rem;
}

.home-content h3 {
    font-size: 3.7rem;
    font-weight: 700;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

span {
    color: var(--main-color);
}

.home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content p {
    font-size: 1.6rem;
}

.home-content h3:nth-child(1) {
    animation: fadeInLeft 0.8s ease;
}

.home-content h1 {
    animation: fadeInRight 0.8s ease 0.2s both;
}

.home-content h3:nth-child(3) {
    animation: fadeInLeft 0.8s ease 0.4s both;
}

.home-content p {
    animation: fadeInUp 0.8s ease 0.6s both;
}

.social-media {
    animation: fadeInUp 0.8s ease 0.8s both;
}

.home-content .btn {
    animation: fadeInUp 0.8s ease 1s both;
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 0.2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-media a:hover {
    transform: scale(1.2) translateY(-8px) rotate(360deg);
    background-color: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 25px var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 2rem;
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    box-shadow: 0 0 1.6rem var(--main-color);
}


/* ── ABOUT SECTION ── */

.about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: var(--snd-bg-color);
    transition: background-color 0.35s ease;
}

.about-img img {
    width: 25vw;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    transition: all 0.4s ease;
}

.about-img img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px var(--main-color), 0 0 50px rgba(255, 215, 0, 0.3);
}

.heading {
    font-size: 6rem;
    text-align: left;
    position: relative;
    display: inline-block;
}

.heading::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--main-color);
    animation: titleUnderline 4s ease forwards 0.5s;
}

@keyframes titleUnderline {
    0% {
        width: 0;
    }
    100% {
        width: 80px;
    }
}

.about-content {
    padding: 0.4rem;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 3rem;
}

.about-content p a {
    color: var(--main-color);
    transition: 0.4s ease;
}

.about-content p a:hover {
    color: var(--text-color);
}

.about-content p {
    font-size: 1.6rem;
    line-height: 1.7;
    margin: 1.5rem 0;
    color: var(--text-color);
}

.cert-badges {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 215, 0, 0.05);
    border-left: 4px solid var(--main-color);
    border-radius: 0 1rem 1rem 0;
}

.cert-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.8rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--main-color);
    border-radius: 50px;
    font-size: 1.4rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.cert-badge i {
    font-size: 1.8rem;
    color: var(--main-color);
}

.cert-badge:hover {
    background: var(--main-color);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.cert-badge:hover i {
    color: var(--bg-color);
}


/* ── EDUCATION SECTION ── */

.education {
    background: var(--bg-color);
    padding: 10rem 9% 5rem;
    transition: background-color 0.35s ease;
}

.section-header {
    text-align: center;
    margin-bottom: 6rem;
}

.section-header .subtitle {
    font-size: 1.4rem;
    color: var(--main-color);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
}

.section-header .title {
    font-size: 5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.section-header .divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.section-header .divider .line {
    width: 80px;
    height: 2px;
    background: var(--main-color);
    opacity: 0.5;
}

.section-header .divider i {
    font-size: 2.4rem;
    color: var(--main-color);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto 5rem;
}

.education-item {
    background: var(--snd-bg-color);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.education-item:hover {
    border-color: var(--main-color);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.1);
}

.education-item.featured {
    border-color: var(--main-color);
    background: linear-gradient(135deg, var(--snd-bg-color) 0%, rgba(255, 215, 0, 0.05) 100%);
}

.item-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.item-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--main-color);
    border-style: solid;
    opacity: 0.6;
}

.item-corner.top-left {
    top: 10px;
    left: 10px;
    border-width: 2px 0 0 2px;
}

.item-corner.top-right {
    top: 10px;
    right: 10px;
    border-width: 2px 2px 0 0;
}

.item-corner.bottom-left {
    bottom: 10px;
    left: 10px;
    border-width: 0 0 2px 2px;
}

.item-corner.bottom-right {
    bottom: 10px;
    right: 10px;
    border-width: 0 2px 2px 0;
}

.item-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--main-color);
    color: var(--bg-color);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.item-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}

.item-icon i {
    font-size: 2.8rem;
    color: var(--main-color);
}

.icon-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.3);
    animation: ringPulse 2s ease-in-out infinite;
}

@keyframes ringPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.meta-date {
    font-size: 1.3rem;
    color: var(--main-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-date i {
    font-size: 1.4rem;
}

.meta-status {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-status.ongoing {
    background: rgba(255, 215, 0, 0.15);
    color: var(--main-color);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.meta-status.completed {
    background: rgba(0, 200, 100, 0.1);
    color: #00c864;
    border: 1px solid rgba(0, 200, 100, 0.3);
}

.item-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.item-institution {
    font-size: 1.4rem;
    color: var(--main-color);
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.item-description {
    font-size: 1.4rem;
    color: var(--text-color);
    opacity: 0.7;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.item-progress {
    margin-top: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 0.6rem;
}

.progress-value {
    color: var(--main-color);
    font-weight: 600;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--main-color), rgba(255, 215, 0, 0.6));
    border-radius: 10px;
    animation: skillFill 1.5s ease-out forwards;
    transform-origin: left;
}

.item-achievement {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 1.3rem;
    color: var(--main-color);
    margin-top: 1rem;
}

.item-achievement i {
    font-size: 1.6rem;
}

.timeline-indicator {
    max-width: 800px;
    margin: 4rem auto 0;
    padding: 2.5rem;
    background: var(--snd-bg-color);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.timeline-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--main-color), rgba(255, 215, 0, 0.5));
    border-radius: 10px;
    animation: skillFill 2s ease-out forwards;
    transform-origin: left;
}

.timeline-points {
    display: flex;
    justify-content: space-between;
}

.timeline-points .point {
    font-size: 1.3rem;
    color: var(--text-color);
    opacity: 0.6;
    text-align: center;
}

.timeline-points .point.active {
    color: var(--main-color);
    opacity: 1;
    font-weight: 700;
}


/* ── SERVICES / SKILLS SECTION ── */

.services {
    background: var(--snd-bg-color);
    transition: background-color 0.35s ease;
}

.services h2 {
    margin-bottom: 5rem;
    text-align: center;
}

.services p {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.services p strong {
    color: var(--main-color);
}

.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.services-container .services-box {
    flex: 1 1 29rem;
    background: var(--bg-color);
    padding: 4rem 2rem !important;
    border-radius: 2rem;
    text-align: center;
    border: 0.3rem solid var(--snd-bg-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.services-container .services-box:hover {
    border-color: var(--main-color);
    transform: translateY(-15px) scale(1.02);
}

.services-box i {
    font-size: 7rem;
    color: var(--main-color);
    transition: transform 0.5s ease;
}

.services-box:hover i {
    transform: rotate(360deg) scale(1.1);
}

.services-box h3 {
    font-size: 2.6rem;
}

.services-box p {
    font-size: 1.6rem;
    margin: 1rem 0;
    line-height: 1.6;
}

.skill-range {
    margin-top: 2rem;
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: var(--text-color);
}

.skill-info span:first-child {
    font-weight: 600;
    color: var(--main-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--main-color);
    border-radius: 10px;
    animation: skillFill 1.5s ease-out forwards;
    transform-origin: left;
}

@keyframes skillFill {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}


/* ── PROJECTS SECTION ── */

.projects {
    background: var(--bg-color);
    padding: 8rem 9% 5rem;
    transition: background-color 0.35s ease;
}

.projects h2 {
    text-align: center;
    margin-bottom: 5rem;
}

.projects p {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 4rem;
    color: var(--text-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--snd-bg-color);
    padding: 2.5rem;
    border-radius: 2rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.project-card:hover {
    border-color: var(--main-color);
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(255, 215, 0, 0.08);
}

.project-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 215, 0, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: 0.3s;
}

.project-icon:hover {
    background: var(--main-color);
}

.project-icon i {
    font-size: 3.5rem;
    color: var(--main-color);
    transition: 0.3s ease;
}

.project-icon i:hover {
    color: var(--bg-color);
}

.project-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: rgba(255, 215, 0, 0.08);
    color: var(--main-color);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-tech span:hover {
    background: var(--main-color);
    color: var(--bg-color);
    transform: translateY(-3px);
}

.project-card p {
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--text-color);
    flex-grow: 1;
}

.project-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.8rem;
    background: var(--main-color);
    color: var(--bg-color);
    border-radius: 30px;
    font-size: 1.4rem;
    font-weight: 600;
    transition: 0.3s ease;
    margin-top: auto;
}

.project-btn i {
    font-size: 1.8rem;
    color: var(--bg-color);
}

.project-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--main-color);
}

.projects-more {
    text-align: center;
    margin-top: 5rem;
}

.projects-more .btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 3rem;
    font-size: 1.6rem;
}

.projects-more .btn i {
    font-size: 2rem;
}


/* ── CONTACT SECTION ── */

.contact {
    background: var(--snd-bg-color);
    transition: background-color 0.35s ease;
}

.contact .heading {
    text-align: center;
}

.contact h2 {
    margin-bottom: 3rem;
    color: var(--text-color);
}

.contact form {
    max-width: 80rem;
    margin: 1rem auto 3rem;
    text-align: center;
}

.contact form .input-box {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: 0.8rem;
    border: 0.2rem solid var(--main-color);
    margin: 0.7rem 0;
    resize: none;
    transition: all 0.3s ease;
}

.contact form .input-box input:focus,
.contact form textarea:focus {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.1);
}

.contact form .input-box input {
    width: 49%;
    margin: 0.7rem 0.35rem;
}

.contact form .btn {
    margin-top: 2rem;
}


/* ── FOOTER ── */

.footer {
    position: relative;
    width: 100%;
    padding: 40px 0;
    background-color: var(--bg-color);
    transition: background-color 0.35s ease;
}

.footer .social {
    text-align: center;
    padding-bottom: 25px;
    color: var(--main-color);
}

.footer .social a {
    font-size: 25px;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    width: 42px;
    height: 42px;
    line-height: 42px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin: 0 10px;
    transition: all 0.4s ease;
}

.footer .social a:hover {
    transform: rotate(360deg) scale(1.2);
    background-color: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 25px var(--main-color);
}

.footer .copyright {
    margin-top: 20px;
    text-align: center;
    font-size: 16px;
    color: var(--text-color);
}


/* ── TYPED CURSOR ── */

.typed-cursor {
    animation: blink 1s infinite;
    color: var(--main-color);
    font-size: 3.7rem;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}


/* ── IMAGE LOAD ── */

img {
    animation: imageLoad 0.8s ease;
}

@keyframes imageLoad {
    0% {
        opacity: 0;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}


/* ── SCROLL REVEAL ── */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
    opacity: 1;
    transform: none;
}


/* ── RESPONSIVE ── */

@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }
    section {
        padding: 10rem 3%;
    }
    .services {
        padding: 7rem;
    }
    .contact form .input-box input {
        width: 100%;
    }
    .footer {
        padding: 2rem 3%;
    }
    #menu_icon {
        display: block;
    }
    .navbar {
        position: absolute;
        top: 100%;
        right: -100%;
        width: 255px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        background: var(--main-color);
        transition: all 0.5s ease;
    }
    .navbar a {
        display: block;
        padding: 20px 17px;
        font-size: 24px;
    }
    .navbar.active {
        right: 0;
    }
    .home {
        flex-direction: column;
    }
    .home-content h3 {
        font-size: 2.6rem;
    }
    .home-content h1 {
        font-size: 5rem;
    }
    .home-content {
        order: 2;
        margin-left: 1rem;
    }
    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }
    .about {
        flex-direction: column-reverse;
    }
    .about-img img {
        width: 70vw;
        margin-top: 4rem;
    }
    .education-grid {
        grid-template-columns: 1fr;
    }
    #theme-toggle {
        margin-left: 1rem;
    }
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    .project-card {
        padding: 2rem;
    }
    .project-icon {
        width: 60px;
        height: 60px;
    }
    .project-icon i {
        font-size: 3rem;
    }
    .project-card h3 {
        font-size: 1.8rem;
    }
    .project-card p {
        font-size: 1.4rem;
    }
    .cert-links {
        flex-direction: column;
        gap: 1rem;
    }
    .cert-badge {
        width: 100%;
        justify-content: center;
    }
    .footer .social {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        max-width: 200px;
        margin: 0 auto;
    }
    .footer .social a {
        margin: 0.5rem;
        width: 38px;
        height: 38px;
        font-size: 2rem;
        line-height: 38px;
    }
}

@media (max-width: 617px) {
    html {
        font-size: 50%;
    }
    .home-img img {
        width: 70vw;
        margin-top: 8rem;
    }
    .about-img img {
        width: 70vw;
        margin-top: 4rem;
    }
}


/* ── LOADING SCREEN ── */

#loader {
    position: fixed;
    inset: 0;
    background: #050508;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hide {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.loader-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.loader-rings-scene {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.loader-plate {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #1a1a2e, #050508 70%);
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.08), inset 0 0 40px rgba(0, 0, 0, 0.8);
}

svg.loader-ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.l-ro {
    fill: none;
    stroke: gold;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 565;
    stroke-dashoffset: 565;
    transform: rotate(-90deg);
    transform-origin: 100px 100px;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
}

.l-ro.animate,
#outer-ring {
    animation: loaderFillOuter 2.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.l-rm {
    fill: none;
    stroke: rgba(255, 215, 0, 0.35);
    stroke-width: 1.5;
    stroke-dasharray: 8 12;
    transform-origin: 100px 100px;
    animation: loaderSpinMid 4s linear infinite;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.3));
}

.l-ri {
    fill: none;
    stroke: rgba(255, 215, 0, 0.18);
    stroke-width: 1;
    stroke-dasharray: 4 16;
    transform-origin: 100px 100px;
    animation: loaderSpinInner 2.5s linear infinite;
}

@keyframes loaderFillOuter {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes loaderSpinMid {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderSpinInner {
    to {
        transform: rotate(-360deg);
    }
}

.loader-bracket {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: rgba(255, 215, 0, 0.5);
    border-style: solid;
}

.loader-bracket.tl {
    top: 4px;
    left: 4px;
    border-width: 2px 0 0 2px;
}

.loader-bracket.tr {
    top: 4px;
    right: 4px;
    border-width: 2px 2px 0 0;
}

.loader-bracket.bl {
    bottom: 4px;
    left: 4px;
    border-width: 0 0 2px 2px;
}

.loader-bracket.br {
    bottom: 4px;
    right: 4px;
    border-width: 0 2px 2px 0;
}

.loader-initials {
    position: absolute;
    z-index: 2;
    font-size: 52px;
    font-weight: 800;
    color: gold;
    letter-spacing: 4px;
    font-family: system-ui;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.2);
    animation: loaderRaPulse 2s ease-in-out infinite;
}

@keyframes loaderRaPulse {
    0%,
    100% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.4), 0 0 40px rgba(255, 215, 0, 0.15);
    }
    50% {
        text-shadow: 0 0 35px rgba(255, 215, 0, 0.9), 0 0 60px rgba(255, 215, 0, 0.3);
    }
}

.loader-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-name-block {
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.loader-name-block.show {
    opacity: 1;
    transform: translateY(0);
}

.loader-brand {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(180deg, #fff 40%, rgba(255, 215, 0, 0.85) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: system-ui;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.2));
}

.loader-underline {
    height: 1px;
    width: 0;
    margin: 8px auto 0;
    background: linear-gradient(90deg, transparent, gold, transparent);
    transition: width 0.7s ease;
}

.loader-underline.show {
    width: 100%;
}

.loader-tagline {
    font-size: 10px;
    letter-spacing: 5px;
    color: rgba(255, 215, 0, 0.45);
    text-transform: uppercase;
    font-family: system-ui;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.loader-tagline.show {
    opacity: 1;
}

.loader-prog-wrap {
    width: 220px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.loader-prog-wrap.show {
    opacity: 1;
}

.loader-prog-track {
    width: 100%;
    height: 1px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-prog-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, transparent, gold, transparent);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    transition: width 2.2s ease;
}

.loader-prog-fill.run {
    width: 100%;
}

.loader-prog-label {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    font-family: monospace;
    margin-top: 6px;
}


/* ── NAVBAR LOGO ── */

.logo {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.logo-rings-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-rings-mini svg {
    display: block;
}

.mini-rm {
    transform-origin: 20px 20px;
    animation: miniSpinM 3s linear infinite;
}

.mini-ri {
    transform-origin: 20px 20px;
    animation: miniSpinI 2s linear infinite;
}

@keyframes miniSpinM {
    to {
        transform: rotate(360deg);
    }
}

@keyframes miniSpinI {
    to {
        transform: rotate(-360deg);
    }
}


/* ── MOBILE LOADER ── */

@media (max-width: 480px) {
    .loader-rings-scene {
        width: 150px;
        height: 150px;
    }
    .loader-initials {
        font-size: 38px;
    }
    .loader-brand {
        font-size: 34px;
        letter-spacing: 4px;
    }
    .l-ro {
        stroke-dasharray: 424;
        stroke-dashoffset: 424;
    }
}


/* ── AI CHATBOT ── */

.chat-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--main-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.35);
    z-index: 9000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.55);
}

.chat-fab i {
    font-size: 2.4rem;
    color: var(--bg-color);
    transition: transform 0.3s ease;
}

.chat-fab:hover i {
    transform: rotate(-10deg) scale(1.1);
}

.chat-fab-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--bg-color);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%,
    100% {
        transform: scale(1)
    }
    50% {
        transform: scale(1.3)
    }
}

.chat-window {
    position: fixed;
    bottom: 96px;
    right: 28px;
    width: 340px;
    max-height: 500px;
    background: var(--snd-bg-color);
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 8999;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.04);
    transform: scale(0.92) translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.3s ease;
}

.chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    padding: 14px 16px;
    background: var(--bg-color);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.chat-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.1);
    border: 1.5px solid var(--main-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--main-color);
    letter-spacing: 1px;
}

.chat-online {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--bg-color);
}

.chat-header-info {
    flex: 1;
}

.chat-header-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-ai-badge {
    font-size: 0.9rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--main-color);
    color: var(--bg-color);
    font-weight: 700;
}

.chat-header-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 1px;
}

[data-theme="light"] .chat-header-sub {
    color: rgba(0, 0, 0, 0.4);
}

.chat-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.3);
    font-size: 2rem;
    display: flex;
    align-items: center;
    padding: 2px;
    transition: color 0.2s;
}

.chat-close-btn:hover {
    color: var(--main-color);
}

[data-theme="light"] .chat-close-btn {
    color: rgba(0, 0, 0, 0.3);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.15) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.15);
    border-radius: 4px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    gap: 3px;
}

.chat-msg.bot {
    align-self: flex-start;
}

.chat-msg.user {
    align-self: flex-end;
}

.chat-bubble {
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 1.3rem;
    line-height: 1.6;
    word-break: break-word;
}

.chat-msg.bot .chat-bubble {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-bottom-left-radius: 4px;
}

.chat-msg.user .chat-bubble {
    background: var(--main-color);
    color: var(--bg-color);
    font-weight: 600;
    border-bottom-right-radius: 4px;
}

.chat-time {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.22);
}

.chat-msg.user .chat-time {
    text-align: right;
}

[data-theme="light"] .chat-time {
    color: rgba(0, 0, 0, 0.3);
}

.chat-typing {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 10px 14px;
}

.chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.5);
    animation: typingDot 1.2s ease-in-out infinite;
}

.chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.4
    }
    50% {
        transform: translateY(-5px);
        opacity: 1
    }
}

.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 14px 10px;
    flex-shrink: 0;
}

.chat-qr {
    background: transparent;
    border: 1px solid rgba(255, 215, 0, 0.22);
    color: rgba(255, 215, 0, 0.7);
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.chat-qr:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--main-color);
    color: var(--main-color);
}

.chat-input-row {
    padding: 10px 12px;
    background: var(--bg-color);
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    background: var(--snd-bg-color);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 20px;
    padding: 8px 14px;
    color: var(--text-color);
    font-size: 1.3rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: rgba(255, 215, 0, 0.4);
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .chat-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--main-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.chat-send-btn i {
    font-size: 1.8rem;
    color: var(--bg-color);
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 88px;
    }
    .chat-fab {
        bottom: 20px;
        right: 16px;
    }
}