/* ==========================================================
   SAJAD BIDRAM — PERSONAL PORTFOLIO
   Modern Dark / Glassmorphism / SaaS UI
========================================================== */

/* ==========================================================
   01. ROOT
========================================================== */

:root {
    --bg: #030712;
    --bg-soft: #0b1120;
    --surface: rgba(255, 255, 255, 0.045);
    --surface-hover: rgba(255, 255, 255, 0.075);

    --border: rgba(255, 255, 255, 0.09);
    --border-hover: rgba(255, 255, 255, 0.18);

    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;

    --success: #10b981;
    --danger: #ef4444;

    --text: #ffffff;
    --text-soft: #e2e8f0;
    --muted: #94a3b8;

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;

    --container: 1180px;

    --shadow:
        0 20px 60px rgba(0, 0, 0, 0.3);

    --shadow-primary:
        0 20px 60px rgba(99, 102, 241, 0.22);

    --transition:
        0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}


/* ==========================================================
   02. RESET
========================================================== */

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

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

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(99, 102, 241, 0.12),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(6, 182, 212, 0.10),
            transparent 30%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        "Vazirmatn",
        Tahoma,
        Arial,
        sans-serif;

    line-height: 1.8;

    overflow-x: hidden;

    position: relative;
}

body::before {
    content: "";

    position: fixed;

    width: 600px;
    height: 600px;

    top: -300px;
    left: -300px;

    border-radius: 50%;

    background: var(--primary);

    opacity: 0.12;

    filter: blur(180px);

    pointer-events: none;

    z-index: -2;

    animation: floatGlow 12s ease-in-out infinite alternate;
}

body::after {
    content: "";

    position: fixed;

    width: 600px;
    height: 600px;

    right: -300px;
    bottom: -300px;

    border-radius: 50%;

    background: var(--secondary);

    opacity: 0.10;

    filter: blur(180px);

    pointer-events: none;

    z-index: -2;

    animation: floatGlow 15s ease-in-out infinite alternate-reverse;
}


/* ==========================================================
   03. BASIC ELEMENTS
========================================================== */

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

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
}

::selection {
    background: var(--primary);
    color: #fff;
}


/* ==========================================================
   04. SCROLLBAR
========================================================== */

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

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        var(--primary),
        var(--secondary)
    );

    border-radius: 50px;
}

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


/* ==========================================================
   05. TYPOGRAPHY
========================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text);
    line-height: 1.3;
}

h1 {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 900;
    letter-spacing: -1.5px;
}

h2 {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
}

h3 {
    font-size: 22px;
    font-weight: 700;
}

p {
    color: var(--muted);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    margin-bottom: 12px;
}

.section-title p {
    max-width: 650px;
    margin: 0 auto;
}


/* ==========================================================
   06. CONTAINER
========================================================== */

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


/* ==========================================================
   07. APP
========================================================== */

#app {
    min-height: 100vh;
}


/* ==========================================================
   08. SECTION
========================================================== */

section {
    position: relative;
    padding: 110px 0;
}

section::before {
    content: "";

    position: absolute;

    width: 1px;
    height: 100px;

    left: 50%;
    top: 0;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(255,255,255,0.08),
            transparent
        );

    opacity: 0.5;
}


/* ==========================================================
   09. NAVBAR
========================================================== */

.navbar {
    position: fixed;

    top: 22px;
    left: 50%;

    transform: translateX(-50%);

    width: min(1080px, 92%);

    min-height: 64px;

    padding: 10px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(3, 7, 18, 0.65);

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

    border-radius: 50px;

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

    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.22);

    z-index: 1000;
}

.logo {
    font-size: 20px;
    font-weight: 900;

    background:
        linear-gradient(
            135deg,
            #fff,
            #94a3b8
        );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    color: var(--muted);

    padding: 8px 14px;

    border-radius: 12px;

    font-size: 14px;

    transition: var(--transition);
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}


/* ==========================================================
   10. HERO
========================================================== */

.hero {
    min-height: 100vh;

    display: flex;
    align-items: center;

    padding-top: 150px;
}

.hero-content {
    display: grid;

    grid-template-columns: 300px minmax(0, 1fr);

    gap: 80px;

    align-items: center;
}

.hero-left {
    display: flex;
    justify-content: center;
}

.profile-image,
.profile-placeholder {
    width: 270px;
    height: 270px;

    border-radius: 50%;
}

.profile-image {
    object-fit: cover;

    border: 5px solid rgba(255,255,255,0.12);

    box-shadow:
        0 0 0 10px rgba(255,255,255,0.025),
        0 0 90px rgba(99,102,241,0.25);

    transition: var(--transition);
}

.profile-image:hover {
    transform: scale(1.04);

    box-shadow:
        0 0 0 10px rgba(255,255,255,0.04),
        0 0 110px rgba(99,102,241,0.35);
}

.profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 90px;
    font-weight: 900;

    background:
        linear-gradient(
            135deg,
            var(--primary-dark),
            var(--secondary)
        );

    box-shadow:
        0 0 80px rgba(99,102,241,0.25);
}

.hero-badge {
    display: inline-flex;

    align-items: center;

    padding: 8px 16px;

    margin-bottom: 22px;

    border-radius: 50px;

    color: var(--text-soft);

    font-size: 14px;

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

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

    backdrop-filter: blur(12px);
}

.hero h1 {
    margin-bottom: 15px;
}

.hero h2 {
    color: transparent;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );

    -webkit-background-clip: text;
    background-clip: text;

    margin-bottom: 22px;
}

.hero p {
    max-width: 720px;

    color: var(--muted);

    font-size: 17px;

    margin-bottom: 34px;
}

.hero-buttons {
    display: flex;

    align-items: center;

    gap: 14px;

    flex-wrap: wrap;
}


/* ==========================================================
   11. BUTTONS
========================================================== */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 52px;

    padding: 0 25px;

    border-radius: 14px;

    font-size: 14px;

    font-weight: 700;

    border: 1px solid transparent;

    transition: var(--transition);

    cursor: pointer;
}

.btn-primary {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--primary-dark),
            var(--secondary)
        );

    box-shadow:
        0 15px 35px rgba(79,70,229,0.25);
}

.btn-primary:hover {
    transform: translateY(-4px);

    box-shadow:
        0 20px 45px rgba(79,70,229,0.38);
}

.btn-outline {
    color: var(--text-soft);

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

    border-color: var(--border);
}

.btn-outline:hover {
    color: #fff;

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

    border-color: var(--border-hover);

    transform: translateY(-4px);
}


/* ==========================================================
   12. SKILLS
========================================================== */

.skills-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 24px;
}

.skill-card {
    position: relative;

    padding: 30px;

    border-radius: var(--radius);

    background: var(--surface);

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

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

    overflow: hidden;

    transition: var(--transition);
}

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

    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 3px;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );

    transform: scaleX(0);

    transform-origin: left;

    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-8px);

    background: var(--surface-hover);

    border-color: var(--border-hover);

    box-shadow: var(--shadow);
}

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

.skill-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 22px;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(99,102,241,0.18),
            rgba(6,182,212,0.12)
        );

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

.skill-icon svg {
    width: 30px;
    height: 30px;

    fill: var(--secondary);
}

.skill-card h3 {
    margin-bottom: 8px;
}

.skill-card p {
    font-size: 14px;

    margin-bottom: 20px;
}

.skill-progress {
    height: 6px;

    width: 100%;

    overflow: hidden;

    border-radius: 50px;

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

.skill-progress span {
    display: block;

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );
}


/* ==========================================================
   13. PROJECTS
========================================================== */

.projects-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(320px, 1fr));

    gap: 28px;
}

.project-card {
    overflow: hidden;

    border-radius: var(--radius-lg);

    background: var(--surface);

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

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

    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);

    border-color: var(--border-hover);

    box-shadow: var(--shadow);
}

.project-image {
    position: relative;

    height: 230px;

    overflow: hidden;

    background: #0f172a;
}

.project-image::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(3,7,18,0.45),
            transparent 50%
        );

    pointer-events: none;
}

.project-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.7s cubic-bezier(0.2,0.8,0.2,1);
}

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

.project-body {
    padding: 28px;
}

.project-body h3 {
    margin-bottom: 10px;
}

.project-body p {
    font-size: 14px;

    margin-bottom: 20px;
}

.project-tech {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 22px;
}

.project-tech span {
    padding: 6px 12px;

    border-radius: 50px;

    font-size: 12px;

    color: var(--text-soft);

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

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

.project-links {
    display: flex;

    gap: 10px;
}

.project-links a {
    flex: 1;

    text-align: center;

    padding: 10px 14px;

    border-radius: 11px;

    font-size: 13px;

    font-weight: 700;

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

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

    transition: var(--transition);
}

.project-links a:hover {
    background: var(--primary);

    border-color: var(--primary);

    transform: translateY(-2px);
}


/* ==========================================================
   14. CONTACT
========================================================== */

.contact {
    padding-bottom: 120px;
}

.contact-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 22px;
}

.contact-card {
    position: relative;

    display: block;

    padding: 30px;

    text-align: center;

    border-radius: var(--radius);

    background: var(--surface);

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

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

    transition: var(--transition);

    overflow: hidden;
}

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

    position: absolute;

    width: 150px;
    height: 150px;

    top: -100px;
    right: -100px;

    border-radius: 50%;

    background: var(--primary);

    opacity: 0;

    filter: blur(50px);

    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-8px);

    border-color: var(--border-hover);

    box-shadow: var(--shadow);
}

.contact-card:hover::before {
    opacity: 0.18;
}

.contact-card .icon,
.contact-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 18px;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            var(--primary-dark),
            var(--secondary)
        );

    font-size: 26px;

    box-shadow:
        0 10px 30px rgba(79,70,229,0.2);
}

.contact-icon svg {
    width: 28px;
    height: 28px;

    fill: #fff;
}

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

.contact-card span {
    display: block;

    color: var(--muted);

    font-size: 13px;

    word-break: break-word;
}


/* ==========================================================
   15. FOOTER
========================================================== */

footer {
    position: relative;

    padding: 45px 0;

    text-align: center;

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

    background: rgba(0,0,0,0.12);
}

footer p {
    color: var(--muted);

    font-size: 13px;
}


/* ==========================================================
   16. GLASS
========================================================== */

.glass {
    background: rgba(255,255,255,0.045);

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

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

    box-shadow: var(--shadow);
}

.glass-panel {
    padding: 30px;

    border-radius: var(--radius);

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

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

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}


/* ==========================================================
   17. DIVIDER
========================================================== */

.section-divider {
    width: 90px;
    height: 4px;

    margin: 20px auto 50px;

    border-radius: 50px;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );
}


/* ==========================================================
   18. ANIMATIONS
========================================================== */

@keyframes floatGlow {

    0% {
        transform: translate3d(0,0,0) scale(1);
    }

    100% {
        transform: translate3d(60px,40px,0) scale(1.15);
    }
}

@keyframes fadeUp {

    from {
        opacity: 0;

        transform: translateY(35px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }
}

@keyframes fadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.fade-up {
    opacity: 0;

    transform: translateY(35px);

    animation:
        fadeUp 0.9s ease forwards;
}

.fade-up.active {
    opacity: 1;

    transform: translateY(0);
}

.reveal {
    opacity: 0;

    transform: translateY(45px);

    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.reveal.active {
    opacity: 1;

    transform: translateY(0);
}


/* ==========================================================
   19. UTILITIES
========================================================== */

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.mt-1 {
    margin-top: 15px;
}

.mt-2 {
    margin-top: 30px;
}

.mt-3 {
    margin-top: 45px;
}

.mb-1 {
    margin-bottom: 15px;
}

.mb-2 {
    margin-bottom: 30px;
}

.mb-3 {
    margin-bottom: 45px;
}

.rounded {
    border-radius: var(--radius);
}

.shadow {
    box-shadow: var(--shadow);
}

.hover-up {
    transition: var(--transition);
}

.hover-up:hover {
    transform: translateY(-8px);
}

.hover-scale {
    transition: var(--transition);
}

.hover-scale:hover {
    transform: scale(1.03);
}


/* ==========================================================
   20. RESPONSIVE — TABLET
========================================================== */

@media (max-width: 1000px) {

    .hero-content {
        grid-template-columns: 230px minmax(0, 1fr);

        gap: 45px;
    }

    .profile-image,
    .profile-placeholder {
        width: 220px;
        height: 220px;
    }

    .profile-placeholder {
        font-size: 70px;
    }

    .hero p {
        font-size: 16px;
    }

    section {
        padding: 90px 0;
    }
}


/* ==========================================================
   21. RESPONSIVE — MOBILE
========================================================== */

@media (max-width: 760px) {

    .navbar {
        top: 12px;

        width: 94%;

        padding: 10px 16px;
    }

    .logo {
        font-size: 18px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        min-height: auto;

        padding-top: 150px;

        padding-bottom: 80px;
    }

    .hero-content {
        grid-template-columns: 1fr;

        gap: 40px;

        text-align: center;
    }

    .hero-left {
        order: 1;
    }

    .hero-right {
        order: 2;
    }

    .profile-image,
    .profile-placeholder {
        width: 210px;
        height: 210px;
    }

    .profile-placeholder {
        font-size: 65px;
    }

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

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

    .hero p {
        margin-inline: auto;

        font-size: 15px;
    }

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

    .btn {
        min-height: 48px;

        padding-inline: 20px;
    }

    section {
        padding: 75px 0;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .section-title h2 {
        font-size: 32px;
    }

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

    .project-image {
        height: 210px;
    }
}


/* ==========================================================
   22. RESPONSIVE — SMALL MOBILE
========================================================== */

@media (max-width: 430px) {

    .container {
        width: 90%;
    }

    .hero {
        padding-top: 130px;
    }

    .profile-image,
    .profile-placeholder {
        width: 180px;
        height: 180px;
    }

    .profile-placeholder {
        font-size: 55px;
    }

    .hero h1 {
        font-size: 34px;

        letter-spacing: -0.8px;
    }

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

    .hero p {
        font-size: 14px;
    }

    .hero-buttons {
        flex-direction: column;

        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .skill-card,
    .contact-card {
        padding: 25px;
    }

    .project-body {
        padding: 22px;
    }
}


/* ==========================================================
   23. REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}
