:root {
    /* Light Theme */
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #0369a1;
    /* Sky 700 */
    --border-color: #e2e8f0;
    --header-bg: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] {
    /* Dark Theme (Navy/Slate) */
    --bg-color: #0f172a;
    /* Slate 900 */
    --surface-color: #1e293b;
    /* Slate 800 */
    --text-primary: #f1f5f9;
    /* Slate 100 */
    --text-secondary: #94a3b8;
    /* Slate 400 */
    --accent-color: #38bdf8;
    /* Sky 400 */
    --border-color: #334155;
    --header-bg: rgba(15, 23, 42, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* Header Options */
.header {
    background-color: rgba(255, 255, 255, 0.75);
    /* Translucent white/light surface */
    backdrop-filter: blur(12px);
    /* Glassmorphism blur */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    /* Floating */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark mode overrides for header */
[data-theme="dark"] .header {
    background-color: rgba(15, 23, 42, 0.75);
    /* Translucent dark slate */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Optional header shrink class on scroll for JS handling */
.header.scrolled {
    padding: 0.5rem 5%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.header-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
    transform: scale(2.5);
    transform-origin: left center;
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:hover {
    background-color: var(--border-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 5%;
    overflow: hidden;
    padding-top: 80px;
    /* Offset for fixed header */
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--surface-color) 100%);
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(circle at top right, var(--surface-color), transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    /* Above canvas */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    /* Increased margin since subtitle is gone */
    min-height: 1.2em;
    background: none;
    /* Removed gradient for typewriter clarity */
    color: var(--text-primary);
    font-family: 'Courier Prime', 'Courier New', monospace;
    /* Typewriter Font */
}

/* Typewriter Span */
#typewriter {
    font-family: 'Courier Prime', 'Courier New', monospace;
}

/* Typewriter Cursor */
.cursor {
    display: inline-block;
    width: 10px;
    /* Thicker cursor like old terminal */
    background-color: var(--accent-color);
    animation: blink 1s infinite;
    margin-left: 5px;
    vertical-align: middle;
    height: 0.8em;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero p {
    /* Display is handled by fade-in-up now, removing display:none constraint to allow flow */
    margin-bottom: 2rem;
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cta-btn {
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.85rem 2.5rem;
    border-radius: 99px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px 0 rgba(3, 105, 161, 0.39);
    /* Subtle initial shadow */
    letter-spacing: 0.5px;
}

.cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(3, 105, 161, 0.6);
    /* Enhanced glow on hover */
    background-color: var(--text-primary);
    /* Slight contrast shift depending on theme */
    color: var(--bg-color);
}

/* Showcase Grid */
.showcase {
    padding: 5rem 5%;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    /* Soft initial shadow */
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Deeper shadow on hover */
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(3, 105, 161, 0.1);
    /* Sky tone background */
    border-radius: 50%;
    /* Circle background */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.card-icon-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.card p {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

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

.card-link {
    color: var(--accent-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    transition: color 0.3s ease;
}

.card-arrow {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
}

.card:hover .card-arrow {
    transform: translateX(6px);
}

/* About Section */
.about {
    padding: 5rem 5%;
    background-color: var(--surface-color);
    text-align: center;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
}

.feature {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

/* Scroll Reveal classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.feature h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* Footer */
footer {
    padding: 3rem 5%;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a {
    margin-left: 1.5rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    header {
        padding: 1rem;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }

    .footer-links a {
        margin: 0 0.5rem;
    }
}