/* Base & Reset */
:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #3b82f6;
    /* A refined blue */
    --accent-glow: rgba(59, 130, 246, 0.4);
    --surface-color: #111111;
    --surface-hover: #1a1a1a;
    --border-color: #333333;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;

    --container-width: 1200px;
    --spacing-section: 60px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.lead {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    color: var(--accent-color);
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--accent-color);
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #999 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: var(--spacing-section) 0;
    position: relative;
}

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

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

/* Background Noise */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Header */
header {
    padding: 2rem 0;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 10;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: color 0.3s;
}

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

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    /* Slightly squarish for pro feel */
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.btn-primary:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    margin-left: 1rem;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-primary.large {
    font-size: 1.5rem;
    padding: 1.5rem 3rem;
}

/* Hero */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    /* Removed center alignment to control top spacing */
    padding-top: 200px;
    /* Manual top spacing */
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: -100px;
    right: -100px;
    animation: float 10s infinite ease-in-out;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: purple;
    bottom: 10%;
    left: -50px;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 50px);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* Services */
.card {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--text-secondary);
    background-color: var(--surface-hover);
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Work */
.work-section {
    padding-bottom: 2rem;
}

.project-image {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.02);
}

.link-arrow {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

/* Stats */
.stats-grid {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.stat .number {
    display: block;
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.stat .label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
}

/* About */
.about-section {
    padding-top: 0;
    padding-bottom: 2rem;
}

/* Contact */
.contact-section {
    text-align: center;
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: var(--text-secondary);
    margin-left: 1.5rem;
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}

/* Mobile */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
        word-wrap: break-word;
        /* Ensure extremely long words don't overflow */
    }

    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-grid {
        gap: 1.5rem;
        flex-wrap: no-wrap;
        /* Keep stats in one row if possible, or wrap if tiny */
    }

    .hero-section {
        padding-top: 120px;
        /* Account for navbar */
    }
}