
/* =========================================
   1. CSS VARIABLES
========================================= */
:root {
    --bg-color: #0b1020;
    --surface-color: #141b30;
    --surface-hover: #1b2540;
    --primary-color: #8b7cff;
    --secondary-color: #42d9c8;
    --text-color: #f4f5ff;
    --muted-color: #a7aec5;
    --border-color: #29334e;
    --radius: 16px;
    --transition: 0.3s ease;
    --section-padding: 85px 8%;
}

/* =========================================
   2. RESET AND GLOBAL STYLES
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

section {
    scroll-margin-top: 75px;
}

.highlight {
    color: var(--primary-color);
}

/* =========================================
   3. NAVIGATION BAR
========================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 8%;
    background: rgba(11, 16, 32, 0.94);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}

.logo {
    font-size: 23px;
    font-weight: 800;
    white-space: nowrap;
}

.logo span {
    color: var(--primary-color);
}

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

.nav-links a {
    color: var(--muted-color);
    font-size: 14px;
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--secondary-color);
}

a:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 5px;
}

/* =========================================
   4. COMMON SECTION STYLES
========================================= */
.section {
    padding: var(--section-padding);
}

.tagline {
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.section-heading {
    text-align: center;
    margin-bottom: 45px;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 38px);
}

.section-heading h2::after {
    content: "";
    display: block;
    width: 55px;
    height: 3px;
    margin: 14px auto 0;
    background: var(--secondary-color);
    border-radius: 5px;
}

/* =========================================
   5. HERO SECTION
========================================= */
.hero {
    min-height: 600px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 55px;
}

.hero h1 {
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero h1::after {
    content: "";
    display: block;
    width: 75px;
    height: 4px;
    margin-top: 18px;
    background: linear-gradient(
        to right,
        var(--primary-color),
        var(--secondary-color)
    );
    border-radius: 10px;
}

.hero h2 {
    color: var(--muted-color);
    font-size: 20px;
    margin-bottom: 20px;
}

.hero-description {
    color: var(--muted-color);
    max-width: 580px;
    margin-bottom: 28px;
}

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

/* =========================================
   6. BUTTONS
========================================= */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    transition:
        transform var(--transition),
        background var(--transition);
}

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

.primary-btn:hover {
    background: #7463f0;
    transform: translateY(-3px);
}

.secondary-btn {
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.secondary-btn:hover {
    background: var(--surface-hover);
    transform: translateY(-3px);
}

/* =========================================
   7. SOCIAL LINKS
========================================= */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 25px;
    color: var(--muted-color);
    font-size: 14px;
}

.social-links a {
    transition: color var(--transition);
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* =========================================
   8. HERO IMAGE / PROFILE CIRCLE
========================================= */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Circular frame for the profile image */
.profile-circle {
    width: 76%;
    aspect-ratio: 1 / 1;
    padding: 5px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 1;
    background:
        radial-gradient(
            circle at top left,
            #6558e855,
            transparent 60%
        ),
        var(--surface-color);
    box-shadow: 0 0 65px #8b7cff25;
}

/* IMPORTANT: Make the image fill the circle */
.profile-circle img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

/* Decorative rotating ring */
.profile-circle::before {
    content: "";
    position: absolute;
    inset: -12px;
    border: 1px dashed var(--secondary-color);
    border-radius: 50%;
    pointer-events: none;
    animation: rotate-ring 25s linear infinite;
}

/* Optional initials if you use them instead of a photo */
.profile-initials {
    font-size: 65px;
    font-weight: bold;
    color: var(--primary-color);
}

/* =========================================
   9. FLOATING CARDS
========================================= */
.floating-card {
    position: absolute;
    top: 14%;
    left: -4%;
    z-index: 2;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-color);
    color: var(--text-color);
    box-shadow: 0 10px 30px #0003;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    animation: float 4s ease-in-out infinite;
}

.second-card {
    top: auto;
    left: auto;
    right: -3%;
    bottom: 13%;
    animation-delay: 1s;
}

/* =========================================
   10. ABOUT SECTION
========================================= */
.about-section,
.projects-section,
.education-section {
    background: #0e1528;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.about-box,
.info-card,
.skill-card,
.project-card,
.education-card,
.contact-box {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.about-box {
    padding: 30px;
}

.about-box h3 {
    margin-bottom: 15px;
}

.about-box p {
    color: var(--muted-color);
    margin-bottom: 15px;
}

/* =========================================
   11. INFORMATION CARDS
========================================= */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.info-card {
    padding: 20px;
    transition:
        transform var(--transition),
        background var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    background: var(--surface-hover);
}

.info-icon {
    font-size: 25px;
}

.info-card h3 {
    margin: 8px 0;
    font-size: 16px;
}

.info-card p {
    color: var(--muted-color);
    font-size: 13px;
}

/* =========================================
   12. SKILLS SECTION
========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.skill-card {
    padding: 25px 18px;
    text-align: center;
    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition);
}

.skill-card > span {
    font-size: 32px;
}

.skill-card h3 {
    margin: 12px 0 8px;
    font-size: 16px;
}

.skill-card p {
    color: var(--muted-color);
    font-size: 13px;
}

.skill-card:hover {
    transform: translateY(-7px);
    border-color: var(--primary-color);
    background: var(--surface-hover);
}

/* =========================================
   13. PROJECT SECTION
========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.project-card {
    overflow: hidden;
    transition:
        transform var(--transition),
        border-color var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.project-card::before {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--primary-color),
        var(--secondary-color)
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

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

.project-banner {
    min-height: 150px;
    display: grid;
    place-items: center;
    font-size: 55px;
}

.purple-banner {
    background: linear-gradient(135deg, #473c93, #211d49);
}

.blue-banner {
    background: linear-gradient(135deg, #176a91, #142949);
}

.pink-banner {
    background: linear-gradient(135deg, #963f7d, #43224f);
}

.project-content {
    padding: 25px;
}

.project-type {
    font-size: 11px;
    color: var(--secondary-color);
    letter-spacing: 1.5px;
    font-weight: bold;
}

.project-content h3 {
    margin: 10px 0;
    font-size: 21px;
}

.project-content > p:not(.project-type) {
    color: var(--muted-color);
    font-size: 14px;
    margin-bottom: 20px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.tech-tags span {
    background: #8b7cff1b;
    color: #b8afff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
}

.project-link {
    display: inline-block;
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: bold;
    transition: color var(--transition);
}

.project-link:hover {
    color: var(--primary-color);
}

/* =========================================
   14. EDUCATION SECTION
========================================= */
.education-card {
    position: relative;
    max-width: 700px;
    margin: auto;
    padding: 30px;
    border-left: 3px solid var(--primary-color);
}

.education-card h3 {
    margin: 12px 0 5px;
}

.education-card p {
    color: var(--muted-color);
    margin-top: 8px;
}

.timeline-dot {
    position: absolute;
    top: 30px;
    left: -10px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--secondary-color);
}

.muted {
    font-size: 13px;
}

/* =========================================
   15. CONTACT SECTION
========================================= */
.contact-box {
    max-width: 700px;
    margin: auto;
    text-align: center;
    padding: 40px;
}

.contact-box h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.contact-box p {
    color: var(--muted-color);
    margin-bottom: 25px;
}

.contact-link {
    display: inline-block;
    margin: 15px 0 0 12px;
    color: var(--secondary-color);
    font-size: 14px;
    transition: color var(--transition);
}

.contact-link:hover {
    color: var(--primary-color);
}

/* =========================================
   16. FOOTER
========================================= */
.footer {
    text-align: center;
    padding: 35px 20px;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--muted-color);
    font-size: 12px;
    margin-top: 8px;
}

/* =========================================
   17. ANIMATIONS
========================================= */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

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

@keyframes rotate-ring {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   18. TABLET RESPONSIVE DESIGN
========================================= */
@media (max-width: 1000px) {
    .navbar {
        padding-left: 5%;
        padding-right: 5%;
    }

    .nav-links {
        gap: 14px;
    }

    .section {
        padding: 70px 5%;
    }

    .hero {
        gap: 30px;
    }

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

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

    .floating-card {
        left: 0;
    }

    .second-card {
        left: auto;
        right: 0;
    }
}

/* =========================================
   19. MOBILE RESPONSIVE DESIGN
========================================= */
@media (max-width: 700px) {
    .navbar {
        position: relative;
        flex-direction: column;
        gap: 12px;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px 18px;
    }

    .section {
        padding: 60px 5%;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 25px;
        padding-top: 55px;
    }

    .hero h1::after {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons,
    .social-links {
        justify-content: center;
    }

    .hero-visual {
        max-width: 380px;
        margin-top: 15px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

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

    .section-heading {
        margin-bottom: 30px;
    }
}

/* =========================================
   20. SMALL MOBILE SCREENS
========================================= */
@media (max-width: 420px) {
    .section {
        padding: 50px 5%;
    }

    .hero h1 {
        font-size: 36px;
    }

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

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

    .hero-visual {
        max-width: 320px;
    }

    .floating-card {
        padding: 9px;
        font-size: 10px;
    }

    .contact-box {
        padding: 25px 18px;
    }

    .contact-box h3 {
        font-size: 20px;
    }

    .contact-link {
        margin-left: 0;
    }

    .about-box {
        padding: 22px;
    }

    .project-content {
        padding: 20px;
    }
}

/* =========================================
   21. ACCESSIBILITY
========================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}
