/* CSS Reset and Variables */
:root {
    /* Day mode as default */
    --bg-dark: #f0f2f5;
    --bg-darker: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #5a5a5a;
    --accent-blue: #0066cc;
    --accent-blue-dim: rgba(0, 102, 204, 0.15);
    --accent-green: #228b22;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode {
    /* Dark mode */
    --bg-dark: #050505;
    --bg-darker: #000000;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent-blue: #00f0ff;
    --accent-blue-dim: rgba(0, 240, 255, 0.2);
    --accent-green: #39ff14;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.text-center {
    text-align: center;
}

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

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

.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.img-fluid {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.rounded {
    border-radius: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition-fast);
    cursor: pointer;
    text-align: center;
    border: none;
}

.sm-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.large-btn {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
}

.primary-btn {
    background-color: var(--accent-blue);
    color: #ffffff;
    /* White text looks better in both modes for primary btn */
    box-shadow: 0 0 15px var(--accent-blue-dim);
}

body.dark-mode .primary-btn {
    color: var(--bg-darker);
    /* Revert dark mode text color for button */
}

.primary-btn:hover {
    box-shadow: 0 0 25px rgba(0, 102, 204, 0.4);
    transform: translateY(-2px);
}

body.dark-mode .primary-btn:hover {
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

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

body.dark-mode .secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.pulse-glow {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 var(--accent-blue-dim);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 1000;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

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

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

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    background: rgba(128, 128, 128, 0.1);
}

.hidden {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    /* offset for fixed nav */
    text-align: center;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
    padding: 0 2rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-blue-dim) 0%, rgba(0, 0, 0, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

/* Section Headers */
.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

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

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

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2.5rem 2rem;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.hover-tilt:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 102, 204, 0.3);
}

body.dark-mode .hover-tilt:hover {
    border-color: rgba(0, 240, 255, 0.3);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: -webkit-linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* The Edge Section */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.edge-content .lead {
    color: var(--accent-blue);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: rgba(34, 139, 34, 0.1);
    color: var(--accent-green);
    border-radius: 50%;
    flex-shrink: 0;
    font-weight: bold;
}

body.dark-mode .check-icon {
    background-color: rgba(57, 255, 20, 0.1);
}


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

.feature-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.edge-image-container {
    padding: 1rem;
    position: relative;
}

.edge-image-container::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--accent-blue-dim) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
}

/* Portfolio Section */
.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.gallery-item {
    overflow: hidden;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 0, 0, 0.15);
}

body.dark-mode .gallery-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.img-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
}

.gallery-item:hover .img-wrapper img {
    transform: scale(1.05);
}

.gallery-info {
    padding: 2rem;
}

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

.gallery-info p {
    color: var(--accent-blue);
    font-size: 0.9rem;
    font-weight: 600;
}

/* CTA Section */
.cta-box {
    padding: 4rem 2rem;
    border-color: var(--glass-border);
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--accent-blue-dim) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.cta-box>* {
    position: relative;
    z-index: 1;
}

.cta-box h2 {
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    margin-bottom: 1rem;
}

.cta-box p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

/* Footer */
.footer {
    background-color: var(--bg-darker);
    padding: 4rem 0 0 0;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.social-links li {
    margin-bottom: 0.8rem;
}

.social-links a {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

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

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-contact .email {
    color: var(--accent-blue);
}

.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    /* very faint border in light mode */
}

body.dark-mode .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Floating WhatsApp */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition-fast);
    animation: wa-bounce 2s infinite;
}

.floating-wa:hover {
    transform: scale(1.1);
    background-color: #1ebe57;
}

@keyframes wa-bounce {

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

    50% {
        transform: translateY(-10px);
    }
}

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

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .edge-image-container {
        order: -1;
    }
}

@media (max-width: 768px) {
    .navbar {
        width: 95%;
        padding: 1rem;
    }

    .nav-links {
        display: none;
        /* simple mobile menu approach for now */
    }

    .hero-actions {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .portfolio-gallery {
        grid-template-columns: 1fr;
    }
}