:root {
    --bg-color: #050505;
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Effects */
.background-glow {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

/* Typography */
h1,
h2,
h3,
.logo {
    font-family: var(--font-heading);
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

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

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

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

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

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-coffee {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #ffdd00, #ff9500);
    color: #1a1a1a;
    padding: 0.65rem 1.25rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1.5rem;
}

.btn-coffee:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 149, 0, 0.4);
}

.btn-coffee svg {
    stroke: #1a1a1a;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    padding-top: 80px;
    /* Offset for fixed nav */
}

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

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

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

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

/* Visuals */
/* Neural Visualization Canvas */
#neural-canvas {
    width: 600px;
    height: 600px;
    max-width: 100%;
}

.hero-visual {
    /* Ensure it can hold the canvas properly */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

@keyframes float {
    0% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }

    100% {
        transform: translateY(0px) scale(1);
    }
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.fade-in-delayed {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Projects Section */
.projects-section {
    padding: 6rem 10%;
    position: relative;
    background: linear-gradient(to bottom, var(--bg-color), #0a0a0a);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 400px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-content {
    z-index: 2;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.project-card .description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.btn-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: var(--accent-secondary);
}

/* Abstract Visuals for Cards */
.card-visual {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.2;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.project-card:hover .card-visual {
    opacity: 0.4;
}

.visual-tropago {
    background: radial-gradient(circle, #3b82f6, #06b6d4);
}

.visual-career {
    background: radial-gradient(circle, #8b5cf6, #d946ef);
}

.visual-threaded {
    background: radial-gradient(circle, #10b981, #3b82f6);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-section {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 120px;
    }

    .cta-group {
        justify-content: center;
    }

    .glowing-orb {
        width: 300px;
        height: 300px;
        margin-top: 3rem;
    }
}

/* Contact Section (Redesigned) */
.contact-section {
    padding: 6rem 10%;
    position: relative;
    background-color: var(--bg-color);
    /* Ensure dark bg */
    overflow: hidden;
    /* For the glow */
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    align-items: start;
}

/* Left Side: Info */
.contact-left {
    padding-right: 2rem;
}

.contact-headline {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.contact-subtext {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 90%;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-secondary);
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-content .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.item-content .value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.item-content a.value:hover {
    color: var(--accent-primary);
}

.social-text-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 1.1rem;
}

.social-text-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.social-text-links a:hover {
    color: var(--accent-primary);
}

.social-text-links .sep {
    color: var(--text-muted);
}

/* Right Side: Form Card */
.contact-right {
    position: relative;
    z-index: 2;
}

.contact-form-card {
    background: #0f0f0f;
    /* Slightly lighter than main bg */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: block;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s, background 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-secondary);
    /* Purple-ish */
    background: #202020;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.btn-submit {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.form-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: -0.5rem;
}

/* Background Effect behind form */
.form-glow {
    position: absolute;
    top: 50%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
    filter: blur(60px);
}

@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-left {
        padding-right: 0;
        text-align: center;
    }

    .contact-headline {
        font-size: 2.5rem;
    }

    .contact-subtext {
        margin: 0 auto 3rem auto;
    }

    .contact-details {
        align-items: center;
        /* Center items on mobile if needed, or keep left aligned */
        max-width: 400px;
        margin: 0 auto;
    }

    .contact-item {
        width: 100%;
        /* More structured on mobile */
    }

    .form-glow {
        right: 50%;
        transform: translate(50%, -50%);
    }

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

/* AdSense Styles */
.ad-section {
    padding: 2rem 10%;
    display: flex;
    justify-content: center;
    background: transparent;
}

.ad-container {
    width: 100%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.ad-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}