/* ============================================
   Caracal Softworks - Modern Blueprint Theme
   ============================================ */

/* CSS Variables */
:root {
    /* Colors - Deep Purple Accent */
    --primary: #6b46c1;
    --primary-light: #8b5cf6;
    --primary-dark: #553c9a;
    --secondary: #10b981;

    /* Neutrals */
    --bg-primary: #0a0a0f;
    --bg-secondary: #131318;
    --bg-tertiary: #1a1a24;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Blueprint Colors */
    --blueprint-blue: #1e40af;
    --blueprint-line: rgba(139, 92, 246, 0.15);
    --blueprint-dot: rgba(139, 92, 246, 0.3);

    /* Borders & Shadows */
    --border: rgba(139, 92, 246, 0.2);
    --shadow: rgba(107, 70, 193, 0.1);

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 5rem 2rem;

    /* Typography */
    --font-main: "Inter", system-ui, -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", "Courier New", monospace;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* Blueprint Background Effect */
.blueprint-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(var(--blueprint-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--blueprint-line) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

.blueprint-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(
        circle,
        var(--blueprint-dot) 1px,
        transparent 1px
    );
    background-size: 20px 20px;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: 3.5rem;
}
h2 {
    font-size: 2.5rem;
}
h3 {
    font-size: 1.75rem;
}
h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    display: inline;
}

.logo-text::before {
    content: ">";
    color: var(--primary-light);
    margin-right: 0.5rem;
}

.logo-text::after {
    content: "_";
    color: var(--primary-light);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

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

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--primary-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Main Content */
.main-content {
    margin-top: 70px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 4rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-grid-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(139, 92, 246, 0.1),
        transparent 70%
    );
    pointer-events: none;
}

/* Code Window */
.code-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow);
}

.code-header {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
}

.code-content {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
    max-width: 100%;
}

.code-content code {
    color: var(--text-secondary);
    display: block;
    white-space: pre;
    word-wrap: normal;
}

.code-content pre {
    margin: 0;
    max-width: 100%;
}

.code-keyword {
    color: #c792ea;
}
.code-class {
    color: #82aaff;
}
.code-function {
    color: #82aaff;
}
.code-string {
    color: #c3e88d;
}
.code-comment {
    color: var(--text-muted);
    font-style: italic;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: var(--font-main);
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-light);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* Sections */
.section {
    padding: var(--section-padding);
    position: relative;
}

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

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.bg-dark {
    background: var(--bg-secondary);
}

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

.feature-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

/* Page Hero */
.page-hero {
    padding: 6rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(
        to bottom,
        var(--bg-secondary),
        var(--bg-primary)
    );
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.value-card {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.value-card h3 {
    color: var(--primary-light);
    margin-bottom: 1rem;
}

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.process-step {
    position: relative;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.process-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.process-step h3 {
    margin-bottom: 0.75rem;
}

/* Services List */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.service-item:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 40px var(--shadow);
}

.service-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-icon-large {
    font-size: 4rem;
    line-height: 1;
}

.service-header h2 {
    margin-bottom: 0.5rem;
}

.service-tagline {
    color: var(--primary-light);
    font-size: 1.1rem;
}

.service-content p {
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.service-features li {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.service-features li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-light);
}

/* Portfolio */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.625rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

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

.portfolio-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.portfolio-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.portfolio-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--bg-tertiary),
        var(--primary-dark)
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.5;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-links {
    display: flex;
    gap: 1rem;
}

.portfolio-link {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.portfolio-content h3 {
    margin-bottom: 0.75rem;
}

.portfolio-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.github-cta {
    text-align: center;
    padding: 3rem 0;
}

.github-cta h2 {
    margin-bottom: 1rem;
}

.github-cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-details {
    margin: 2rem 0;
}

.contact-detail {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 2rem;
}

.contact-detail h4 {
    margin-bottom: 0.25rem;
}

.contact-detail p {
    margin: 0;
}

.contact-faq {
    margin-top: 3rem;
}

.contact-faq h3 {
    margin-bottom: 1.5rem;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item h4 {
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.faq-item p {
    margin: 0;
}

/* Contact Form */
.contact-form-container {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 0.875rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

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

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.footer-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--text-muted);
    margin: 0;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content,
    .content-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .hero-title {
        font-size: 3rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo-text {
        display: inline;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }

    .nav-toggle {
        display: flex;
    }

    .code-window {
        max-width: 100%;
    }

    .code-content {
        font-size: 0.75rem;
        padding: 1rem;
    }

    .hero-visual {
        max-width: 100%;
        overflow: hidden;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        border-left: 1px solid var(--border);
        transition: right 0.3s ease;
        gap: 0;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-menu a {
        display: block;
        padding: 1rem 0;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

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

    .hero-description {
        font-size: 1.1rem;
    }

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

    .service-header {
        flex-direction: column;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 3rem 1rem;
    }

    .container {
        padding: 0 1rem;
    }

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

    .btn {
        width: 100%;
    }

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

    .process-steps,
    .values-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
}

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

.hero-content,
.feature-card,
.portfolio-card,
.service-item {
    animation: fadeInUp 0.6s ease-out;
}

/* Tech Stack Grid */
.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tech-category {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.tech-category:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px var(--shadow);
}

.tech-category h3 {
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tech-category h3 i {
    font-size: 1.5rem;
}

.tech-list {
    list-style: none;
}

.tech-list li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.tech-list li:last-child {
    border-bottom: none;
}

.tech-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--primary-light);
    font-weight: bold;
}

/* Footer Location */
.footer-location {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.footer-location i {
    color: var(--primary-light);
    margin-right: 0.5rem;
}

.footer-links a i {
    margin-right: 0.5rem;
    width: 16px;
    display: inline-block;
}

.footer-section p {
    margin-bottom: 0.5rem;
}

.footer-section p i {
    color: var(--primary-light);
    margin-right: 0.5rem;
    width: 16px;
    display: inline-block;
}
