/* ============================================
   MIDNIGHT PURPLE THEME - Arya Mortazavi
   ============================================ */

/* ========== VARIABLES ========== */
:root {
    --bg-dark:        #0d0b1e;
    --bg-mid:         #14112e;
    --glass-bg:       rgba(255, 255, 255, 0.04);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border:   rgba(255, 255, 255, 0.08);
    --text-main:      #f0eeff;
    --text-muted:     #8b87aa;
    --accent:         #9d4edd;
    --accent-light:   #c77dff;
    --accent-glow:    rgba(157, 78, 221, 0.35);
    --accent-soft:    rgba(157, 78, 221, 0.12);
    --font-heading:   'Space Grotesk', sans-serif;
    --font-body:      'Inter', sans-serif;
    --radius:         12px;
    --transition:     0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(90, 40, 160, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(60, 20, 120, 0.2) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

ul { list-style: none; }

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

strong { color: var(--text-main); }

/* ========== LAYOUT ========== */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 7rem 0;
}

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

/* ========== TYPOGRAPHY ========== */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

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

/* ========== GLASSMORPHISM CARD ========== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(157, 78, 221, 0.4);
    box-shadow: 0 8px 40px rgba(157, 78, 221, 0.15);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.3px;
}

.btn-primary {
    background: transparent;
    border: 1px solid var(--accent-light);
    color: var(--accent-light);
}

.btn-primary:hover {
    background: var(--accent-soft);
    box-shadow: 0 0 20px var(--accent-glow);
    color: #fff;
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-muted);
    margin-left: 1rem;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.5);
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-light);
    font-size: 0.9rem;
    font-family: var(--font-heading);
    font-weight: 500;
    border: 1px solid rgba(199, 125, 255, 0.3);
    padding: 0.45rem 1rem;
    border-radius: 5px;
    transition: all var(--transition);
}

.link-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent-light);
}

/* ========== NAVIGATION ========== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(13, 11, 30, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.9rem 0;
    transition: background var(--transition);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1px;
}

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

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-light);
    transition: width var(--transition);
}

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

.nav-links a:hover::after { width: 100%; }

.menu-toggle {
    display: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-main);
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-text {
    max-width: 680px;
}

.greeting {
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    opacity: 0;
    animation: fadeSlideUp 0.7s ease 0.2s forwards;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1.2rem;
    opacity: 0;
    animation: fadeSlideUp 0.7s ease 0.4s forwards;
}

.typewriter-wrap {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    min-height: 2.2rem;
    opacity: 0;
    animation: fadeSlideUp 0.7s ease 0.6s forwards;
}

.typing::after {
    content: '|';
    color: var(--accent-light);
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeSlideUp 0.7s ease 0.8s forwards;
}

.hero-btns {
    opacity: 0;
    animation: fadeSlideUp 0.7s ease 1s forwards;
}

/* Hero Orbs */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
}

.orb-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.5), transparent 70%);
    top: 5%;
    right: 5%;
    animation: floatOrb 8s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(67, 20, 160, 0.45), transparent 70%);
    bottom: 15%;
    right: 35%;
    animation: floatOrb 11s ease-in-out infinite reverse;
}

@keyframes floatOrb {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-40px) scale(1.05); }
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== PROJECTS ========== */

/* --- Featured --- */
.featured-project {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: center;
}

.featured-reverse {
    direction: rtl;
}

.featured-reverse > * {
    direction: ltr;
}

.featured-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 0.6rem;
}

.featured-content h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    letter-spacing: -0.5px;
}

.featured-content p {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.featured-visual .img-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.featured-visual .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.placeholder-icon {
    color: rgba(157, 78, 221, 0.25);
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.4rem;
}

.folder-icon {
    font-size: 2rem;
    color: var(--accent-light);
}

.card-links {
    display: flex;
    gap: 0.8rem;
}

.card-links a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color var(--transition);
}

.card-links a:hover { color: var(--accent-light); }

.project-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 1.4rem;
    line-height: 1.7;
}

/* ========== TECH LIST ========== */
.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tech-list li {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-light);
    background: var(--accent-soft);
    border: 1px solid rgba(199, 125, 255, 0.2);
    padding: 0.25rem 0.7rem;
    border-radius: 99px;
    letter-spacing: 0.3px;
}

/* ========== ABOUT ========== */
.about-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    align-items: start;
}

.about-text h2 {
    font-family: var(--font-heading);
}

.about-text p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.85;
}

.about-text strong {
    color: var(--text-main);
}

.skills-area h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

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

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: var(--font-heading);
    font-weight: 500;
    transition: color var(--transition);
}

.skill-item:hover { color: var(--text-main); }

.skill-item i {
    color: var(--accent-light);
    font-size: 1.1rem;
    width: 1.3rem;
    text-align: center;
}

/* ========== CONTACT ========== */
.contact-section {
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--glass-border));
}

.contact-sub {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 450px;
    margin: 0 auto 3rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 1.3rem;
    background: var(--glass-bg);
    transition: all var(--transition);
}

.social-links a:hover {
    color: var(--accent-light);
    border-color: rgba(199, 125, 255, 0.5);
    background: var(--accent-soft);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(157, 78, 221, 0.2);
}

/* ========== FOOTER ========== */
footer {
    padding: 2.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--glass-border);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

/* ========== SCROLL ANIMATIONS ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(13, 11, 30, 0.98);
        flex-direction: column;
        gap: 0;
        padding: 0;
        border-bottom: 1px solid var(--glass-border);
    }

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

    .nav-links li a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links a::after { display: none; }

    .menu-toggle { display: block; }

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

    .typewriter-wrap { font-size: 1.1rem; }

    .btn-outline { margin-left: 0.5rem; }

    .featured-project {
        grid-template-columns: 1fr;
    }

    .featured-visual { display: none; }

    .orb-1 { width: 250px; height: 250px; opacity: 0.6; }
    .orb-2 { display: none; }
}

@media (max-width: 480px) {
    .container { padding: 0 1.2rem; }
    .section { padding: 5rem 0; }
    .hero h1 { font-size: 2rem; }
    .hero-btns { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.8rem; }
    .hero-btns .btn { margin-left: 0 !important; }
    .hero-btns .btn-outline { margin-left: 0; }
}
