/* =========================================================
   A.A.D PORTFOLIO
   Ravi Adhikari
   Main Stylesheet
========================================================= */


/* =========================
   1. ROOT / VARIABLES
========================= */

:root {
    --bg-primary: #07111f;
    --bg-secondary: #0b1728;
    --bg-card: #101e31;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent: #38bdf8;
    --accent-dark: #0284c7;
    --accent-light: #7dd3fc;

    --border: rgba(148, 163, 184, 0.15);

    --shadow:
        0 20px 50px rgba(0, 0, 0, 0.25);

    --transition: 0.3s ease;

    --container-width: 1180px;
}


/* =========================
   2. RESET
========================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;

    background: var(--bg-primary);

    color: var(--text-primary);

    line-height: 1.6;

    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}


/* =========================
   3. GLOBAL
========================= */

.container {
    width: min(90%, var(--container-width));
    margin: 0 auto;
}

.section {
    padding: 110px 0;
}

.section-heading {
    display: flex;
    align-items: flex-start;

    gap: 20px;

    margin-bottom: 60px;
}

.section-number {
    color: var(--accent);

    font-size: 0.9rem;
    font-weight: 700;

    letter-spacing: 1px;
}

.section-label {
    color: var(--accent);

    font-size: 0.8rem;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 3px;

    margin-bottom: 8px;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3rem);

    line-height: 1.2;

    letter-spacing: -1px;
}


/* =========================
   4. HEADER
========================= */

.header {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;

    z-index: 1000;

    background: rgba(7, 17, 31, 0.82);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    border-bottom: 1px solid var(--border);
}

.navbar {
    min-height: 78px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;
}


/* Logo */

.logo {
    font-family: "Orbitron", sans-serif;

    font-size: 1.45rem;
    font-weight: 800;

    letter-spacing: 5px;

    color: var(--text-primary);

    text-transform: uppercase;

    transition: var(--transition);
}

.logo-dot {
    color: var(--accent);
}

.logo:hover {
    color: var(--accent);
}


/* Navigation */

.nav-menu {
    display: flex;

    align-items: center;

    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);

    font-size: 0.9rem;

    font-weight: 500;

    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}


/* CV navigation button */

.nav-cv-btn {
    padding: 10px 18px;

    border: 1px solid var(--accent);

    border-radius: 8px;

    color: var(--accent);

    font-size: 0.85rem;

    font-weight: 600;

    transition: var(--transition);

    white-space: nowrap;
}

.nav-cv-btn:hover {
    color: var(--bg-primary);

    background: var(--accent);

    transform: translateY(-2px);
}


/* Mobile menu button */

.menu-toggle {
    display: none;

    border: 0;

    background: transparent;

    color: var(--text-primary);

    font-size: 1.4rem;

    cursor: pointer;
}


/* =========================
   5. HERO
========================= */

.hero {
    position: relative;

    min-height: 100vh;

    display: flex;

    align-items: center;

    padding: 140px 0 80px;

    overflow: hidden;
}


/* background glow */

.hero::before {
    content: "";

    position: absolute;

    width: 600px;
    height: 600px;

    right: -250px;
    top: -150px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(56, 189, 248, 0.15),
            transparent 65%
        );

    pointer-events: none;
}

.hero-container {
    display: grid;

    grid-template-columns: 1.15fr 0.85fr;

    align-items: center;

    gap: 80px;

    position: relative;

    z-index: 1;
}

.thinking-emoji {
    font-size: 4.5rem;
    text-align: center;

    margin: 10px 0 20px;

    display: inline-block;

    animation: thinkingFloat 3s ease-in-out infinite;
}


/* Thinking Emoji Animation */

@keyframes thinkingFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    25% {
        transform: translateY(-8px) rotate(-6deg) scale(1.05);
    }

    50% {
        transform: translateY(-12px) rotate(4deg) scale(1.08);
    }

    75% {
        transform: translateY(-6px) rotate(-3deg) scale(1.04);
    }
}


/* Hero text */

.hero-intro {
    color: var(--accent);

    font-size: 1.5rem;

    font-weight: 600;

    letter-spacing: 2px;

    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(3.6rem, 7vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -5px;
    margin-bottom: 28px;

    /* Reveal animation */
    overflow: hidden;
    white-space: nowrap;

    width: 0;

    animation: writeName 1.8s ease-out forwards;
}

.hero h1 span {
    color: var(--accent);
}


/* Write name once on page load */

@keyframes writeName {

    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}
.hero h2 {
    max-width: 700px;

    color: var(--text-secondary);

    font-size: clamp(1.15rem, 2vw, 1.6rem);

    font-weight: 500;

    line-height: 1.5;

    margin-bottom: 24px;
}

.dot {
    color: var(--accent);

    margin: 0 5px;
}

.hero-description {
    max-width: 620px;

    color: var(--text-secondary);

    font-size: 1.05rem;

    line-height: 1.9;

    margin-bottom: 35px;
}


/* Hero buttons */

.hero-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 15px;

    margin-bottom: 35px;
}

.btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    min-height: 50px;

    padding: 0 24px;

    border-radius: 8px;

    font-size: 0.9rem;

    font-weight: 600;

    transition: var(--transition);
}

.btn-primary {
    color: var(--bg-primary);

    background: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-light);

    transform: translateY(-3px);

    box-shadow:
        0 10px 30px rgba(56, 189, 248, 0.2);
}

.btn-secondary {
    color: var(--text-primary);

    border: 1px solid var(--border);

    background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover {
    border-color: var(--accent);

    color: var(--accent);

    transform: translateY(-3px);
}


/* Social icons */

.social-links {
    display: flex;

    gap: 12px;
}

.social-links a,
.footer-social a {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid var(--border);

    border-radius: 50%;

    color: var(--text-secondary);

    transition: var(--transition);
}

.social-links a:hover,
.footer-social a:hover {
    color: var(--accent);

    border-color: var(--accent);

    transform: translateY(-3px);
}


/* =========================
   6. HERO CARD
========================= */

.hero-visual {
    position: relative;

    display: flex;

    justify-content: center;
}

.hero-card {
    position: relative;

    width: min(100%, 390px);

    min-height: 470px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    padding: 35px;

    border: 1px solid rgba(56, 189, 248, 0.2);

    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(16, 30, 49, 0.95),
            rgba(7, 17, 31, 0.8)
        );

    box-shadow: var(--shadow);

    overflow: hidden;
}


/* glow inside card */

.hero-card::before {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    right: -80px;
    bottom: -80px;

    border-radius: 50%;

    background:
        rgba(56, 189, 248, 0.12);

    filter: blur(20px);
}

.code-decoration {
    position: relative;

    z-index: 1;

    color: var(--text-muted);

    font-size: 0.85rem;

    font-weight: 600;

    letter-spacing: 3px;
}

.code-decoration span {
    color: var(--accent);
}

.hero-card-content {
    position: relative;

    z-index: 1;
}

.hero-card-content p {
    color: var(--accent);

    font-size: 0.8rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 2px;

    margin-bottom: 15px;
}

.hero-card-content h3 {
    font-size: 2rem;

    line-height: 1.25;

    margin-bottom: 20px;
}

.hero-card-content span {
    display: block;

    color: var(--text-secondary);

    font-weight: 600;

    margin-bottom: 5px;
}

.hero-card-content small {
    color: var(--text-muted);
}


/* floating shapes */

.floating-shape {
    position: absolute;

    border: 1px solid rgba(56, 189, 248, 0.35);

    z-index: -1;
}

.shape-one {
    width: 80px;
    height: 80px;

    top: -25px;
    right: -20px;

    border-radius: 20px;

    transform: rotate(20deg);
}

.shape-two {
    width: 50px;
    height: 50px;

    bottom: 20px;
    left: -25px;

    border-radius: 50%;
}


/* =========================
   7. ABOUT
========================= */

.about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;

    grid-template-columns: 1.2fr 0.8fr;

    gap: 80px;
}

.about-text p {
    color: var(--text-secondary);

    font-size: 1.05rem;

    line-height: 1.9;

    margin-bottom: 20px;
}

.about-text p:first-child {
    color: var(--text-primary);

    font-size: 1.25rem;

    font-weight: 600;
}


/* About information cards */

.about-info {
    display: grid;

    gap: 15px;
}

.info-card {
    display: flex;

    align-items: center;

    gap: 18px;

    padding: 22px;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.02);

    transition: var(--transition);
}

.info-card:hover {
    border-color: rgba(56, 189, 248, 0.5);

    transform: translateX(5px);
}

.info-card i {
    width: 45px;
    height: 45px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    color: var(--accent);

    background: rgba(56, 189, 248, 0.08);
}

.info-card span {
    display: block;

    color: var(--text-muted);

    font-size: 0.8rem;

    margin-bottom: 3px;
}

.info-card strong {
    font-size: 0.95rem;
}


/* =========================
   8. EXPERIENCE TIMELINE
========================= */

.timeline {
    position: relative;

    max-width: 900px;

    margin-left: 20px;
}

.timeline::before {
    content: "";

    position: absolute;

    left: 0;
    top: 5px;
    bottom: 5px;

    width: 1px;

    background: var(--border);
}

.timeline-item {
    position: relative;

    padding-left: 55px;

    padding-bottom: 60px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;

    left: -7px;
    top: 5px;

    width: 15px;
    height: 15px;

    border: 3px solid var(--bg-primary);

    border-radius: 50%;

    background: var(--accent);

    box-shadow:
        0 0 0 4px rgba(56, 189, 248, 0.1);
}

.timeline-content {
    padding: 30px;

    border: 1px solid var(--border);

    border-radius: 15px;

    background: var(--bg-card);

    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(56, 189, 248, 0.4);

    transform: translateY(-4px);
}

.timeline-date {
    display: inline-block;

    color: var(--accent);

    font-size: 0.8rem;

    font-weight: 600;

    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 1.3rem;

    margin-bottom: 5px;
}

.timeline-content h4 {
    color: var(--text-secondary);

    font-size: 0.95rem;

    margin-bottom: 3px;
}

.timeline-content > p {
    color: var(--text-muted);

    font-size: 0.85rem;

    margin-bottom: 20px;
}

.timeline-content ul {
    display: grid;

    gap: 10px;
}

.timeline-content li {
    position: relative;

    padding-left: 20px;

    color: var(--text-secondary);

    font-size: 0.9rem;
}

.timeline-content li::before {
    content: "→";

    position: absolute;

    left: 0;

    color: var(--accent);
}


/* =========================
   9. EDUCATION
========================= */

.education {
    background: var(--bg-secondary);
}

.education-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 25px;
}

.education-card {
    position: relative;

    min-height: 310px;

    padding: 35px;

    border: 1px solid var(--border);

    border-radius: 16px;

    background: rgba(255, 255, 255, 0.02);

    transition: var(--transition);
}

.education-card:hover {
    border-color: rgba(56, 189, 248, 0.4);

    transform: translateY(-5px);
}

.education-card.featured {
    background:
        linear-gradient(
            145deg,
            rgba(56, 189, 248, 0.08),
            rgba(255, 255, 255, 0.02)
        );
}

.education-status {
    position: absolute;

    top: 25px;
    right: 25px;

    padding: 6px 10px;

    border-radius: 20px;

    color: var(--accent);

    background: rgba(56, 189, 248, 0.1);

    font-size: 0.65rem;

    font-weight: 700;

    letter-spacing: 1px;
}

.education-icon {
    width: 50px;
    height: 50px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-bottom: 30px;

    border-radius: 12px;

    color: var(--accent);

    background: rgba(56, 189, 248, 0.08);

    font-size: 1.2rem;
}

.education-year {
    display: block;

    color: var(--accent);

    font-size: 0.8rem;

    font-weight: 600;

    margin-bottom: 10px;
}

.education-card h3 {
    max-width: 500px;

    font-size: 1.3rem;

    line-height: 1.4;

    margin-bottom: 12px;
}

.education-card h4 {
    color: var(--text-secondary);

    font-size: 0.95rem;

    margin-bottom: 5px;
}

.education-card p {
    color: var(--text-muted);

    font-size: 0.85rem;
}


/* =========================
   10. SKILLS
========================= */

.skills-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}

.skill-category {
    padding: 30px;

    border: 1px solid var(--border);

    border-radius: 15px;

    background: var(--bg-card);

    transition: var(--transition);
}

.skill-category:hover {
    border-color: rgba(56, 189, 248, 0.4);

    transform: translateY(-4px);
}

.skill-category > i {
    color: var(--accent);

    font-size: 1.5rem;

    margin-bottom: 20px;
}

.skill-category h3 {
    font-size: 1.1rem;

    margin-bottom: 20px;
}

.skill-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}

.skill-tags span {
    padding: 7px 12px;

    border: 1px solid var(--border);

    border-radius: 20px;

    color: var(--text-secondary);

    background: rgba(255, 255, 255, 0.02);

    font-size: 0.75rem;
}


/* =========================
   11. PORTFOLIO
========================= */

.portfolio {
    background: var(--bg-secondary);
}

.portfolio-placeholder {
    min-height: 350px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 50px 25px;

    border: 1px dashed rgba(56, 189, 248, 0.35);

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(56, 189, 248, 0.04),
            transparent
        );
}

.portfolio-placeholder i {
    color: var(--accent);

    font-size: 2.5rem;

    margin-bottom: 25px;
}

.portfolio-placeholder h3 {
    font-size: 1.5rem;

    margin-bottom: 10px;
}

.portfolio-placeholder p {
    max-width: 500px;

    color: var(--text-secondary);
}


/* =========================
   12. CONTACT
========================= */

.contact {
    position: relative;

    padding: 140px 0;

    overflow: hidden;
}

.contact::before {
    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(56, 189, 248, 0.08),
            transparent 65%
        );

    pointer-events: none;
}

.contact-container {
    position: relative;

    z-index: 1;

    display: flex;

    justify-content: center;

    text-align: center;
}

.contact-content {
    max-width: 700px;
}

.contact-content .section-number {
    display: block;

    margin-bottom: 10px;
}

.contact-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);

    line-height: 1.1;

    letter-spacing: -2px;

    margin-bottom: 20px;
}

.contact-content > p:not(.section-label) {
    color: var(--text-secondary);

    line-height: 1.8;

    margin-bottom: 30px;
}


/* =========================
   13. FOOTER
========================= */

/* =========================
   13. FOOTER
========================= */

.footer {
    width: 100%;
    padding: 30px 0;
    border-top: 1px solid var(--border);
}

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

.footer-info {
    width: 100%;
    text-align: center;
}

.footer-info p {
    margin: 4px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}


/* =========================
   14. SELECTION
========================= */

::selection {
    color: var(--bg-primary);
    background: var(--accent);
}


/* =========================
   15. SCROLLBAR
========================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #23364d;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}


/* =========================================================
   RESPONSIVE
========================================================= */


/* =========================
   TABLET
========================= */

@media (max-width: 1000px) {

    .nav-menu {
        gap: 18px;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .hero-container {
        gap: 40px;
    }

    .hero h1 {
        letter-spacing: -3px;
    }

}


/* =========================
   MOBILE NAVIGATION
========================= */

@media (max-width: 850px) {

    .section {
        padding: 85px 0;
    }


    /* Navigation */

    .menu-toggle {
        display: block;
        order: 3;
    }

    .nav-cv-btn {
        margin-left: auto;
    }

    .nav-menu {
        position: absolute;

        top: 78px;
        left: 0;

        width: 100%;

        display: none;

        flex-direction: column;
        align-items: flex-start;

        gap: 0;

        padding: 20px 5%;

        background: rgba(7, 17, 31, 0.98);

        border-bottom: 1px solid var(--border);
    }

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

    .nav-link {
        width: 100%;

        padding: 14px 0;

        border-bottom: 1px solid var(--border);

        font-size: 0.9rem;
    }


    /* Hero */

    .hero {
        min-height: auto;
        padding-top: 150px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 70px;
    }

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

    .hero-visual {
        justify-content: flex-start;
    }


    /* About */

    .about-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }


    /* Education */

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

}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 600px) {

    /* =========================================
       GENERAL
       ========================================= */

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 22px;
        padding-right: 22px;
        box-sizing: border-box;
    }

    .header .container {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }


    /* =========================================
       HEADER
       ========================================= */

    .navbar {
        min-height: 70px;
    }

    .logo {
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .nav-cv-btn {
        padding: 8px 12px;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .nav-menu {
        top: 70px;
    }


    /* =========================================
       HERO
       ========================================= */

    .hero {
        width: 100%;
        max-width: 100%;
        padding-top: 125px;
        padding-bottom: 70px;
        overflow: hidden;
    }

    .hero-container,
    .hero-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .hero h1 {
        width: 100%;
        max-width: 100%;

        font-size: clamp(2.8rem, 12vw, 4rem);
        line-height: 1.05;
        letter-spacing: -2px;

        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

    .hero h2 {
        width: 100%;
        max-width: 100%;

        font-size: 1rem;
        line-height: 1.7;

        white-space: normal;
        overflow-wrap: break-word;
    }

    .hero-description {
        width: 100%;
        max-width: 100%;

        font-size: 0.95rem;
        line-height: 1.8;

        overflow-wrap: break-word;
    }


    /* =========================================
       HERO BUTTONS
       ========================================= */

    .hero-buttons {
        width: 100%;
        max-width: 100%;

        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 14px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;

        box-sizing: border-box;
        justify-content: center;
    }


    /* =========================================
       HERO CARD
       ========================================= */

    .hero-card {
        width: 100%;
        max-width: 100%;

        min-height: 400px;
        padding: 28px;

        box-sizing: border-box;
    }

    .hero-card-content h3 {
        font-size: 1.6rem;
    }


    /* =========================================
       SECTION HEADINGS
       ========================================= */

    .section-heading {
        gap: 12px;
        margin-bottom: 40px;
    }

    .section-heading h2 {
        font-size: 2rem;
    }


    /* =========================================
       EXPERIENCE
       ========================================= */

    .timeline {
        margin-left: 7px;
        max-width: 100%;
    }

    .timeline-item {
        padding-left: 30px;
        max-width: 100%;
    }

    .timeline-content {
        padding: 22px;
        max-width: 100%;
        box-sizing: border-box;
    }


    /* =========================================
       SKILLS
       ========================================= */

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


    /* =========================================
       FOOTER
       ========================================= */

    .footer {
        padding: 25px 0;
    }

    .footer-container {
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .footer-info {
        width: 100%;
        text-align: center;
    }

    .footer-info p {
        margin: 4px 0;
        text-align: center;
    }

}

/* =========================
   VERY SMALL DEVICES
========================= */

@media (max-width: 390px) {

    .nav-cv-btn {
        display: none;
    }

    .hero h1 {
        font-size: 3rem;
    }

}

/* =========================================================
   CV PAGE - FINAL SECTION SPACING FIX
========================================================= */

/* Space after Profile card */
.cv-page .cv-profile {
    margin-bottom: 0;
}

/* Every section heading after content */
.cv-page .cv-profile + .section-heading {
    margin-top: 80px;
}


/* Space after Education cards */
.cv-page .education-grid + .section-heading {
    margin-top: 80px;
}


/* Space after Experience */
.cv-page .timeline + .section-heading {
    margin-top: 80px;
}


/* Space after Skills */
.cv-page .skills-grid + .section-heading {
    margin-top: 80px;
}


/* Space between heading and its content */
.cv-page .section-heading {
    margin-bottom: 40px;
}


/* Mobile spacing */
@media (max-width: 600px) {

    .cv-page .cv-profile + .section-heading,
    .cv-page .education-grid + .section-heading,
    .cv-page .timeline + .section-heading,
    .cv-page .skills-grid + .section-heading {
        margin-top: 55px;
    }

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

}
