/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;700;800&display=swap');

@font-face {
    font-family: 'Avenger';
    src: url('../fonts/avenger_italic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ... existing root ... */

.logo {
    font-family: 'Avenger', sans-serif;
    font-size: 2rem;
    /* Larger for impact */
    font-weight: normal;
    letter-spacing: 0.05em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

:root {
    /* --- Brand Color System --- */
    --brand-primary: #10B981;
    --brand-primary-glow: rgba(16, 185, 129, 0.5);
    --brand-gradient: linear-gradient(135deg, #10B981 0%, #3B82F6 100%);

    /* --- Light Theme (Clean & Airy) --- */
    --bg-body: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-glass: rgba(255, 255, 255, 0.7);
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border-light: rgba(148, 163, 184, 0.2);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --glow-card: 0 0 0 1px rgba(16, 185, 129, 0);

    /* Variables */
    --nav-height: 80px;
}

[data-theme="dark"] {
    /* --- Dark Theme (Premium Tech) --- */
    --bg-body: #020617;
    /* Slate 950 */
    --bg-surface: #0F172A;
    --bg-surface-glass: rgba(15, 23, 42, 0.7);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border-light: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    --glow-card: 0 0 20px -5px rgba(16, 185, 129, 0.15);
}

/* Elevate gradient visibility in Dark Mode */
[data-theme="dark"] body {
    background-image:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
}

/* --- Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;

    /* Tricolor Gradient Mesh */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 25%),
        /* Purple */
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 25%),
        /* Emerald */
        radial-gradient(circle at 50% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 25%);
    /* Blue */
    background-attachment: fixed;
}

/* --- Base --- */

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* --- Layout --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

.section-padding {
    padding: 120px 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    align-items: center;
}

/* --- Typography --- */
.display-text {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    background-clip: text;
    /* Ensuring standard property is present */
    /* color: transparent; fallback logic needed if bg-clip fails, but for now simple color */
}

@media (max-width: 768px) {
    .display-text {
        font-size: 3rem;
    }
}

.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
    margin-bottom: 40px;
}

/* --- Components --- */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 36px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-surface);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-primary {
    background: var(--brand-gradient);
    color: white;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    border: 1px solid var(--border-light);
    color: var(--text-main);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--text-main);
    background: var(--bg-surface);
}

/* --- Glass Card --- */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 40px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    /* Border width */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-soft), var(--glow-card);
    border-color: var(--brand-primary);
}

/* --- Header --- */
header {
    position: fixed;
    top: 24px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 90%;
    max-width: 1200px;
    height: 70px;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

header .container {
    padding: 0 24px;
    /* Slightly reduce padding for pill shape */
    width: 100%;
    max-width: 100%;
}

nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Avenger', sans-serif;
    font-size: 2rem;
    font-weight: normal;
    letter-spacing: 0.05em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.7;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--brand-primary);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
}

.theme-toggle:hover {
    background: var(--border-light);
}

.burger {
    display: none;
    cursor: pointer;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    padding-top: var(--nav-height);
    display: flex;
    align-items: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: var(--brand-primary);
    margin-bottom: 24px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero-img {
    position: relative;
    border-radius: 40px;
    /* Modern Deep Curve */
    /* Premium Photo Styling with subtle border */
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    filter: saturate(1.1);
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

/* ... existing code ... */

.portfolio-thumb img {
    border-radius: 24px;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.1));
    transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle glass edge */
}

.portfolio-item:hover .portfolio-thumb img {
    transform: scale(1.08) translateY(-10px);
}

.portfolio-content {
    padding: 32px;
}

.portfolio-tag {
    color: var(--brand-primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.form-input {
    width: 100%;
    padding: 20px;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: var(--bg-surface);
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-light);
    padding: 80px 0 40px;
    margin-top: 80px;
    color: var(--text-muted);
}

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay classes logic handled in CSS or via nth-child, keeping simple here */

/* --- Mobile --- */
@media (max-width: 992px) {
    .grid-2 {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-img-container {
        order: -1;
        margin-bottom: 40px;
    }

    .nav-links {
        display: none;
    }

    .burger {
        display: block;
        color: var(--text-main);
    }

    .nav-links.nav-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        right: 0;
        top: var(--nav-height);
        background: var(--bg-surface);
        width: 100%;
        padding: 32px;
        border-bottom: 1px solid var(--border-light);
        gap: 24px;
        animation: navSlide 0.3s ease forwards;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    @keyframes navSlide {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .display-text {
        font-size: 3.5rem;
    }
}