/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 500;
    font-family: var(--font-body);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-main);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    border-color: var(--text-main);
    background: var(--bg-tertiary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.3s ease, background 0.3s ease;
}
.header.hide {
    transform: translateY(-100%);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
}
.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav {
    display: none;
}
@media (min-width: 768px) {
    .nav {
        display: block;
    }
}
.nav-list {
    display: flex;
    gap: 2.5rem;
}
.nav-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s ease;
}
.nav-link:hover {
    color: var(--text-main);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}
.theme-toggle:hover {
    background: var(--bg-tertiary);
}
.theme-toggle svg {
    width: 20px;
    height: 20px;
}
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}
@media (min-width: 768px) {
    .mobile-menu-btn { display: none; }
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
    opacity: 0.1;
    z-index: -1;
    filter: blur(80px);
}
.hero-content {
    max-width: 800px;
}
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: var(--text-main);
}
.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}
.hero-desc {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Section Header */
.section-header {
    margin-bottom: 4rem;
    max-width: 600px;
}
.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Expertise */
.expertise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .expertise-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.expertise-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 3rem 2rem;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.expertise-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}
.card-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}
.expertise-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.expertise-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Work */
.work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem 2rem;
}
@media (min-width: 768px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}
.work-item {
    display: block;
}
.work-img-wrapper {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 20px;
    background-color: var(--bg-tertiary);
    margin-bottom: 1.5rem;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.placeholder-img.img-aura { background-image: url('../img/aura.png'); }
.placeholder-img.img-vantage { background-image: url('../img/vantage.png'); }
.placeholder-img.img-freight { background-image: url('../img/freight.png'); }
.placeholder-img.img-sitrak { background-image: url('../img/sitrak.png'); }
.placeholder-img.img-tiam { background-image: url('../img/tiam.png'); }
.placeholder-img.img-worker { background-image: url('../img/worker.png'); }
.placeholder-img.img-zona { background-image: url('../img/zona.png'); }
.placeholder-img.img-spacity { background-image: url('../img/spacity.png'); }

[data-theme="dark"] .placeholder-img.img-aura { background-image: url('../img/aura.png'); }
[data-theme="dark"] .placeholder-img.img-vantage { background-image: url('../img/vantage.png'); }
[data-theme="dark"] .placeholder-img.img-freight { background-image: url('../img/freight.png'); }
[data-theme="dark"] .placeholder-img.img-sitrak { background-image: url('../img/sitrak.png'); }
[data-theme="dark"] .placeholder-img.img-tiam { background-image: url('../img/tiam.png'); }
[data-theme="dark"] .placeholder-img.img-worker { background-image: url('../img/worker.png'); }
[data-theme="dark"] .placeholder-img.img-zona { background-image: url('../img/zona.png'); }
[data-theme="dark"] .placeholder-img.img-spacity { background-image: url('../img/spacity.png'); }

.work-item:hover .work-img-wrapper {
    transform: scale(0.98);
}
.work-category {
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}
.work-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}
.work-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}
.work-link:hover {
    color: var(--text-main);
}
.work-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}
.work-link:hover svg {
    transform: translateX(4px);
}

/* Contact */
.contact-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.contact-box::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.05;
    pointer-events: none;
}
.contact-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}
.contact-box p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}
.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}
@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}
.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.footer-links a:hover {
    color: var(--text-main);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
    /* For debugging */
}
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* Custom Cursor */
@media (pointer: fine) {
    body {
        cursor: none;
    }
    .cursor {
        width: 8px;
        height: 8px;
        background: var(--text-main);
        border-radius: 50%;
        position: fixed;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s, background 0.2s;
        /* Start hidden until mouse moves */
        opacity: 0; 
    }
    .cursor-follower {
        width: 40px;
        height: 40px;
        border: 1px solid var(--border-color);
        border-radius: 50%;
        position: fixed;
        pointer-events: none;
        z-index: 9998;
        transform: translate(-50%, -50%);
        transition: transform 0.1s, width 0.2s, height 0.2s, background 0.2s, border-color 0.2s;
        backdrop-filter: blur(2px);
        /* Start hidden until mouse moves */
        opacity: 0; 
    }
    
    a:hover ~ .cursor, button:hover ~ .cursor, .btn:hover ~ .cursor {
        width: 0;
        height: 0;
    }
    a:hover ~ .cursor-follower, button:hover ~ .cursor-follower, .btn:hover ~ .cursor-follower {
        width: 60px;
        height: 60px;
        background: rgba(255,255,255,0.1);
        border-color: var(--text-main);
        mix-blend-mode: difference;
    }
}
