:root {
    --primary-bg: #121418;
    --primary-text: #f5f5f5;
    --secondary-text: #d4d4d4;
    --accent: #2a2e35;
    --highlight: rgba(255, 255, 255, 0.05);
    --stair-color-1: rgba(42, 46, 53, 0.8);
    --stair-color-2: rgba(60, 64, 70, 0.8);
    --stair-accent: rgba(80, 84, 90, 0.9);
    --code-color: #D7E293;
}

/* Debug overlay */
#debug-overlay {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    z-index: 9999;
    max-width: 300px;
    max-height: 200px;
    overflow: auto;
    opacity: 0.7;
    pointer-events: none;
}

#debug-overlay.hidden {
    display: none;
}

/* Social media buttons styles */
.social-links {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    justify-content: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 4px;
    border: 1px solid var(--highlight);
    transition: all 0.3s ease;
    padding: 6px;
}

.social-icon:hover {
    background: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: var(--code-color);
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.social-icon:hover img {
    filter: brightness(0) invert(1) brightness(1.2);
}

/* Action buttons styles */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: stretch;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    width: 100%;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    background: var(--accent);
    border: 1px solid var(--highlight);
    border-radius: 4px;
    color: var(--primary-text);
    font-family: 'Fira Mono', monospace;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex: 1;
    min-height: 48px;
}

.action-btn:hover {
    background: var(--primary-bg);
    border-color: var(--code-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.action-btn .btn-icon {
    margin-right: 8px;
    font-size: 1.1rem;
    color: var(--code-color);
}

.action-btn .btn-text {
    color: var(--secondary-text);
    transition: color 0.3s ease;
}

.action-btn:hover .btn-text {
    color: var(--primary-text);
}

/* Back button styles */
.back-btn {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.5rem;
    background: var(--accent);
    border: 1px solid var(--highlight);
    border-radius: 4px;
    color: var(--primary-text);
    font-family: 'Fira Mono', monospace;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    opacity: 0;
    width: auto;
    height: 2rem;
}

.back-btn:hover {
    background: var(--primary-bg);
    border-color: var(--code-color);
    transform: translateX(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.back-btn .btn-icon {
    margin-right: 6px;
    font-size: 1rem;
    color: var(--code-color);
}

/* Cases view styles */
.page-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 2rem 0;
}

.page-view.active {
    opacity: 1;
    pointer-events: auto;
}

/* Content container styles for the new structure */
.content-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(800px, 90vw);
    margin: 0 auto;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding-top: 2rem;
}

.content-container .content-wrapper {
    width: 100%;
    background: var(--accent);
    border-radius: 8px;
    border: 1px solid var(--highlight);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    margin-top: 0.5rem;
}

.case-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: min(800px, 90vw);
    margin-top: 2rem;
}

.case-tile {
    background: var(--accent);
    border: 1px solid var(--highlight);
    border-radius: 6px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 250px; /* Increased height to accommodate more text */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    opacity: 0;
}

.case-tile > div:first-child {
    display: flex;
    flex-direction: column;
    height: 170px; /* Increased height for content area */
}

.case-tile .case-logo {
    width: 120px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: all 0.3s ease;
    object-position: left;
    align-self: flex-start;
}

.case-tile .case-title {
    font-size: 1.1rem;
    color: var(--primary-text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    height: 3.9rem; /* Increased height for title (3 lines) */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Increased from 2 to 3 lines */
    -webkit-box-orient: vertical;
}

.case-tile .case-description {
    font-size: 0.8rem;
    color: var(--secondary-text);
    margin-bottom: 1rem;
    line-height: 1.4;
    height: 5.6rem; /* Increased height for description (4 lines) */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Increased from 3 to 4 lines */
    -webkit-box-orient: vertical;
}

.case-tile > div:last-child {
    min-height: 30px; /* Slightly increased min-height for tag container */
}

.case-tile:hover {
    transform: translateY(-5px);
    border-color: var(--code-color);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.case-tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 46, 53, 0.3), transparent);
    pointer-events: none;
}

.case-tag {
    display: inline-block;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    color: var(--code-color);
    margin-right: 5px;
    margin-bottom: 5px;
}

.case-detail {
    width: 100%;
    max-width: min(800px, 90vw);
    margin: 1.5rem auto;
    padding: 1rem;
    background: var(--accent);
    border-radius: 8px;
    border: 1px solid var(--highlight);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    display: none;
    opacity: 0;
}

#case-detail-content {
    padding-top: 2rem;
}

#case-detail-content .case-detail {
    opacity: 1;
}

/* Make case-detail visible on individual project pages */
#main-content .case-detail {
    display: block;
    opacity: 1;
}

.case-detail-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--highlight);
    padding-bottom: 1rem;
}

.case-detail-header h2.case-title {
    margin-left: 0.2rem;
    padding-left: 0;
}

.case-detail-content {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--secondary-text);
}

.case-detail-content p {
    margin-bottom: 1rem;
}

.case-detail-content img {
    max-width: 100%;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Add styles for lists in case detail content */
.case-detail-content ul {
    padding-left: 1rem;
    margin-bottom: 1rem;
    list-style-position: outside;
}

.case-detail-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    color: var(--secondary-text);
}

.case-detail-content li:last-child {
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .case-tiles {
        grid-template-columns: 1fr;
    }
    
    .back-btn {
        top: 0.5rem;
        left: 0.5rem;
    }

    .content-container {
        padding-top: 0rem;
    }
    
    /* Add bottom padding to case detail view */
    #case-detail-content .content-wrapper {
        padding-bottom: 4rem;
    }
    
    /* Stack action buttons vertically on mobile */
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
}

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

body {
    font-family: 'Fira Mono', monospace;
    background-color: var(--primary-bg);
    min-height: 100vh;
    overflow-y: auto;
    color: var(--primary-text);
    line-height: 1.4;
    font-size: 14px;
}

.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2rem 0;
}

.stairs-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.stair {
    position: absolute;
    opacity: 0;
    background-color: var(--stair-color-1);
    border-radius: 2px;
    transform-origin: center;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    will-change: transform, opacity;
    width: 12px;
    height: 12px;
}

.stair.active {
    opacity: 0.8;
}

.stair::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--stair-color-2), transparent);
    opacity: 0.6;
}

.grid-stair {
    position: absolute;
    opacity: 0.2;
    background-color: var(--stair-color-1);
    border-radius: 2px;
    transform-origin: center;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    will-change: opacity;
    width: 8px;
    height: 8px;
    transition: opacity 0.3s ease;
}

.grid-stair:hover {
    opacity: 0.5;
}

.logo-container {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto 0.5rem;
    opacity: 1;
    transform: none;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.terminal-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
    font-family: 'Fira Mono', monospace;
    font-size: 0.85rem;
    position: relative;
    height: 2rem;
    border-left: 2px solid var(--code-color);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.terminal-time {
    color: var(--code-color);
    opacity: 0.8;
    padding-right: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 1rem;
    min-width: 5rem;
    text-align: left;
}

.terminal-command {
    color: var(--primary-text);
    flex-grow: 1;
}

.terminal-prompt {
    color: var(--code-color);
    margin-right: 0.5rem;
}

.terminal-cmd {
    color: var(--primary-text);
}

.terminal-directory {
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
    font-style: italic;
    font-size: 0.75rem;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--code-color);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.story {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--secondary-text);
    margin: 0.5rem 0;
    opacity: 0;
    transform: translateY(20px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.story p {
    transition: all 0.3s ease;
    margin-bottom: 0.6rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    position: relative;
}

.story p:hover {
    color: var(--primary-text);
    background: var(--highlight);
    transform: translateX(5px);
}

.story .highlight-box {
    border-left: 2px solid var(--code-color);
    padding-left: 0.5rem;
    margin: 0.6rem 0;
    position: relative;
    font-size: 0.8rem;
}

.story .highlight-box::before {
    content: '';
    position: absolute;
    left: 0.2rem;
    color: var(--code-color);
    font-weight: bold;
}

.story .key-point {
    font-size: 0.9em;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 0.6rem;
    margin: 0.6rem 0;
}

.story .emphasis {
    color: var(--code-color);
    font-style: bold;
}

.story strong {
    color: var(--primary-text);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.story .bullet-points {
    padding-left: 0.6rem;
    margin: 0.6rem 0;
}

.story .bullet-points span {
    display: inline-block;
    margin-right: 0.3rem;
    color: var(--code-color);
}

.signature {
    margin-top: 0.8rem;
    padding-top: 0.5rem;
    color: var(--secondary-text);
    font-size: 0.75rem;
    border-top: 1px solid var(--highlight);
    text-align: right;
}

.contact {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    font-size: 0.7rem;
    z-index: 10;
    background: var(--accent);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--highlight);
    transition: all 0.3s ease;
    opacity: 1;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact:hover {
    background: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact a {
    color: var(--secondary-text);
    text-decoration: none;
    transition: color 0.3s ease;
    text-align: center;
}

.contact a:hover {
    color: var(--code-color);
}

@media (max-height: 480px) {
    .container {
        min-height: auto;
        padding: 0.5rem;
        height: auto;
        overflow-y: auto;
    }

    .logo-container {
        margin-top: 0.5rem;
    }

    .content-wrapper {
        margin: 0.5rem auto;
    }

    .contact {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 0.4rem;
        text-align: center;
        border-radius: 0;
        z-index: 50;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
    }

    .story {
        font-size: 0.8rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    body {
        overflow-y: auto;
    }

    .container {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        padding: 1rem 0 4rem; /* Increased bottom padding */
        justify-content: flex-start;
    }

    .logo-container {
        margin: 0.5rem auto 1rem;
    }

    .logo {
        width: 160px;
        height: 160px;
    }

    .content-wrapper {
        padding: 0.8rem;
        margin-bottom: 4rem; /* Keep space at bottom for fixed social bar */
    }

    .terminal-block {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 0.5rem;
    }

    .terminal-time {
        border-right: none;
        margin-bottom: 0.3rem;
        padding-right: 0;
    }

    .terminal-directory {
        margin-top: 0.3rem;
    }

    .contact {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0.6rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
        transform: none;
        z-index: 50;
    }

    .contact:hover {
        transform: none;
    }
}

/* Language toggle styles */
.language-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    background: var(--accent);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--highlight);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.language-toggle:hover {
    background: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: var(--code-color);
}

.language-btn {
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    user-select: none;
    font-weight: bold;
    color: var(--secondary-text);
    padding: 0 5px;
}

.language-btn.active {
    opacity: 1;
    transform: scale(1.1);
    color: var(--code-color);
}

/* Add responsive styles for language toggle */
@media (max-width: 480px) {
    .language-toggle {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.3rem 0.5rem;
    }
    
    /* Ensure back button doesn't overlap with language toggle on mobile */
    .back-btn {
        top: 3rem;
        left: 0.5rem;
    }
}

/* Add logo styles for cases */
.case-logo {
    width: 120px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: all 0.3s ease;
    object-position: left;
    align-self: flex-start;
}

.case-tile:hover .case-logo {
    opacity: 1;
    transform: scale(1.05);
}

.case-detail-header .case-logo {
    width: 150px;
    height: 75px;
    margin-bottom: 20px;
    margin-top: 5px;
    opacity: 0.9;
    object-position: left;
    align-self: flex-start;
}

@media (max-width: 480px) {
    .case-logo {
        width: 100px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .case-detail-header .case-logo {
        width: 120px;
        height: 60px;
        margin-bottom: 15px;
    }
}

/* Enhanced project page styles */
.project-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(42, 46, 53, 0.5);
    border-radius: 8px;
    border: 1px solid var(--highlight);
}

.project-section h3 {
    color: var(--code-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--highlight);
    padding-bottom: 0.5rem;
}

/* Metrics grid for displaying KPIs */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.metric-card {
    background: var(--accent);
    border: 1px solid var(--highlight);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--code-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--code-color);
    display: block;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-change {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    background: rgba(42, 46, 53, 0.8);
}

.metric-change.positive {
    color: #4ade80;
}

.metric-change.negative {
    color: #f87171;
}

/* Chart container styles */
.chart-container {
    background: var(--accent);
    border: 1px solid var(--highlight);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-title {
    font-size: 1rem;
    color: var(--primary-text);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: bold;
}

.chart-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, 
        rgba(42, 46, 53, 0.3) 25%, 
        transparent 25%), 
        linear-gradient(-45deg, 
        rgba(42, 46, 53, 0.3) 25%, 
        transparent 25%);
    background-size: 20px 20px;
    border: 2px dashed var(--highlight);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
    font-size: 0.9rem;
    text-align: center;
    position: relative;
}

.chart-placeholder::before {
    content: "📊";
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Simple bar chart styles */
.simple-chart {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 20px 1rem 60px 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    position: relative;
    box-sizing: border-box;
}

.chart-bar {
    background: linear-gradient(to top, var(--code-color), rgba(215, 226, 147, 0.6));
    width: 40px;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.chart-bar:hover {
    background: linear-gradient(to top, var(--primary-text), rgba(255, 255, 255, 0.6));
    transform: scaleY(1.05);
}

.chart-bar-value {
    position: absolute;
    bottom: -30px;
    font-size: 0.75rem;
    color: var(--primary-text);
    font-weight: bold;
    width: 100%;
    text-align: center;
}

.chart-bar-label {
    position: absolute;
    bottom: -50px;
    font-size: 0.7rem;
    color: var(--secondary-text);
    text-align: center;
    white-space: nowrap;
    width: 100%;
}

/* Technical diagram placeholder */
.tech-diagram {
    background: #171717;
    border: 1px solid var(--highlight);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tech-diagram-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, 
        rgba(42, 46, 53, 0.3) 0%, 
        rgba(60, 64, 70, 0.2) 50%, 
        rgba(80, 84, 90, 0.1) 100%);
    border: 2px dashed var(--highlight);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Tech diagram image styles */
.tech-diagram-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--highlight);
}

.tech-diagram-image:hover {
    transform: scale(1.02);
    border-color: var(--code-color);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.tech-diagram-image:hover::after {
    content: "🔍 Click to view full-screen";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 10;
}

/* Full-screen modal styles */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.fullscreen-modal.active {
    display: flex;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: var(--primary-text);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary-text);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    text-align: center;
}

.tech-diagram-placeholder::before {
    content: "🏗️";
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.tech-diagram-title {
    font-size: 1.1rem;
    color: var(--primary-text);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: bold;
}

.tech-diagram-description {
    font-size: 0.85rem;
    color: var(--secondary-text);
    text-align: center;
    max-width: 300px;
    line-height: 1.4;
}

/* Results showcase section */
.results-showcase {
    background: linear-gradient(135deg, 
        rgba(42, 46, 53, 0.8) 0%, 
        rgba(60, 64, 70, 0.6) 100%);
    border-left: 4px solid var(--code-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.results-showcase h4 {
    color: var(--code-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* ROI indicator */
.roi-indicator {
    display: inline-flex;
    align-items: center;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.roi-indicator::before {
    content: "💰";
    margin-right: 0.5rem;
}

/* Timeline styles */
.implementation-timeline {
    position: relative;
    margin: 2rem 0;
    padding-left: 2rem;
}

.implementation-timeline::before {
    content: '';
    position: absolute;
    left: 0.4rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--highlight);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.85rem;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: var(--code-color);
    border-radius: 50%;
    border: none;
}

.timeline-item h5 {
    color: var(--primary-text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.timeline-item p {
    color: var(--secondary-text);
    font-size: 0.85rem;
    margin: 0;
}

/* ROI Calculator Styles - Override content wrapper constraints */
.roi-calculator-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
    width: 95%;
}

/* Override content-wrapper constraints for ROI calculator page */
.roi-calculator-container .content-wrapper,
.roi-calculator-container ~ .content-wrapper,
body:has(.roi-calculator-container) .content-wrapper {
    max-width: none;
    width: 100%;
}

/* Target the specific content container on ROI calculator page */
.content-container:has(.roi-calculator-container) {
    max-width: none;
    width: 100%;
    padding: 0 2rem;
}

.content-container:has(.roi-calculator-container) .content-wrapper {
    max-width: none;
    width: 100%;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header h2 {
    color: var(--code-color);
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.calculator-header p {
    color: var(--secondary-text);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.calculator-form {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-section {
    background: var(--accent);
    border: 1px solid var(--highlight);
    border-radius: 8px;
    padding: 1.2rem;
}

.form-section h3 {
    color: var(--code-color);
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slider-group {
    margin-bottom: 1.2rem;
}

.slider-item {
    margin-bottom: 1.2rem;
}

.slider-item label {
    display: block;
    color: var(--primary-text);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--highlight);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    opacity: 0.8;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--code-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-text);
    transform: scale(1.1);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--code-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.slider-container input[type="range"]::-moz-range-track {
    background: var(--highlight);
    height: 6px;
    border-radius: 3px;
}

.slider-value {
    background: var(--secondary-bg);
    color: var(--code-color);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-weight: bold;
    min-width: 55px;
    text-align: center;
    border: 1px solid var(--highlight);
    font-size: 0.95rem;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.input-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
}

.input-item label {
    color: var(--primary-text);
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 1rem;
}

.input-item input {
    background: var(--secondary-bg);
    border: 1px solid var(--highlight);
    border-radius: 4px;
    padding: 0.6rem;
    color: var(--primary-text);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-item input:focus {
    outline: none;
    border-color: var(--code-color);
    background: var(--primary-bg);
}

.results-section {
    background: var(--accent);
    border: 1px solid var(--highlight);
    border-radius: 8px;
    padding: 1.2rem;
}

.results-section h3 {
    color: var(--code-color);
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.result-card {
    background: var(--secondary-bg);
    border: 1px solid var(--highlight);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-card:hover {
    border-color: var(--code-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.result-card.primary {
    background: transparent;
    color: var(--primary-text);
    border: 2px solid #4ade80;
}

.result-card.primary .result-label {
    color: var(--secondary-text);
    opacity: 1;
}

.result-icon {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    display: block;
}

.result-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-text);
    margin-bottom: 0.4rem;
    transition: all 0.2s ease;
}

.result-value.positive {
    color: #4ade80;
}

.result-value.negative {
    color: #f87171;
}

.result-card.primary .result-value {
    color: #4ade80;
}

.result-label {
    color: var(--secondary-text);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.summary-section {
    margin-top: 1.2rem;
}

.summary-card {
    background: var(--primary-bg);
    border: 1px solid var(--code-color);
    border-radius: 6px;
    padding: 1rem;
}

.summary-card h4 {
    color: var(--code-color);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--highlight);
    font-size: 0.9rem;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1rem;
}

.summary-label {
    color: var(--primary-text);
}

.summary-value {
    color: var(--primary-text);
    font-weight: bold;
}

.summary-value.positive {
    color: #4ade80;
}

.summary-value.negative {
    color: #f87171;
}

.cta-section {
    background: linear-gradient(135deg, var(--secondary-bg), var(--accent));
    border: 1px solid var(--highlight);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    margin-top: 3rem;
}

.cta-content h3 {
    color: var(--code-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--secondary-text);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    background: transparent;
    color: #4ade80;
    border: 2px solid #4ade80;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-btn:hover {
    background: #4ade80;
    color: var(--secondary-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.cta-btn.secondary {
    background: transparent;
    color: var(--code-color);
    border: 2px solid var(--code-color);
}

.cta-btn.secondary:hover {
    background: var(--code-color);
    color: var(--secondary-bg);
}

/* Large screen optimization for ROI calculator */
@media (min-width: 1200px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
    }
}

@media (min-width: 1400px) {
    .results-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 100%;
    }
}

/* Mobile responsiveness for ROI calculator */
@media (max-width: 768px) {
    .calculator-form {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .input-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-section, .results-section {
        padding: 1.5rem;
    }
    
    .cta-section {
        padding: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .slider-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .slider-value {
        align-self: flex-end;
    }
}

/* Mobile responsiveness for enhanced elements */
@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .chart-container {
        padding: 1rem;
        min-height: 200px;
    }
    
    .simple-chart {
        height: 150px;
        padding: 0.5rem 0;
    }
    
    .chart-bar {
        width: 30px;
    }
    
    .tech-diagram {
        padding: 1rem;
        min-height: 250px;
    }
    
    .tech-diagram-placeholder {
        height: 200px;
    }
    
    .project-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .calculator-header h2 {
        font-size: 1.5rem;
    }
    
    .result-value {
        font-size: 1.4rem;
    }
}