/* Terminal Fonts - Modern Professional Theme
   ========================================= */

/* Import premium terminal fonts */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&family=Fira+Code:wght@300;400;500;600;700&family=Source+Code+Pro:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Root terminal font variables */
:root {
    --terminal-font-primary: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'Consolas', 'Monaco', 'Courier New', monospace;
    --terminal-font-secondary: 'Fira Code', 'JetBrains Mono', monospace;
    --terminal-font-code: 'Source Code Pro', 'Fira Code', monospace;
    --terminal-letter-spacing: 0.4px;
    --terminal-line-height: 1.6;
}

/* CRITICAL: Preserve ALL icon fonts - MAXIMUM PRIORITY */
i, 
[class*="icon"], 
[class*="bi-"], 
[class*="fa-"], 
[class*="fab-"], 
[class*="fas-"], 
[class*="far-"], 
[class*="fal-"], 
[class*="fat-"], 
[class*="fad-"], 
[class*="uil"], 
.fa, .fab, .fad, .fal, .far, .fas, .fat,
.icon, .bi,
/* Additional Font Awesome selectors */
.fa-brands, .fa-regular, .fa-solid, .fa-light, .fa-thin, .fa-duotone,
/* Social icons */
[class*="social-icon"],
/* Bootstrap icons */
.bi::before,
/* Any element with Font Awesome pseudo elements */
*[class*="fa-"]::before,
*[class*="bi-"]::before {
    font-family: inherit !important;
    font-style: normal !important;
    font-variant: normal !important;
    font-weight: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Force Font Awesome to use correct font with proper weights */
.fa, .fas, .fa-solid {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro", "FontAwesome" !important;
    font-weight: 900 !important;
}

.far, .fa-regular {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro", "FontAwesome" !important;
    font-weight: 400 !important;
}

.fal, .fa-light {
    font-family: "Font Awesome 6 Pro", "Font Awesome 5 Pro" !important;
    font-weight: 300 !important;
}

.fat, .fa-thin {
    font-family: "Font Awesome 6 Pro", "Font Awesome 5 Pro" !important;
    font-weight: 100 !important;
}

.fab, .fa-brands {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
}

.fad, .fa-duotone {
    font-family: "Font Awesome 6 Duotone", "Font Awesome 6 Pro" !important;
    font-weight: 900 !important;
}

/* Specific problematic icons */
.fa-chevron-right, .fa-solid.fa-chevron-right {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
}

/* Bootstrap Icons */
.bi, [class^="bi-"], [class*=" bi-"] {
    font-family: "bootstrap-icons" !important;
    font-weight: normal !important;
}

/* Reduce overall font size by 20% */
html {
    font-size: 80% !important;
}

/* Adjust specific typography sizes to maintain hierarchy */
h1 { font-size: 2.3rem !important; } /* Was 2.5rem */
h2 { font-size: 1.9rem !important; } /* Was 2rem */
h3 { font-size: 1.65rem !important; } /* Was 1.75rem */
h4 { font-size: 1.4rem !important; } /* Was 1.5rem */
h5 { font-size: 1.15rem !important; } /* Was 1.25rem */
h6 { font-size: 0.98rem !important; } /* Was 1rem */

/* Apply terminal font to specific text elements only */
body, 
html,
p:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]), 
h1:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]), 
h2:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]), 
h3:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]), 
h4:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]), 
h5:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]), 
h6:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]),
span:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]):not(i), 
div:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]):not([class*="social"]), 
a:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]):not([class*="social"]),
button:not([class*="icon"]):not([class*="bi-"]):not([class*="fa-"]):not([class*="uil"]) {
    font-family: var(--terminal-font-primary) !important;
    font-variant-ligatures: common-ligatures;
    text-rendering: optimizeLegibility;
    -webkit-font-feature-settings: "liga", "calt", "ss01", "ss02";
    -moz-font-feature-settings: "liga", "calt", "ss01", "ss02";
    font-feature-settings: "liga", "calt", "ss01", "ss02";
}

/* Enhanced font rendering */
body, html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
    letter-spacing: var(--terminal-letter-spacing);
    line-height: var(--terminal-line-height);
    text-size-adjust: 100%;
}

/* Typography hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--terminal-font-primary) !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
    line-height: 1.4;
}

h1 { font-size: 2.5rem; font-weight: 700 !important; }
h2 { font-size: 2rem; font-weight: 650 !important; }
h3 { font-size: 1.75rem; font-weight: 600 !important; }
h4 { font-size: 1.5rem; font-weight: 550 !important; }
h5 { font-size: 1.25rem; font-weight: 500 !important; }
h6 { font-size: 1rem; font-weight: 500 !important; }

/* Navigation and interactive elements */
.menu-link, .button, .nav-link, .btn, #brand, .primary-menu a {
    font-family: var(--terminal-font-primary) !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px;
    text-transform: none;
    font-size: 1.1rem !important; /* Increased navigation font size */
}

/* Top navigation specific styling */
.primary-menu .menu-link {
    font-size: 1.15rem !important;
    font-weight: 500 !important;
}

/* Button styling improvements */
.button, .btn {
    font-family: var(--terminal-font-primary) !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Code elements */
code, pre, .code-style, .terminal-text {
    font-family: var(--terminal-font-code) !important;
    font-weight: 400 !important;
    background: rgba(40, 44, 52, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(40, 44, 52, 0.2);
    color: #e06c75;
}

pre {
    background: rgba(40, 44, 52, 0.95);
    color: #abb2bf;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(40, 44, 52, 0.3);
    overflow-x: auto;
}

/* Paragraph text */
p {
    font-family: var(--terminal-font-primary) !important;
    font-weight: 400;
    letter-spacing: var(--terminal-letter-spacing);
    line-height: 1.7;
}

/* Form elements */
input, textarea, select {
    font-family: var(--terminal-font-primary) !important;
    font-weight: 400;
    letter-spacing: 0.2px;
    line-height: 1.5;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
    border: 2px solid rgba(40, 44, 52, 0.2);
    border-radius: 6px;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, textarea:focus {
    border-color: #777;
    outline: none;
    box-shadow: 0 0 0 3px rgba(119, 119, 119, 0.1);
}

/* Terminal cursor animation */
.terminal-cursor::after {
    content: '▋';
    animation: terminal-blink 1.2s infinite;
    color: #777;
    font-weight: 400;
}

@keyframes terminal-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Modern terminal prompt style */
.terminal-prompt::before {
    content: '$ ';
    color: #777;
    font-weight: 600;
    margin-right: 0.5rem;
}

/* Enhanced list styling */
ul, ol {
    font-family: var(--terminal-font-primary) !important;
    line-height: 1.8;
}

li {
    margin-bottom: 0.25rem;
    letter-spacing: 0.3px;
}

/* Table styling */
table {
    font-family: var(--terminal-font-primary) !important;
    font-variant-numeric: tabular-nums;
}

th {
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

td {
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* Quote and blockquote styling */
blockquote {
    font-family: var(--terminal-font-primary) !important;
    font-style: italic;
    font-weight: 400;
    border-left: 4px solid #777;
    padding-left: 1rem;
    margin-left: 0;
}

/* Link styling */
a {
    font-family: var(--terminal-font-primary) !important;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

a:hover {
    border-bottom-color: currentColor;
}

/* Small text */
small, .small {
    font-family: var(--terminal-font-primary) !important;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Badge and label styling */
.badge, .label {
    font-family: var(--terminal-font-secondary) !important;
    font-weight: 500 !important;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* Fix contact page font consistency */
section, .content-wrap, .container {
    font-family: var(--terminal-font-primary) !important;
}

/* Minimal icon centering - preserve original design */
.fbox-icon i {
    vertical-align: baseline !important;
    line-height: 1.4 !important;
    margin-top: 6px !important; /* Increased from 3px to 6px */
}

/* Fix duplicate social icons on mobile */
@media (max-width: 768px) {
    .social-icon i:nth-child(2) {
        display: none !important;
    }
    
    /* Make consultation text smaller on mobile */
    .heading-block span.d-block {
        font-size: 70% !important; /* 30% smaller */
        line-height: 1.4 !important;
    }
    
    /* Responsive font sizes */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    body {
        letter-spacing: 0.3px;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    code, pre {
        background: rgba(40, 44, 52, 0.9);
        color: #abb2bf;
        border-color: rgba(40, 44, 52, 0.5);
    }
}

/* Print styles */
@media print {
    * {
        font-family: 'JetBrains Mono', monospace !important;
        letter-spacing: 0.2px;
    }
}