@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    color-scheme: dark;
    --bg-color: #030712;
    --card-bg: rgba(9, 9, 11, 0.65);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-border-hover: rgba(167, 139, 250, 0.45);
    --text-primary: #ffffff;
    --text-secondary: #f1f5f9;
    --accent-primary: #a78bfa; /* Violet */
    --accent-secondary: #22d3ee; /* Cyan */
    --gradient-accent: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* GPU-accelerated fixed starry background layer */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: radial-gradient(circle at center, rgba(3, 7, 18, 0) 0%, rgba(3, 7, 18, 0.65) 100%), url('./assets/pexels-kaveh-keshtiara-232855560-13179963.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

/* Animated Background Blur Blobs */
.glow-bg {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
    will-change: transform;
}

.glow-bg-1 {
    width: 450px;
    height: 450px;
    background: var(--accent-primary);
    top: -10%;
    left: -10%;
    animation: floatGlow1 25s infinite alternate ease-in-out;
}

.glow-bg-2 {
    width: 600px;
    height: 600px;
    background: var(--accent-secondary);
    bottom: -10%;
    right: -10%;
    animation: floatGlow2 30s infinite alternate ease-in-out;
}

.glow-bg-3 {
    width: 350px;
    height: 350px;
    background: #ec4899;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: floatGlow3 20s infinite alternate ease-in-out;
}

@keyframes floatGlow1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(150px, 100px) scale(1.25); }
}

@keyframes floatGlow2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, -150px) scale(1.15); }
}

@keyframes floatGlow3 {
    0% { transform: translate(-50%, -50%) translate(0, 0); }
    100% { transform: translate(-50%, -50%) translate(-80px, 80px); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    transition: var(--transition-smooth);
    position: relative;
    padding: 0.5rem 0;
}

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

nav a:hover {
    color: var(--text-primary);
}

nav a:hover::after {
    width: 100%;
}

/* Base Sections */
section {
    padding: 10rem 2rem 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section p {
    font-weight: 500;
    color: var(--text-secondary);
}

section h1.section-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 3.5rem;
    text-align: center;
    position: relative;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    width: fit-content;
    margin: 0 auto 3.5rem auto;
}

section h1.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    margin: 0.75rem auto 0 auto;
    border-radius: 2px;
}

/* Hero / Header Section */
.hero-section {
    min-height: 95vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 4rem;
    padding-top: 8rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.25);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 2rem;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.1);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #10b981;
    border-radius: 50%;
    top: 0;
    left: 0;
    animation: pulseGlow 1.5s infinite ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.hero-headline {
    font-family: var(--font-heading);
    font-size: 3.75rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.highlight-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.cta-button {
    display: inline-block;
    padding: 0.9rem 2.25rem;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.primary-btn {
    background: var(--gradient-accent);
    color: #030712;
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.25);
    border: none;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(34, 211, 238, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(167, 139, 250, 0.15);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar {
    width: 200px;
    height: 200px;
    border-radius: 24%;
    object-fit: cover;
    z-index: 10;
    border: 3px solid transparent;
    background-image: var(--gradient-accent);
    background-origin: border-box;
    background-clip: content-box, border-box;
    box-shadow: 0 0 40px rgba(167, 139, 250, 0.2);
    transition: var(--transition-smooth);
}

.avatar-wrapper:hover .hero-avatar {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.4);
}

.glowing-ring {
    position: absolute;
    border-radius: 30%;
    border: 2px dashed rgba(34, 211, 238, 0.2);
    pointer-events: none;
    z-index: 1;
}

.ring-1 {
    width: 240px;
    height: 240px;
    animation: rotateRing 20s infinite linear;
}

.ring-2 {
    width: 255px;
    height: 255px;
    border-color: rgba(167, 139, 250, 0.15);
    border-style: double;
    animation: rotateRingBack 25s infinite linear;
}

@keyframes rotateRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateRingBack {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

/* About Section Grid & Skills */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.about-info h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.about-info p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-skills {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    text-align: left;
}

.about-skills h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.skills-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.skill-chip {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.skill-chip svg {
    color: var(--accent-secondary);
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.skill-chip:hover {
    background: rgba(167, 139, 250, 0.05);
    border-color: var(--card-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(167, 139, 250, 0.2);
    color: var(--accent-primary);
}

.skill-chip:hover svg {
    color: var(--accent-primary);
    transform: scale(1.15) rotate(8deg);
}

/* Projects Section */
.project-section {
    padding-bottom: 4rem;
}

.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.project {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.project:hover {
    transform: translateY(-10px);
    border-color: var(--card-border-hover);
    box-shadow: 0 16px 40px rgba(167, 139, 250, 0.15);
}

.project-img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--card-border);
}

.project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.project:hover .project-img-wrapper img {
    transform: scale(1.06);
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.tag {
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.2);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
}

.project h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    margin-top: auto;
    width: fit-content;
}

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

.project-link svg {
    margin-left: 0.35rem;
    transition: var(--transition-smooth);
}

.project-link:hover svg {
    transform: translateX(5px);
}

/* Contact Section & Form */
.contact-section {
    text-align: center;
    padding-bottom: 10rem;
}

.contact-container-form {
    max-width: 620px;
    margin: 2rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.3);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: left;
}

.form-group label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    background: rgba(9, 9, 11, 0.75);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.25);
    background: rgba(3, 7, 18, 0.9);
}

.form-group textarea {
    resize: vertical;
}

.contact-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    background: var(--gradient-accent);
    color: #030712;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.3);
    align-self: center;
    width: fit-content;
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 211, 238, 0.5);
}

.form-status {
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    min-height: 24px;
    transition: var(--transition-smooth);
}

.form-status.success {
    color: #34d399;
}

.form-status.error {
    color: #f87171;
}

.contact-links {
    margin-top: 2.5rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.contact-links a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.03);
    border: 1px solid rgba(34, 211, 238, 0.15);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.05);
}

.contact-links a:hover {
    color: var(--accent-primary);
    background: rgba(167, 139, 250, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 0 25px rgba(167, 139, 250, 0.35);
    transform: translateY(-5px);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        padding-top: 7rem;
    }
    
    .hero-content {
        align-items: center;
        text-align: center;
    }
    
    .hero-desc {
        margin: 0 auto 2.5rem auto;
    }
    
    .hero-headline {
        font-size: 3rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 7rem 1.5rem 5rem 1.5rem;
    }
    
    .hero-headline {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .cta-button {
        width: 100%;
        text-align: center;
    }
    
    nav ul {
        gap: 1.25rem;
    }
    
    section h1.section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
}
