:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #0f172a;
    --bg: #ffffff;
    --surface: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.2;
}

a {
    transition: var(--transition);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Nav */
header {
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: 'Biome', 'Orbitron', sans-serif;
    /* User requested Biome, fallback to Orbitron */
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    margin-right: 4rem;
    /* Fix clashing with nav */
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
    background: #eff6ff;
    /* Clarified hover state */
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    background: radial-gradient(circle at top right, #eff6ff 0%, transparent 40%),
        radial-gradient(circle at bottom left, #f8fafc 0%, transparent 40%);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-inline: auto;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Services Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    /* Widened to help text wrapping */
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: var(--text-light);
}

/* About Section */
.about-box {
    background: var(--surface);
    border-radius: 24px;
    padding: 4rem;
    display: flex;
    gap: 4rem;
    align-items: center;
    border: 1px solid var(--border);
}

.about-content h2 {
    margin-bottom: 1.5rem;
}

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

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    /* Ensure full width */
}

.stat-item h4 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-item p {
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Portfolio Section */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.app-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition);
}

.app-card:hover {
    box-shadow: var(--shadow);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.socials a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
}

.socials a:hover {
    color: var(--primary);
}

/* Animation classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .about-box {
        flex-direction: column;
        padding: 2rem;
        gap: 2rem;
    }

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

    .nav-links {
        display: none;
    }
}