/*
  Anurag Bajpai — Portfolio Styles
  Colorful, modern, responsive, and animated ✨
*/

/* CSS Variables: update these to tweak the look */
:root {
    --bg: #0b0f1a;
    --bg-2: #0e1222;
    --text: #e6e9ee;
    --muted: #a6b0c3;
    --card: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);

    /* Brandful gradients */
    --g1: linear-gradient(135deg, #8a5cff 0%, #00e1ff 50%, #00ffa3 100%);
    --g2: linear-gradient(135deg, #ff5cf0 0%, #ffb86c 50%, #ffd83d 100%);
    --g3: linear-gradient(135deg, #7bf1a8 0%, #58a6ff 50%, #d67bff 100%);
    --btn-primary: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    --btn-secondary: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
}

/* Global reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    scroll-behavior: smooth;
    background: radial-gradient(1200px 800px at 20% 10%, rgba(124, 58, 237, 0.25), transparent 50%),
        radial-gradient(1000px 700px at 90% 20%, rgba(6, 182, 212, 0.24), transparent 50%),
        radial-gradient(900px 600px at 10% 90%, rgba(249, 115, 22, 0.22), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.6;
}

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}

/* Floating WhatsApp */
.w {
    position: fixed;
    z-index: 9999;
    right: 22px;
    bottom: 22px;
}

.w a {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25d366;
    color: #081b0b;
    box-shadow: 0 12px 24px rgba(37, 211, 102, 0.3);
    transition: transform .2s ease, box-shadow .2s ease;
    text-decoration: none;
}

.w a:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 30px rgba(37, 211, 102, .4);
}

.w i {
    font-size: 26px;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: 160px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}

header.scrolled {
    background: rgba(10, 14, 24, .55);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.logo h2 {
    font-weight: 800;
    letter-spacing: .5px;
    background: var(--g1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.logo a{
    text-decoration: none;
}
/* Navigation */
nav {
    justify-self: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: clamp(14px, 3.4vw, 32px);
}

.nav-links a {
    position: relative;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 2px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: var(--g2);
    transition: width .25s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Social icons */
.icons {
    display: flex;
    gap: 14px;
}

.icons a {
    color: var(--muted);
    transition: transform .2s ease, color .2s ease;
}

.icons a:hover {
    transform: translateY(-2px);
    color: #fff;
}

.icons i {
    font-size: 18px;
}

/* Hamburger (mobile) */
.hamburger {
    display: none;
    width: 34px;
    height: 26px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    border-radius: 2px;
    background: #e8ecf5;
    margin: 5px 0;
    transition: transform .25s ease, opacity .25s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero */
.outer {
    display: grid;
    grid-template-columns: 360px 1fr;
    align-items: center;
    gap: clamp(24px, 4vw, 48px);
    padding: 50px 0 80px;
}

.profile-outer {
    display: grid;
    place-items: center;
}

.profile {
    width: min(320px, 70vw);
    aspect-ratio: 1/1;
    border-radius: 50%;
    padding: 8px;
    background: var(--g3);
    box-shadow: var(--shadow);
    transition: .5s;
    cursor: pointer;
}

.profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: saturate(1.1) contrast(1.02);
}

.profile:hover{
    transform: scale(1.1);
    box-shadow: 0 0 30px white;
}

@keyframes glow {
    0% {
       transform: scale(1.1);
    }

    100% {
        transform: scale(1.5);
    }
}

.txt-outer h1 {
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.15;
    font-weight: 800;
}

.txt-outer p {
    margin-top: 14px;
    color: var(--muted);
    font-size: clamp(14px, 1.7vw, 17px);
    max-width: 64ch;
}

.hero-buttons {
    margin-top: 22px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    --pad-x: clamp(16px, 3vw, 22px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px var(--pad-x);
    border-radius: 999px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: #0b0f1a;
    font-weight: 700;
    letter-spacing: .3px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn.primary {
    background: var(--btn-primary);
}

.btn.secondary {
    background: var(--btn-secondary);
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .32);
}

/* Section headings */
.about {
    font-size: clamp(24px, 4.6vw, 36px);
    font-weight: 800;
    background: var(--g2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hr {
    height: 2px;
    border: none;
    background: var(--g1);
    border-radius: 999px;
    opacity: .8;
}

/* About section */
#aboutme {
    padding: 70px 0;
}

.about-text-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

.about-content p+p {
    margin-top: 10px;
}

.skills-list {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.skills-list li {
    list-style: none;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    backdrop-filter: blur(6px);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-content: start;
}

.stat {
    padding: 20px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: var(--shadow);
}

.stat h3 {
    font-size: 30px;
    background: var(--g3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat p {
    color: var(--muted);
}

/* Skills grid */
#mySkills {
    padding: 70px 0;
}

.mySkills-outer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.mySkills-container {
    padding: 22px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .18s ease, border-color .18s ease;
}

.mySkills-container:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, .25);
}

.skill-icon {
    font-size: 34px;
    margin-bottom: 8px;
    background: var(--g1);
    -webkit-background-clip: text;
    color: transparent;
}

.mySkills-container h3 {
    margin: 6px 0;
}

.mySkills-container p {
    color: var(--muted);
    font-size: 14px;
}

/* Training */
#Training {
    padding: 70px 0;
}

.Training-outer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.Training-container {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .03));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.Training-container::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from 180deg, #7c3aed, #06b6d4, #f97316, #ffd83d, #7c3aed);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.Training-icon {
    font-size: 30px;
    margin-bottom: 10px;
    background: var(--g2);
    -webkit-background-clip: text;
    color: transparent;
}

.Training-container h3 {
    opacity: .6;
}

.Training-container h2 {
    margin: 4px 0 8px;
}

.Training-container p {
    color: var(--muted);
}

/* Projects */
#projects {
    padding: 70px 0;
}

.project-outer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.project-container {
    border-radius: 18px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.project-image {
    position: relative;
}

.project-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.project-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: end start;
    gap: 10px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(10, 14, 24, .75) 100%);
    opacity: 0;
    transition: opacity .25s ease;
    color: #eaf1ff;
}

.project-buttons {
    display: flex;
    gap: 10px;
}

.project-buttons .btn {
    padding: 10px 14px;
    font-size: 14px;
    box-shadow: none;
}

.project-image:hover .project-overlay {
    opacity: 1;
}

/* Contact */
#contact {
    padding: 70px 0;
}

.contact-outer {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.contact-left h1 {
    font-size: clamp(22px, 4vw, 32px);
    background: var(--g1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.contact-left p {
    color: var(--muted);
}

.contact-info {
    margin-top: 8px;
    display: grid;
    gap: 8px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e9eefc;
}

.contact-form form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.form-group {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

label {
    font-weight: 600;
    opacity: .8;
}

input,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

input::placeholder,
textarea::placeholder {
    color: #9aa5bd;
}

input:focus,
textarea:focus {
    border-color: rgba(255, 255, 255, .28);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .15);
}

button.btn.primary {
    cursor: pointer;
    border: none;
}

/* Footer */
footer {
    padding: 34px 0;
}

.footer-content {
    border-top: 1px solid var(--border);
    padding-top: 18px;
    color: var(--muted);
    text-align: center;
}

.footer-content p+p {
    margin-top: 6px;
}

/* Utilities */
section {
    position: relative;
}

section::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    background: radial-gradient(600px 200px at 20% 0%, rgba(124, 58, 237, .12), transparent 70%),
        radial-gradient(600px 200px at 80% 0%, rgba(6, 182, 212, .12), transparent 70%);
}

/* Responsive */
@media (max-width: 1024px) {
    .outer {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-text-container {
        grid-template-columns: 1fr;
    }

    .contact-outer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    header {
        grid-template-columns: 1fr auto auto;
    }

    nav {
        justify-self: start;
    }

    .nav-links {
        position: fixed;
        inset: 74px 12px auto 12px;
        border-radius: 14px;
        padding: 14px;
        background: rgba(20, 26, 41, .85);
        backdrop-filter: blur(8px);
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
        display: grid;
        gap: 8px;
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease, transform .2s ease;
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .hamburger {
        display: block;
    }
}

/* Fancy focus outlines for accessibility */
:focus-visible {
    outline: 3px solid #7c3aed;
    outline-offset: 3px;
    border-radius: 8px;
}

/* Smooth fade for images */
img {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .4s ease, transform .4s ease;
}

img[src] {
    opacity: 1;
    transform: translateY(0);
}

/* Micro-interactions */
.mySkills-container i,
.service-icon i,
.skill-icon i,
.icons i {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25));
}

/* Optional: Selection color */
::selection {
    background: rgba(124, 58, 237, .35);
    color: #fff;
}
