/* ==================================
   CSS Variables & Resets
   ================================== */
:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --surface-color-solid: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Font */
    --font-main: 'Inter', sans-serif;
    
    /* Effects */
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ==================================
   Background Elements
   ================================== */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: rgba(59, 130, 246, 0.3);
    top: -200px;
    left: -200px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: rgba(139, 92, 246, 0.3);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 50px) scale(1.1); }
    100% { transform: translate(-30px, 30px) scale(0.9); }
}

/* ==================================
   Typography & Utilities
   ================================== */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

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

section {
    padding: 6rem 10%;
    position: relative;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.primary-btn {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.secondary-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-small:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-small.outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-small.outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* ==================================
   Navigation
   ================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 10%;
}

header.scrolled {
    padding: 1rem 10%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

.nav-links li a {
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

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

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

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* ==================================
   Hero Section
   ================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 100px;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.greeting {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.name {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title {
    font-size: 2.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.typing-text {
    color: var(--text-primary);
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--accent-primary);
    animation: blink 1s infinite;
}

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

.description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

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

.image-wrapper {
    position: relative;
    width: 350px;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 3px;
    background: var(--accent-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 1;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    transition: var(--transition);
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

/* ==================================
   About Section
   ================================== */
.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.about-text {
    flex: 2;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.about-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: var(--shadow-glow);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--accent-primary);
    font-weight: 500;
}

/* ==================================
   Skills Section
   ================================== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.html-color { color: #e34f26; }
.css-color { color: #264de4; }
.js-color { color: #f7df1e; }
.react-color { color: #61dafb; }
.git-color { color: #f05032; }
.responsive-color { color: #a8b2d1; }

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================================
   Projects Section
   ================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    border-color: rgba(99, 102, 241, 0.3);
}

.project-img {
    height: 220px;
    overflow: hidden;
}

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

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

.project-info {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

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

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-stack span {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.project-links {
    display: flex;
    gap: 1rem;
}

/* ==================================
   Contact Section
   ================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-item h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.contact-item p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    transform: translateY(-3px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
    font-size: 1.1rem;
    padding: 1rem;
}

/* ==================================
   Footer
   ================================== */
footer {
    padding: 2rem 10%;
    text-align: center;
    border-top: 1px solid var(--border-color);
    position: relative;
    background: rgba(15, 23, 42, 0.8);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.scroll-top {
    position: absolute;
    right: 10%;
    top: -20px;
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--bg-color);
}

.scroll-top:hover {
    transform: translateY(-5px);
}

/* ==================================
   Responsive
   ================================== */
@media (max-width: 1024px) {
    section { padding: 5rem 5%; }
    header, header.scrolled { padding-left: 5%; padding-right: 5%; }
    
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .description {
        text-align: center;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-stats {
        flex-direction: row;
        width: 100%;
    }
    
    .stat-item { flex: 1; }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .name { font-size: 3rem; }
    .title { font-size: 1.8rem; }
    
    .hamburger { display: block; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #0f172a;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s ease;
        border-left: 1px solid var(--border-color);
    }
    
    .nav-links.active { right: 0; }
    
    .nav-links li { margin: 1.5rem 0; }
    
    .nav-links li a { font-size: 1.2rem; }
    
    .image-wrapper {
        width: 300px;
        height: 300px;
    }
}
