@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Syne:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #070907;
    --surface-color: rgba(255, 255, 255, 0.05);
    --accent-primary: #54e346;
    --text-primary: #FFFFFF;
    --text-secondary: #AAAAAA;
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-accent: #6cf05e;
    --transition-speed: 0.3s;
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color var(--transition-speed);
}

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

/* Base Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #000;
    border: none;
}

.btn-primary:hover {
    background-color: var(--hover-accent);
    box-shadow: 0 0 15px rgba(84, 227, 70, 0.4);
}

/* Header & Navigation (Glassmorphism) */
.main-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    z-index: 1000;
}

.nav-container {
    background: rgba(30, 35, 30, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 40px;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 35px;
    width: auto;
    display: block;
}

.logo-icon {
    width: 35px;
    height: 35px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(84,227,70,0.5);
    position: relative;
}

.logo-icon::after {
    content: "?"; /* Placeholder for the sunburst logo */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-size: 0.95rem;
}

.nav-links a {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--text-primary);
    font-weight: 500;
}

.nav-links a.active .dot {
    width: 5px;
    height: 5px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 5px var(--accent-primary);
}

.nav-links a:not(.active):hover {
    color: var(--accent-primary);
}

/* Light Mode */
body.light-mode {
    --bg-color: #f5f5f0;
    --surface-color: rgba(0, 0, 0, 0.05);
    --text-primary: #111111;
    --text-secondary: #555555;
    --border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .nav-container {
    background: rgba(245, 245, 240, 0.7);
    border-color: rgba(0,0,0,0.08);
}

body.light-mode .wavy-text {
    stroke: var(--accent-primary);
}

/* Theme Toggle */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-speed);
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.icon-moon { display: none; }
body.light-mode .icon-sun { display: none; }
body.light-mode .icon-moon { display: block; }

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--accent-primary);
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 15px rgba(84, 227, 70, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(84, 227, 70, 0.6);
}

/* About Section — Window Design */
.about-section {
    padding: 5rem 0 0;
    display: flex;
    justify-content: center;
}

.about-window-outer {
    width: 100%;
    background-image: url('/static/images/about.png');
    background-size: cover;
    background-position: center;
    position: relative;
}

.about-window-frame {
    width: 100%;
    position: relative;
}

.about-window-glass {
    width: 100%;
    background: rgba(7, 9, 7, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    text-align: center;
}

.about-window-content {
    max-width: 600px;
}

.about-label {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 1rem;
}

.about-heading {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.9), 0 1px 4px rgba(0,0,0,0.6);
}

.about-body {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    text-shadow: 0 4px 30px rgba(0,0,0,0.9), 0 1px 4px rgba(0,0,0,0.6);
}

.about-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.about-press-link {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 2px;
    transition: all var(--transition-speed);
}

.about-press-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-speed);
    backdrop-filter: blur(4px);
}

.skill-tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

@media (max-width: 768px) {
    .about-window-glass {
        padding: 4rem 2rem;
    }
    .about-heading {
        font-size: 1.5rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .about-heading {
        font-size: 1.25rem;
        line-height: 1.25;
    }
    .about-window-glass {
        padding: 3rem 1.5rem;
    }
}

/* Press Section */
.press-section {
    padding: 8rem 2rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.press-heading {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.press-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.press-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.press-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: border-color var(--transition-speed);
}

.press-card:hover {
    border-color: var(--accent-primary);
}

.press-card-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.press-outlet {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.press-badge {
    background: var(--accent-primary);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.press-card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.press-card-quote {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
    border-left: 3px solid var(--accent-primary);
    padding-left: 1rem;
    margin-bottom: 0.75rem;
}

.press-card-context {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.press-card-image {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.press-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.press-read-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-primary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--accent-primary);
    padding-bottom: 2px;
    transition: opacity var(--transition-speed);
}

.press-read-link:hover {
    opacity: 0.7;
    color: var(--accent-primary);
}

.press-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.press-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.press-cta {
    text-align: center;
    padding: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.press-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* 404 Page */
.error-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-family: var(--font-heading);
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-body {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Blog header flex */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .about-heading { font-size: 2rem; }
    .press-heading { font-size: 2.5rem; }
    .error-code { font-size: 5rem; }
    .back-to-top { bottom: 1.5rem; right: 1.5rem; }
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    position: relative;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(7, 9, 7, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-nav a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-nav a:hover {
    color: var(--accent-primary);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .mobile-menu { display: flex; }
    .btn-primary { display: none; }
}

/* ===== Tech Stack Section ===== */
.techstack-section {
    padding: 5rem 2rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.techstack-header {
    text-align: center;
    margin-bottom: 3rem;
}

.techstack-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-primary);
}

.techstack-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1.2rem;
    perspective: 800px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.2rem 0.8rem;
    border: 1px solid #333333;
    border-radius: 12px;
    background: #2a2a2a;
    cursor: default;
    transform-style: preserve-3d;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    will-change: transform;
}

.tech-item:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px #444444;
    border-color: #555555;
}

body.light-mode .tech-item {
    background: #ffffff;
    border-color: #e5e7eb;
}

body.light-mode .tech-item:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.15), 0 0 0 1px #d1d5db;
    border-color: #d1d5db;
}


.tech-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* Black-branded logos: white in dark mode, black in light mode */
body:not(.light-mode) .tech-icon img.dark-logo {
    filter: brightness(0) invert(1);
}

body.light-mode .tech-icon img.dark-logo {
    filter: brightness(0);
}

.tech-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #d1d5db;
    text-align: center;
    line-height: 1.3;
}

body.light-mode .tech-name {
    color: #374151;
}

/* ===== Case Studies List Page ===== */
.cs-list-section {
    padding: 8rem 2rem 5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.cs-list-header {
    text-align: center;
    margin-bottom: 4rem;
}

.cs-list-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cs-list-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

.cs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.cs-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.cs-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.cs-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #111;
}

.cs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cs-card:hover .cs-card-image img {
    transform: scale(1.04);
}

.cs-industry-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent-primary);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cs-card-body {
    padding: 1.5rem;
    flex: 1;
}

.cs-client {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

.cs-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.cs-card-result {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cs-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.cs-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cs-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ===== Case Study Detail Page ===== */
.cs-detail-page {
    min-height: 100vh;
}

.cs-detail-hero {
    position: relative;
    height: 480px;
    overflow: hidden;
}

.cs-detail-hero-img {
    width: 100%;
    height: 100%;
}

.cs-detail-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.75) 100%);
}

.cs-detail-hero-content {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
}

.cs-detail-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0.5rem 0;
}

.cs-detail-client {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.cs-detail-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

.cs-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.cs-detail-blocks {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.cs-block {
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
}

.cs-block-result {
    border-color: var(--accent-primary);
    background: rgba(74, 222, 128, 0.04);
}

.cs-block-icon {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.cs-block-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cs-block-text {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.95rem;
}

/* Footer links row */
.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

/* ===== Responsive: Tech Stack + Case Studies ===== */
@media (max-width: 768px) {
    .techstack-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }

    .cs-grid {
        grid-template-columns: 1fr;
    }

    .cs-detail-hero {
        height: 320px;
    }

    .cs-detail-hero-content {
        bottom: 1.5rem;
    }

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

/* Footer */
.main-footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    background-color: transparent;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
}

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

/* Responsive Design for Layout */
@media (max-width: 768px) {
    .main-header {
        width: 95%;
        top: 15px;
    }
    
    .nav-container {
        padding: 0.6rem 1rem;
        border-radius: 30px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
    }

    .logo-icon::after {
        font-size: 1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .nav-links a[href="#contact"] {
        display: none; /* Hide on smaller screens — button serves same purpose */
    }

    .btn-primary {
        display: none; /* Hide Contact button on mobile */
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 0.8rem;
        font-size: 0.8rem;
    }
    .logo {
        margin-right: 0.5rem;
    }
}
