:root {
    /* Primary Colors */
    --primary: #8753d9;
    --primary-light: #a37ee6;
    --primary-dark: #6a3ab1;

    /* Neutral Palette (Light Mode) */
    --bg: #ffffff;
    --fg: #1a1a1a;
    --fg-muted: #666666;
    --border: #eeeeee;
    --surface: #fafafa;
    --nav-bg: rgba(255, 255, 255, 0.8);

    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Spacing */
    --section-padding: 8rem 2rem;
    --container-width: 1200px;

    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --bg: #0a0a0a;
    --fg: #f5f5f5;
    --fg-muted: #a0a0a0;
    --border: #222222;
    --surface: #121212;
    --nav-bg: rgba(10, 10, 10, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    /* High quality photo enhancement */
    image-rendering: -webkit-optimize-contrast;
    filter: contrast(1.02) saturate(1.05);
    transition: var(--transition);
}

/* Direct Contact Grid */
.direct-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.contact-card:hover {
    transform: translateY(-5px);
    background: var(--bg-hover, #f8f8f8);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .contact-card:hover {
    background: #1a1a1a;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-light, rgba(135, 83, 217, 0.1));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.contact-icon i {
    width: 24px;
    height: 24px;
}

.contact-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.contact-info span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

[data-theme="dark"] img {
    filter: contrast(1.05) saturate(1.1) brightness(0.9);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Utilities */
.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--fg-muted);
}

.text-center {
    text-align: center;
}

/* Section Base */
section {
    padding: var(--section-padding);
}

/* Button Component */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(135, 83, 217, 0.2);
}

.btn-outline {
    border-color: var(--border);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].active {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--fg);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero-content {
    max-width: 800px;
}

.hero-tag {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--fg-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.project-card {
    display: block;
}

.project-image {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.project-category {
    color: var(--fg-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Portfolio Hover Details */
.view-project-label {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .view-project-label {
    transform: translateY(0);
    opacity: 1;
}

/* About Section */
.about-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--fg-muted);
    margin-bottom: 1.5rem;
}

/* Contact */
.contact-section {
    background: var(--surface);
}

.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: white;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(135, 83, 217, 0.1);
}

.form-group textarea {
    min-height: 150px;
}

.direct-contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--fg);
}

.contact-link:hover {
    color: var(--primary);
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-logo {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: block;
}

.copyright {
    color: var(--fg-muted);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: var(--transition);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .theme-toggle {
        margin-top: 1rem;
    }

    .hero {
        padding-top: 60px;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero p {
        margin-inline: auto;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-info h3 {
        font-size: 1.5rem;
    }

    .about-split {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .about-text h2 {
        font-size: 2.5rem;
    }

    section {
        padding: 5rem 1.5rem;
    }

    .contact-header h2 {
        font-size: 2.5rem;
    }

    .direct-contact {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.75rem;
    }

    .section-padding {
        padding: 4rem 1.25rem;
    }
}