/* General Styles & Advanced Variables */
:root {
    --primary-color: #0f172a;
    --secondary-color: #64748b;
    --accent-color: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-main: #1e293b;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

body {
    font-family: var(--font-main);
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0, transparent 50%), 
        radial-gradient(at 50% 0%, rgba(37, 99, 235, 0.05) 0, transparent 50%);
    overflow-x: hidden;
}

/* Typography Enhancements */
h1, h2, h3, h4 {
    color: var(--primary-color);
    letter-spacing: -0.025em;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Glassmorphism Nav */
header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

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

.logo {
    font-size: 1.75rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

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

.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
    position: relative;
    transition: var(--transition);
}

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

/* Advanced Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    text-align: left;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2rem;
}

.hero-content h1 span {
    display: block;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    max-width: 650px;
}

/* Advanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-color);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgb(59 130 246 / 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Portfolio Cards with Glassmorphism */
.section-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 6px;
    background: var(--accent-gradient);
    margin: 1rem auto 0;
    border-radius: 3px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

#featured-work .portfolio-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portfolio-item {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}

.portfolio-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
}

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

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.1);
}

.portfolio-info {
    padding: 2.5rem;
}

.portfolio-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.section-cta {
    margin-top: 3.5rem;
}

.section-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.25rem 2.5rem;
    border-radius: 28px;
    background:
        radial-gradient(800px 200px at 20% 0%, rgba(59, 130, 246, 0.12), transparent 60%),
        radial-gradient(800px 200px at 80% 100%, rgba(37, 99, 235, 0.10), transparent 60%),
        rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.section-cta-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.10);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.section-cta-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1.2;
}

.section-cta-sub {
    margin-top: 0.6rem;
    font-size: 1.05rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.section-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.35rem;
    border-radius: 16px;
    background: var(--accent-gradient);
    color: var(--white);
    font-weight: 800;
    box-shadow: 0 18px 30px -18px rgba(37, 99, 235, 0.65);
    transition: var(--transition);
    white-space: nowrap;
}

.section-cta-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px -18px rgba(37, 99, 235, 0.75);
}

.section-cta-arrow {
    display: inline-block;
    transition: var(--transition);
}

.section-cta-btn:hover .section-cta-arrow {
    transform: translateX(6px);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-overlay.is-open {
    display: flex;
}

.modal {
    width: min(1000px, 100%);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
}

.modal-media {
    background: #0b1220;
    position: relative;
    min-height: 420px;
}

.modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.10);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    width: fit-content;
}

.modal-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
    color: var(--primary-color);
}

.modal-subtitle {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.modal-desc {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.modal-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 1.25rem;
    border-radius: 18px;
    background: rgba(241, 245, 249, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.modal-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
}

.modal-meta-row span:first-child {
    color: var(--secondary-color);
    font-weight: 700;
}

.modal-meta-row span:last-child {
    color: var(--primary-color);
    font-weight: 900;
    text-align: right;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.modal-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.10);
    color: var(--primary-color);
    border: 1px solid rgba(59, 130, 246, 0.18);
    font-weight: 800;
    font-size: 0.85rem;
}

.modal-actions {
    margin-top: auto;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.modal-close {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.35);
}

@media (max-width: 900px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
    .modal-media {
        min-height: 260px;
    }
    .modal-body {
        padding: 2rem;
    }
}

/* Services Section Styling */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 4rem 3rem;
    border-radius: 32px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.service-card:hover {
    background: var(--white);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    background: var(--bg-color);
    width: 100px;
    height: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: rotate(10deg);
    background: #eff6ff;
}

/* About Section Enhancements */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-img {
    position: relative;
}

.about-img::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 4px solid var(--accent-color);
    border-radius: 24px;
    z-index: -1;
}

.about-img img {
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.skill-tag {
    display: inline-block;
    background: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    font-weight: 700;
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
}

/* Footer Advanced */
footer {
    padding: 6rem 0;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

footer p {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    .hero-content {
        text-align: center;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .nav-links {
        display: none;
    }
}

@media (max-width: 1024px) {
    #featured-work .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    #featured-work .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
    }
    .section-cta-btn {
        width: 100%;
        justify-content: center;
    }
}
