/* ==========================================================================
   DraughtsmanS Redesign - Design System & Custom Stylesheet
   ========================================================================== */

/* Design Tokens & Variables */
:root {
    --bg-primary: #080c14;
    --bg-secondary: #0f1524;
    --bg-card: rgba(15, 21, 36, 0.7);
    --bg-card-hover: rgba(22, 31, 53, 0.85);
    
    --accent: #00f0ff;
    --accent-rgb: 0, 240, 255;
    --accent-glow: rgba(0, 240, 255, 0.15);
    
    --accent-green: #39ff14;
    --accent-green-rgb: 57, 255, 20;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: rgba(30, 41, 59, 0.8);
    --border-hover: rgba(0, 240, 255, 0.4);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --glass-blur: blur(12px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Ambient CAD Background Grids */
.ambient-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(30, 41, 59, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0) 0%, rgba(8, 12, 20, 0.7) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Typography Utility Classes */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #a5f3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-accent {
    color: var(--accent) !important;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    width: 100%;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Navigation Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(8, 12, 20, 0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    height: 70px;
    background-color: rgba(8, 12, 20, 0.95);
    box-shadow: 0 10px 30px -10px rgba(0, 240, 255, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.logo span {
    color: var(--accent);
}

.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.25);
    background: rgba(0, 240, 255, 0.03);
    padding: 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-contact {
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 8px 16px !important;
    background: rgba(0, 240, 255, 0.05);
    color: var(--accent);
    font-weight: 600;
}

.btn-contact:hover {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-contact::after {
    display: none;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-primary);
    border: 1px solid var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent);
    box-shadow: none;
}

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

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 240, 255, 0.02);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 4px;
}

.btn-wa {
    background-color: #25d366;
    color: #fff;
    border: 1px solid #25d366;
}

.btn-wa:hover {
    background-color: transparent;
    color: #25d366;
}

.btn-block {
    width: 100%;
}

/* Sections */
.section {
    padding: 100px 0;
    border-bottom: 1px solid rgba(30, 41, 59, 0.3);
}

.section-tagline {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-center {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-subtitle {
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
}

.badge {
    display: inline-block;
    font-family: var(--font-mono);
    color: var(--accent);
    border: 1px solid var(--border-hover);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    background: rgba(0, 240, 255, 0.05);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 650px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.quick-stats {
    display: flex;
    align-items: center;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 35px;
    background-color: var(--border-color);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-arrow {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* About Section */
.about-section {
    position: relative;
}

.about-text h2 {
    margin-bottom: 24px;
}

.bullet-list {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bullet-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.bullet-icon {
    color: var(--accent);
    margin-top: 3px;
    display: flex;
}

.bullet-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

/* Blueprint Mockup Visual */
.interactive-blueprint {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.4);
}

.blueprint-header {
    background: #0b0f1a;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.blueprint-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.blueprint-dot.red { background-color: #ef4444; }
.blueprint-dot.yellow { background-color: #eab308; }
.blueprint-dot.green { background-color: #22c55e; }

.blueprint-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 12px;
}

.blueprint-body {
    position: relative;
    padding: 10px;
    background-color: #040810;
    aspect-ratio: 4/3;
    display: flex;
    flex-direction: column;
}

#blueprint-canvas {
    width: 100%;
    flex: 1;
    background-color: #02060f;
    border-radius: 6px;
    border: 1px dashed rgba(30, 41, 59, 0.6);
}

.blueprint-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-top: 10px;
}

.bp-btn {
    background: #0f172a;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-smooth);
}

.bp-btn:hover, .bp-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 240, 255, 0.05);
}

/* Services / offerings Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px 32px;
    transition: var(--transition-smooth);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

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

.service-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 240, 255, 0.08);
}

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

.service-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 28px;
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.service-card p {
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex: 1;
}

.service-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.service-link i {
    width: 16px;
    height: 16px;
    transition: var(--transition-smooth);
}

.service-card:hover .service-link i {
    transform: translateX(5px);
}

/* Calculators Hub Section */
.calc-hub-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
}

.calc-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #0a0f1b;
    border-bottom: 1px solid var(--border-color);
}

.calc-tab-btn {
    background: none;
    border: none;
    border-right: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    padding: 20px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.calc-tab-btn:last-child {
    border-right: none;
}

.calc-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 240, 255, 0.02);
}

.calc-tab-btn.active {
    color: var(--accent);
    background: var(--bg-secondary);
    box-shadow: inset 0 3px 0 var(--accent);
}

.calc-content-wrapper {
    padding: 40px;
}

.calc-tab-content {
    display: none;
}

.calc-tab-content.active {
    display: block;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

.calc-inputs h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.calc-desc {
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.form-control, .input-with-unit input {
    width: 100%;
    background-color: #080c14;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.input-with-unit input {
    padding-right: 45px;
}

.form-control:focus, .input-with-unit input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.input-with-unit .unit {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    pointer-events: none;
}

.radio-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radio-label {
    cursor: pointer;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-custom {
    display: block;
    text-align: center;
    border: 1px solid var(--border-color);
    background-color: #080c14;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.radio-label input:checked + .radio-custom {
    border-color: var(--accent);
    color: var(--accent);
    background-color: rgba(0, 240, 255, 0.05);
}

/* Calculator Output Area */
.calc-output-card {
    background-color: rgba(8, 12, 20, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.output-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.output-row span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.output-row strong {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    color: var(--text-primary);
}

/* Code Output Area */
.pat-code-box {
    background-color: #040810;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 24px;
}

.code-box-header {
    background-color: #0b0f1a;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-copy {
    background: none;
    border: none;
    color: var(--accent);
    font-family: var(--font-mono);
    cursor: pointer;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

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

.pat-code-box pre {
    padding: 16px;
    overflow-x: auto;
    max-height: 180px;
}

.pat-code-box code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #e2e8f0;
}

/* Calculator Visual Canvas Output */
.calc-visual {
    height: 100%;
}

.canvas-container {
    width: 100%;
    aspect-ratio: 1.1/1;
    background-color: #02060f;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.canvas-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* LISP Library Section */
.library-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 500px;
    min-width: 300px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}

.search-box input {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px 14px 48px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

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

.filter-btn.active {
    background-color: rgba(0, 240, 255, 0.08);
    border-color: var(--accent);
    color: var(--accent);
}

/* Scripts Library Grid */
.library-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.library-cta-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.library-cta-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    max-width: 650px;
    width: 100%;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.library-cta-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 30px 60px -15px rgba(0, 240, 255, 0.05);
}

.library-cta-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin: 0 auto 24px auto;
    font-size: 1.5rem;
}

.library-cta-card h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    font-family: var(--font-heading);
}

.library-cta-card p {
    font-size: 0.95rem;
    margin-bottom: 30px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

.script-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition-smooth);
}

.script-item:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.script-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.script-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.tag-lisp {
    background-color: rgba(0, 240, 255, 0.08);
    color: var(--accent);
    border: 1px solid rgba(0, 240, 255, 0.15);
}

.tag-vba {
    background-color: rgba(57, 255, 20, 0.08);
    color: var(--accent-green);
    border: 1px solid rgba(57, 255, 20, 0.15);
}

.script-name {
    font-size: 1.15rem;
    text-align: right;
    flex: 1;
    margin-left: 10px;
}

.script-desc {
    font-size: 0.9rem;
    margin-bottom: 24px;
    flex: 1;
}

.script-actions {
    display: flex;
    justify-content: flex-end;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(4, 6, 10, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

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

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 50px 100px -25px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.modal.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    background-color: #0b0f1a;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.modal-header h3 {
    font-size: 1.35rem;
    margin-top: 6px;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
}

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

.modal-body {
    padding: 24px;
}

.modal-body p {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.modal-body .pat-code-box pre {
    max-height: 300px;
}

/* Portfolio Section */
.portfolio-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    backdrop-filter: var(--glass-blur);
}

.portfolio-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.4);
}

.portfolio-card-img-wrapper {
    height: 160px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-img-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

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

.doc-dwg {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.doc-wa {
    background: rgba(37, 211, 102, 0.1);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.2);
}

.portfolio-card-info {
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.portfolio-card-info h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.portfolio-subtitle {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: 16px;
    display: block;
}

.portfolio-card-info p {
    font-size: 0.9rem;
    margin-bottom: 24px;
    flex: 1;
}

.portfolio-actions {
    display: flex;
    gap: 10px;
}

.portfolio-actions .btn {
    flex: 1;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.team-single-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.single-team-card {
    max-width: 400px;
    width: 100%;
}

.team-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 24px;
    text-align: center;
    transition: var(--transition-smooth);
    backdrop-filter: var(--glass-blur);
}

.team-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.team-avatar-wrapper {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.team-avatar {
    width: 80px;
    height: 80px;
    background-color: #0b0f1a;
    border: 2px dashed var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    transition: var(--transition-smooth);
}

.team-card:hover .team-avatar {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    background-color: rgba(0, 240, 255, 0.05);
}

.team-meta h4 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.team-meta .role {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    display: block;
    margin-bottom: 16px;
}

.team-meta p {
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background-color: rgba(0, 240, 255, 0.03);
}

/* Contact Section */
.contact-info h2 {
    margin-bottom: 24px;
}

.contact-details {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-detail-item {
    display: flex;
    gap: 16px;
    align-items: center;
}

.detail-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.contact-detail-item span {
    display: block;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
}

.contact-detail-item a, .contact-detail-item p {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-detail-item a:hover {
    color: var(--accent);
}

.contact-form {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.4);
}

.contact-form .form-group {
    margin-bottom: 24px;
}

.success-message-banner {
    background-color: rgba(57, 255, 20, 0.05);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 16px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    margin-top: 20px;
}

.success-message-banner.hide {
    display: none;
}

/* Footer Copyright */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 12px;
}

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

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

/* CSS Scroll-Driven entry reveals (IntersectionObserver animations fallback trigger) */
.wow {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.wow.animated {
    opacity: 1;
    transform: translateY(0);
}

.wow.fadeInLeft {
    transform: translateX(-40px);
}
.wow.fadeInLeft.animated {
    transform: translateX(0);
}

.wow.fadeInRight {
    transform: translateX(40px);
}
.wow.fadeInRight.animated {
    transform: translateX(0);
}

/* Delay modifiers */
.wow[data-delay="0.1s"] { transition-delay: 0.1s; }
.wow[data-delay="0.2s"] { transition-delay: 0.2s; }
.wow[data-delay="0.3s"] { transition-delay: 0.3s; }
.wow[data-delay="0.4s"] { transition-delay: 0.4s; }

/* Responsive Layout Media Queries */
@media (max-width: 1024px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid, .portfolio-cards-grid, .team-grid {
        grid-template-columns: 1fr;
    }
    
    .calc-tabs {
        grid-template-columns: 1fr 1fr;
    }
    
    .calc-tab-btn {
        border-bottom: 1px solid var(--border-color);
    }
    
    .calc-grid {
        grid-template-columns: 1fr;
    }
    
    .calc-content-wrapper {
        padding: 24px;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 24px;
        gap: 24px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition-smooth);
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .library-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-tabs {
        overflow-x: auto;
        padding-bottom: 5px;
    }
}
