/* V5 Updates Styles */

/* Business Icons Styling */
.business-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    fill: none;
    stroke: var(--color-accent-primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
    display: inline-block;
}

.value-item .business-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 1rem;
    display: block;
    margin-right: 0;
}

/* Approach Section Grid Adjustments */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

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

    .section-padding {
        padding: 1.5rem 0;
    }

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

    /* Contact Section Mobile Tightening */
    .contact-sub,
    .contact-data {
        margin-bottom: 1.5rem;
    }

    .contact-form,
    .contact-data {
        padding: 1.5rem;
    }




}


/* Hero Title Adjustments */
.hero-title .highlight-text-alt {
    color: var(--color-accent-primary);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

/* Card Header Adjustments for Icons */
.card-header-split {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Adjusted for icon */
}

.card-header-split h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

/* Section Lead Text */
.section-lead {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 800px;
    margin: 0 auto 4rem auto;
    line-height: 1.6;
}

.mb-5 {
    margin-bottom: 3rem;
}

/* Language Switcher Redesign */
.lang-switcher-wrapper {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
}

.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-accent-primary);
    transition: var(--transition-fast);
    padding: 0.4rem 0.8rem;
    height: auto;
    line-height: 1;
    min-width: 80px;
    /* Minimal width to avoid jitter */
}

.lang-toggle-btn:hover {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 12px var(--color-accent-glow);
    background: rgba(0, 240, 255, 0.1);
}

[data-theme="light"] .lang-toggle-btn:hover {
    background: rgba(8, 145, 178, 0.1);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    list-style: none;
    padding: 0.5rem 0;
    min-width: 100%;
    z-index: 200;
    display: none;
    /* Hidden by default */
    box-shadow: var(--glass-shadow);
}

[data-theme="light"] .lang-dropdown {
    background: rgba(248, 250, 252, 0.95);
}

.lang-dropdown.active {
    /* display: block; - handled by JS/utility, but let's keep it managed by class */
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.lang-dropdown li {
    padding: 0.4rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    white-space: nowrap;
}

.lang-dropdown li:hover {
    color: var(--color-accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* Mobile Header Language Switcher Specifics */
.mobile-header-lang {
    display: inline-block;
    margin-right: 1rem;
    vertical-align: middle;
}

.mobile-header-lang .lang-toggle-btn {
    padding: 0.3rem 0.6rem;
    min-width: unset;
    font-size: 0.8rem;
}

@media (min-width: 900px) {
    .mobile-header-lang {
        display: none;
    }
}

@media (max-width: 899px) {
    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Ensure brand group takes available space or just fits */
    .brand-group {
        flex-grow: 1;
    }

    /* Adjust for tight spaces */
    .mobile-header-lang {
        margin-right: 1.5rem;
    }
}

/* --- Contact Side Panel Styles (Dark IDE Theme) --- */
.contact-side-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 750px;
    max-width: 95vw;
    height: 100vh;
    /* Main IDE Background */
    background: #1e2227;
    color: #abb2bf;
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid #3e4451;
}

.contact-side-panel.is-open {
    right: 0;
}

/* Ensure dark mode persists regardless of global theme for this specific component */
[data-theme="light"] .contact-side-panel {
    background: #1e2227;
    color: #abb2bf;
    border-left: 1px solid #3e4451;
}

/* Panel Header */
.panel-header {
    flex-shrink: 0;
    height: 50px;
    border-bottom: 1px solid #181a1f;
    /* darker split */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: #21252b;
    /* Slightly lighter header */
}

.terminal-prompt {
    font-family: 'Fira Code', monospace;
    color: #98c379;
    /* Green prompt */
    font-size: 0.85rem;
}

/* Panel Body */
.panel-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0;
    background: #282c34;
    /* Editor background */
}

/* Panel Footer */
.panel-footer {
    flex-shrink: 0;
    height: 35px;
    border-top: 1px solid #181a1f;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    padding: 0 1.5rem;
    background: #21252b;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #5c6370;
}

.footer-status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-value {
    color: #abb2bf;
}

.status-value.highlight {
    color: #98c379;
}

/* Panel Overlay */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.panel-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Close Button */
.panel-close-btn {
    background: transparent;
    border: none;
    color: #5c6370;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.panel-close-btn:hover {
    color: #e06c75;
    /* Red for close action */
}

/* Scrollbar styling for panel */
.panel-body::-webkit-scrollbar {
    width: 10px;
}

.panel-body::-webkit-scrollbar-track {
    background: #21252b;
}

.panel-body::-webkit-scrollbar-thumb {
    background: #3e4451;
    border-radius: 5px;
}

.panel-body::-webkit-scrollbar-thumb:hover {
    background: #5c6370;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .mobile-hidden {
        display: none;
    }

    .contact-container-centered {
        padding: 0 1rem;
    }
}

/* --- Clean Terminal Theme for Contact Panel (Light Version) --- */
.tech-theme {
    font-family: 'Inter', sans-serif;
    padding: 2rem 3rem;
    color: #334155;
    /* Dark slate for text */
}

.tech-container {
    max-width: 600px;
    margin: 0 auto;
}

.tech-header-block {
    border-left: 3px solid #0ea5e9;
    /* Light blue accent */
    padding-left: 1.5rem;
}

.tech-title {
    font-family: 'Fira Code', monospace;
    font-size: 1.4rem;
    color: #0f172a;
    /* Very dark slate */
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.tech-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #64748b;
    /* Slate 500 */
}

.tech-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: #f1f5f9;
    /* Slate 100 */
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    /* Slate 200 */
    border-radius: 4px;
}

.tech-info-item {
    display: flex;
    flex-direction: column;
}

.tech-label-small {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.tech-value {
    color: #0f172a;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.tech-value:hover {
    color: #0ea5e9;
    text-decoration: underline;
}

/* Form Styles */
.tech-form-group {
    margin-bottom: 1.5rem;
}

.tech-label {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #475569;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tech-input-wrapper {
    position: relative;
}

.tech-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    /* Slate 300 */
    border-radius: 4px;
    padding: 0.8rem 1rem;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.tech-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background: #ffffff;
}

.tech-input::placeholder {
    color: #94a3b8;
}

.tech-textarea {
    resize: vertical;
    min-height: 250px;
}

select.tech-input {
    appearance: none;
    cursor: pointer;
}

.tech-input-indicator {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.8rem;
    pointer-events: none;
}

/* Submit Button */
.tech-submit-btn {
    width: 100%;
    background: #0f172a;
    /* Dark button */
    color: #ffffff;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.tech-submit-btn:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.2);
}

.btn-glitch {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Override Panel Backgrounds for Light Theme */
.contact-side-panel {
    background: #ffffff !important;
    border-left: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .contact-side-panel {
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
}

.panel-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.panel-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

.panel-body {
    background: #ffffff !important;
}

.terminal-prompt {
    color: #0ea5e9 !important;
}

.panel-close-btn {
    color: #64748b !important;
}

.panel-close-btn:hover {
    color: #ef4444 !important;
    /* Red */
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .contact-side-panel .panel-header {
        height: 44px;
        padding: 0 1rem;
    }

    .contact-side-panel .panel-footer {
        height: 28px;
        gap: 0.75rem;
        padding: 0 1rem;
        font-size: 0.6rem;
    }

    .contact-side-panel .terminal-prompt {
        font-size: 0.75rem;
    }

    .contact-side-panel .section-padding {
        padding-block: 0.75rem;
    }

    .contact-side-panel .tech-theme {
        padding: 0.9rem 1rem;
    }

    .contact-side-panel .tech-header-block {
        margin-bottom: 0.75rem;
        padding-left: 1rem;
    }

    .contact-side-panel .tech-title {
        font-size: 1.1rem;
    }

    .contact-side-panel .tech-subtitle {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .contact-side-panel .tech-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .contact-side-panel .mb-5 {
        margin-bottom: 1rem;
    }

    .contact-side-panel .tech-form-group {
        margin-bottom: 0.75rem;
    }

    .contact-side-panel .tech-label {
        font-size: 0.7rem;
        margin-bottom: 0.35rem;
    }

    .contact-side-panel .tech-input {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }

    .contact-side-panel .tech-textarea {
        min-height: 120px;
    }

    .contact-side-panel .tech-submit-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Mobile-first tightening for small phones */
@media (max-width: 600px) {
    :root {
        --header-height: 64px;
        --spacing-lg: 3rem;
    }

    .container {
        padding: 0 1rem;
    }

    .logo-container {
        font-size: 1.2rem;
    }

    .theme-toggle-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .mobile-header-lang {
        margin-right: 1rem;
    }

    .hero {
        min-height: 100vh;
        min-height: 100svh;
        align-items: center;
        padding-top: var(--header-height);
        padding-bottom: 1.5rem;
        margin-bottom: 2rem;
    }

    .typewriter-container {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 2.1rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.75rem;
        line-height: 1.6;
    }

    .hero-actions {
        gap: 0.75rem;
    }

    .button {
        padding: 0.85rem 1.25rem;
        font-size: 0.85rem;
    }

    .section-padding {
        padding-block: 1.25rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .section-lead {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .services-grid,
    .values-grid,
    .stack-grid {
        gap: 1.25rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .card-header-split {
        margin-bottom: 1rem;
        font-size: 0.85rem;
    }

    .card-header-split h3 {
        font-size: 1rem;
    }

    .card-title {
        font-size: 1.35rem;
        margin-bottom: 0.75rem;
    }

    .card-desc {
        margin-bottom: 1rem;
    }

    .value-item {
        padding: 1.25rem;
    }

    .value-item h3 {
        font-size: 1.05rem;
    }

    .value-item p {
        font-size: 0.9rem;
    }

    .code-header {
        padding: 0.6rem 1rem;
    }

    .filename {
        font-size: 0.75rem;
    }

    .code-content {
        padding: 1.25rem;
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .contact-header {
        font-size: 1.5rem;
    }

    .contact-sub {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .contact-data {
        padding: 1.25rem;
        margin-bottom: 2rem;
    }

    .contact-row {
        font-size: 0.9rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.85rem;
        font-size: 0.95rem;
    }

    .mobile-nav {
        padding: 1.5rem;
        gap: 1rem;
    }

    .mobile-nav a {
        font-size: 1.3rem;
        line-height: 1.3;
        padding: 0.25rem 0;
    }

    .theme-toggle-btn.mobile {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }

    .tech-title {
        font-size: 1.2rem;
    }

    .tech-subtitle {
        font-size: 0.9rem;
    }

    .footer-usp {
        font-size: 1rem;
    }

    .footer-bottom {
        gap: 1rem;
    }
}

@media (max-width: 420px) {
    .hero-title {
        font-size: 1.9rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .button {
        font-size: 0.8rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .contact-header {
        font-size: 1.35rem;
    }
}

/* --- Unified Close Button [ X ] --- */
.btn-close-unified {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-close-unified:hover {
    color: #ef4444;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
}

/* Mobile nav toggle override when showing [ X ] */
.mobile-nav-toggle.is-close-mode {
    flex-direction: row;
    gap: 0;
}

/* --- Stack Section Enhancements --- */
.stack-section {
    position: relative;
    overflow: hidden;
    padding-bottom: 5rem;
}

/* Background glow for stack section */
.stack-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 240, 255, 0.03) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Enhanced Stack Card */
.stack-card-enhanced {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stack-card-enhanced:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent-primary);
    box-shadow: 0 10px 40px -10px rgba(0, 240, 255, 0.15);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.stack-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent-primary), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.stack-card-enhanced:hover::before {
    transform: scaleX(1);
}

.stack-icon-wrapper {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.1);
    color: var(--color-accent-primary);
    transition: all 0.3s ease;
}

.stack-card-enhanced:hover .stack-icon-wrapper {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    transform: scale(1.1) rotate(5deg);
}

.stack-icon-svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stack-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stack-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.stack-list li {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.6rem;
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.5;
}

.stack-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--color-accent-primary);
    opacity: 0.7;
    font-size: 0.8rem;
    top: 2px;
}

.stack-tools-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.stack-tool-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    transition: all 0.2s ease;
}

.stack-card-enhanced:hover .stack-tool-tag {
    color: var(--color-text-secondary);
    border-color: rgba(0, 240, 255, 0.2);
}

/* Full width card adjustment */
.stack-card-full-width {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
}

.stack-card-full-width .stack-icon-wrapper {
    width: 64px;
    height: 64px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.stack-card-full-width .stack-content {
    flex-grow: 1;
}

@media (max-width: 768px) {
    .stack-card-full-width {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .stack-card-full-width .stack-icon-wrapper {
        width: 48px;
        height: 48px;
    }
}