/* ================ */
/* CSS Variables */
/* ================ */
:root {
    /* Color Palette */
    --primary-color: #4057d4;
    --primary-hover: #3448b8;
    --secondary-color: #4ECDC4;
    --secondary-hover: #3db8af;
    --dark-color: #292F36;
    --light-color: #F7FFF7;
    --accent-color: #FFE66D;
    --gray-color: #6C757D;
    --light-gray: #F8F9FA;
    --white: #ffffff;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    
    /* Typography */
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-md: 1.125rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-xxl: 2rem;
    --text-xxxl: 3.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ================ */
/* Base Styles */
/* ================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ================ */
/* Header Styles */
/* ================ */
header {
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #292F36;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.logo span {
    color: #4057d4;
    margin-left: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.1rem;
    color: #292F36;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4057d4;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #4057d4;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger .line {
    width: 28px;
    height: 3px;
    background-color: #292F36;
    margin: 5px;
    transition: all 0.3s ease;
}

/* Active state for mobile menu */
.hamburger.active .line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: left 0.3s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hamburger {
        display: block;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0 1.5rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ================ */
/* Typography */
/* ================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--text-xxxl);
    line-height: 1.1;
}

h2 {
    font-size: var(--text-xxl);
}

h3 {
    font-size: var(--text-xl);
}

p {
    margin-bottom: var(--space-lg);
    color: var(--gray-color);
    font-size: var(--text-md);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

/* ================ */
/* Buttons */
/* ================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    gap: var(--space-sm);
    white-space: nowrap;
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn.primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    width: 24px;
    height: 24px;
}

/* ================ */
/* Header & Navigation */
/* ================ */
header {
    padding: var(--space-md) 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(247, 255, 247, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

header.scrolled {
    padding: var(--space-sm) 0;
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding: var(--space-sm) 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: var(--space-sm);
    z-index: 1001;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px;
    transition: all var(--transition-normal);
}

/* ================ */
/* Hero Section */
/* ================ */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 120px 0 var(--space-xxl);
}

.hero-content {
    flex: 1;
    padding-right: var(--space-xxl);
}

.hero-content h1 {
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s ease;
}

.subtitle {
    font-size: var(--text-lg);
    margin-bottom: var(--space-xl);
    color: var(--gray-color);
    max-width: 600px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-image {
    flex: 1;
    position: relative;
    animation: fadeIn 1s ease 0.3s both;
}

.image-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform-style: preserve-3d;
}

.image-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    z-index: 1;
    transition: opacity var(--transition-normal);
}

.image-container:hover::before {
    opacity: 0.2;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

.image-container:hover img {
    transform: scale(1.05) rotate(1deg);
}

/* ================ */
/* Section Styles */
/* ================ */
section {
    padding: var(--space-xxl) 0;
    scroll-margin-top: 80px;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xxl);
}

.section-subtitle {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
    display: inline-block;
    position: relative;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: var(--radius-full);
}

/* ================ */
/* About Section */
/* ================ */
.about-content {
    display: flex;
    gap: var(--space-xxl);
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    position: relative;
}

.image-frame {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.image-frame::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-xl);
    z-index: -1;
    transition: all var(--transition-normal);
}

.image-frame:hover::after {
    top: 15px;
    left: 15px;
    right: -15px;
    bottom: -15px;
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

.image-frame:hover img {
    transform: scale(1.05) rotate(-1deg);
}

.skills {
    margin-top: var(--space-xl);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.skill-tags span {
    background-color: var(--light-gray);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--dark-color);
    transition: all var(--transition-fast);
}

.skill-tags span:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* ================ */
/* Work Section */
/* ================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.project-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-card:hover::before {
    opacity: 1;
}

.project-image {
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: var(--space-lg);
    position: relative;
    z-index: 2;
}

.project-info h3 {
    margin-bottom: var(--space-sm);
    transition: color var(--transition-fast);
}

.project-card:hover .project-info h3 {
    color: var(--white);
}

.project-info p {
    margin-bottom: var(--space-md);
    font-size: var(--text-base);
    transition: color var(--transition-fast);
}

.project-card:hover .project-info p {
    color: rgba(255,255,255,0.8);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.project-tag {
    font-size: var(--text-sm);
    background-color: var(--light-gray);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.project-card:hover .project-tag {
    background-color: rgba(255,255,255,0.2);
    color: var(--white);
}

.project-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: var(--text-base);
    display: inline-flex;
    align-items: center;
    transition: all var(--transition-normal);
}

.project-card:hover .project-link {
    color: var(--white);
}

.project-link::after {
    content: '→';
    margin-left: var(--space-xs);
    transition: transform var(--transition-normal);
}

.project-link:hover::after {
    transform: translateX(5px);
}

.view-more {
    text-align: center;
}

/* ================ */
/* Contact Section */
/* ================ */
.contact-content {
    display: flex;
    gap: var(--space-xxl);
    background-color: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-xxl);
    box-shadow: var(--shadow-lg);
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 1;
}

.contact-details {
    margin: var(--space-xl) 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-md);
    color: var(--primary-color);
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.contact-item:hover .contact-icon {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px) scale(1.1);
}

.form-group {
    margin-bottom: var(--space-lg);
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--text-base);
    transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 87, 212, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-label {
    position: absolute;
    left: var(--space-md);
    top: var(--space-md);
    color: var(--gray-color);
    transition: all var(--transition-normal);
    pointer-events: none;
}

.form-group input:focus + .form-label,
.form-group textarea:focus + .form-label,
.form-group input:not(:placeholder-shown) + .form-label,
.form-group textarea:not(:placeholder-shown) + .form-label {
    transform: translateY(-30px) scale(0.9);
    color: var(--primary-color);
    background-color: var(--white);
    padding: 0 5px;
}

/* ================ */
/* Footer */
/* ================ */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: var(--space-xxl) 0 var(--space-xl);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-links a:hover::after {
    width: 100%;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-sm);
}

/* ================ */
/* Animations */
/* ================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ================ */
/* Utility Classes */
/* ================ */
.text-center {
    text-align: center;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-xxl { margin-top: var(--space-xxl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-xxl { margin-bottom: var(--space-xxl); }

/* ================ */
/* Responsive Design */
/* ================ */
@media (max-width: 1200px) {
    :root {
        --text-xxxl: 3rem;
        --text-xxl: 2.25rem;
    }
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 150px;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: var(--space-xxl);
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
    }

    .contact-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    :root {
        --text-xxxl: 2.5rem;
        --text-xxl: 2rem;
        --text-xl: 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--light-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left var(--transition-normal);
    }

    .nav-links.active {
        left: 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .image-frame::after {
        display: none;
    }
}

@media (max-width: 576px) {
    :root {
        --text-xxxl: 2rem;
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-xxl: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    .contact-content {
        padding: var(--space-lg) var(--space-md);
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-md);
    }
}