:root {
    /* Color Palette */
    --bg-base: #030303;
    --bg-surface: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.02);
    --bg-card-hover: rgba(255, 255, 255, 0.05);
    
    --text-main: #f8f8f8;
    --text-muted: #a0a0a0;
    
    /* Premium Accents */
    --accent-color: #ffffff;
    --accent-color-dim: rgba(255, 255, 255, 0.05);
    --accent-blue: #a3a3a3;
    
    --border-color: rgba(255, 255, 255, 0.08);
    
    /* Typography */
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
}

body {
    position: relative;
    overflow-x: hidden;
}

::selection {
    background: var(--accent-color-dim);
    color: var(--accent-color);
}

/* --- Background Effects --- */
.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    mask-image: radial-gradient(ellipse at top center, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at top center, black 20%, transparent 80%);
}

.glow-pointer {
    position: fixed;
    top: 0; left: 0;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    transition: transform 0.1s ease-out;
}

/* --- Utilities --- */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-accent {
    color: var(--accent-color);
}
.w-100 {
    width: 100%;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    background: rgba(3, 3, 3, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 1px;
    z-index: 101;
}

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

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--text-main);
    cursor: pointer;
    z-index: 101;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links .btn-outline {
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    color: var(--text-main);
}

.nav-links .btn-outline:hover {
    border-color: var(--accent-color);
    background: var(--accent-color-dim);
}

/* --- Buttons --- */
.btn-primary {
    background: var(--text-main);
    color: var(--bg-base);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
    background: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
}

/* --- General Layout --- */
section {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 4.5rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

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

.hero-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.hero-image-glow {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
    pointer-events: none;
}

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

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.about-text strong {
    color: var(--text-main);
    font-weight: 600;
}

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

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 16px;
    transition: border-color 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.stat-card:hover {
    border-color: var(--accent-color);
    background: var(--bg-card-hover);
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    background: var(--accent-color-dim);
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-mono);
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 300;
}

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

.skill-category {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 24px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.skill-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.15);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 300;
}

.skill-list li::before {
    content: '';
    display: block;
    width: 6px; height: 6px;
    background: var(--accent-blue);
    border-radius: 50%;
}

/* --- Portfolio Section --- */
.portfolio-group {
    margin-bottom: 4rem;
}

.group-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, var(--accent-color-dim), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.project-card:not(.disabled):hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-color);
    transform: translateY(-4px);
}

.project-card:not(.disabled):hover::before {
    opacity: 1;
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:not(.disabled):hover .project-image img {
    transform: scale(1.05);
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    font-size: 3rem;
    color: var(--text-muted);
}

.project-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h4 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.project-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
    font-family: var(--font-mono);
}

.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(0,0,0,0.2);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 153, 0, 0.1);
    color: #ffb84d;
    border: 1px solid rgba(255, 153, 0, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    margin-top: auto;
    align-self: flex-start;
}

/* --- Contact Section --- */
.contact-box {
    background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(10,10,10,0) 100%);
    border: 1px solid var(--border-color);
    padding: 5rem 3rem;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
}

.contact-box::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.3;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    font-weight: 300;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 15px rgba(255,255,255,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-social {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-social h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px; height: 50px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.contact-icon:hover {
    background: var(--accent-color-dim);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--text-main);
    color: var(--bg-base);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: white;
    transform: translateY(-5px);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-content {
        margin: 0 auto;
    }
    
    .hero-cta {
        justify-content: center;
    }

    .hero-image-wrapper {
        max-width: 600px;
        margin: 0 auto;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(3, 3, 3, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 100;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .nav-links .btn-outline {
        font-size: 1.2rem;
    }

    .hero-title { 
        font-size: 2.5rem; 
    }
    
    .about-grid { 
        grid-template-columns: 1fr; 
        gap: 3rem; 
    }
    
    .hero-cta { 
        flex-direction: column; 
    }
    
    .btn-primary, .btn-secondary { 
        width: 100%; 
        justify-content: center; 
    }
    
    section {
        padding: 4rem 5%;
    }
    
    .contact-box { 
        padding: 3rem 1.5rem; 
    }
    
    .contact-social h3 {
        text-align: center;
    }

    .contact-links {
        justify-content: center;
    }
}
