/* 
   Kostadin Strandzhev - Infrastructure & Cloud Portfolio
   Redesign v3.0 — Inspired by shift5.io
*/

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;700;900&family=Inter:wght@400;700;900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    /* Color Palette - shift5.io Inspired */
    --primary: #F04E30; /* Aviation Orange */
    --bg-dark: #1A1B1C; /* Deep Charcoal */
    --bg-light: #F2F2F2; /* Cloud Gray */
    --text-on-dark: #FFFFFF;
    --text-on-light: #1A1B1C;
    --text-muted: #888888;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-light: rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-heading: 'Archivo', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Layout */
    --max-width: 1440px;
    --header-height: 80px;
    --space-unit: 1rem;
    --container-padding: 4rem;
}

[data-theme="light"] {
    --bg-dark: #F2F2F2;
    --text-on-dark: #1A1B1C;
    --border-color: rgba(0, 0, 0, 0.1);
}

/* ============================
   Base Styles
   ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important; /* Sharp corners everywhere */
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-on-dark);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden; /* Prevent horizontal scroll site-wide */
    width: 100%;
    position: relative;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

/* Industrial Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
}

/* ============================
   Typography
   ============================ */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
}

h1 {
    font-size: clamp(4rem, 15vw, 12rem);
}

h2 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 2rem;
}

.mono {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

/* ============================
   Sticky Navigation
   ============================ */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    background: transparent;
}

.sticky-nav.scrolled {
    background: rgba(26, 27, 28, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.sticky-nav .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--container-padding); /* Slightly tighter padding */
    width: 100%;
}

.sticky-nav .nav-logo {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.sticky-nav .mune-btn {
    margin-top: 0;
    color: #fff; /* Force white text for industrial look */
}

.sticky-nav .mune-btn span.mune-btn-lines span {
    background-color: #fff; /* Force white icon lines, but not text */
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-on-dark);
    cursor: pointer;
    font-size: 1rem;
}

/* ============================
   Hero Section
   ============================ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 65% 35%;
    background-color: var(--bg-dark);
}

.hero-left {
    background-color: var(--primary);
    color: #1A1B1C;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--container-padding);
    border-right: 1px solid rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.hero-left h1 {
    font-size: clamp(3rem, 9vw, 8rem);
    margin: 3rem 0;
    line-height: 0.85;
}

.hero-left .tagline {
    font-size: 1.5rem;
    max-width: 400px;
    font-weight: 700;
    text-transform: none;
    line-height: 1.2;
    margin-left: auto;
    margin-top: 2rem;
}

.hero-right {
    display: grid;
    grid-template-rows: 55% 45%;
}

.hero-top-right {
    background-color: var(--bg-light);
    color: #1A1B1C;
    padding: var(--container-padding);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.hero-top-right-bottom {
    font-size: 1.5rem;
    font-weight: 700;
    max-width: 300px;
    line-height: 1.2;
}

.hero-bottom-right {
    background-color: var(--bg-dark);
    color: var(--text-on-dark);
    padding: var(--container-padding);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Menu Button */
.mune-btn {
    align-self: flex-end;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0;
}

.mune-btn-lines {
    width: 30px;
    height: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mune-btn-lines span {
    width: 100%;
    height: 2px;
    background-color: currentColor; /* Use currentColor for flexibility */
}

.mune-btn-text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

/* System Status */
.system-status h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0;
}

.status-list {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    opacity: 0.8;
}

.status-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.status-list li::after {
    content: '.....';
    flex-grow: 1;
    margin: 0 0.5rem;
    text-align: right;
    letter-spacing: 2px;
}

.binary-code {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin-top: 2rem;
    opacity: 0.5;
    word-break: break-all;
    line-height: 1.4;
}

/* Hero Bottom Left Image */
.hero-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background-image: url('assets/hero-bg.png');
    background-size: cover;
    background-position: center bottom;
    filter: grayscale(100%) contrast(1.2);
    opacity: 0.5;
    z-index: 1;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-overlay.active {
    transform: translateY(0);
}

.menu-overlay .nav-logo {
    position: absolute;
    top: 2rem;
    left: 4rem;
    color: #1A1B1C;
}

.menu-close {
    position: absolute;
    top: 2rem;
    right: 4rem;
    background: none;
    border: none;
    font-size: 3rem;
    cursor: pointer;
    color: #1A1B1C;
}

.menu-links-large {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.menu-link-large {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    color: #1A1B1C;
    font-weight: 900;
    text-transform: uppercase;
}

.menu-link-large:hover {
    font-style: italic;
}

/* ============================
   Buttons
   ============================ */
.btn {
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1rem;
    border: 2px solid currentColor;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background-color: var(--text-on-dark);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-on-dark);
}

.hero-left .btn-primary {
    background-color: #000;
    color: var(--primary);
    border-color: #000;
}

.hero-left .btn-primary:hover {
    background-color: transparent;
    color: #000;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-on-dark);
}

.btn-secondary:hover {
    background-color: var(--text-on-dark);
    color: var(--bg-dark);
}

/* ============================
   Sections
   ============================ */
section {
    padding: 10rem var(--container-padding);
    border-bottom: 1px solid var(--border-color);
}

.section-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-mono);
    color: var(--primary);
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

/* ============================
   Content Components
   ============================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
}

.card {
    background-color: var(--bg-dark);
    padding: 3rem;
    transition: background-color 0.3s ease;
}

.card:hover {
    background-color: #222;
}

.card h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Timeline */
.timeline-item {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 200px 1fr;
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--primary);
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
}

.role-title {
    font-size: 1.5rem;
    color: var(--text-on-dark);
}

.company-name {
    color: var(--primary);
    font-family: var(--font-mono);
    margin-bottom: 1rem;
    display: block;
}

.role-list {
    margin-top: 1.5rem;
}

.role-list li {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    position: relative;
    padding-left: 1.5rem;
}

.role-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-family: var(--font-mono);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Moneytology Section */
.moneytology {
    background-color: #222;
    padding: 8rem var(--container-padding);
    text-align: center;
}

.moneytology h2 {
    color: #10b981; /* Keep the brand green */
}

/* ============================
   Footer
   ============================ */
/* ============================
   Footer Redesign (SHIFT5 Inspired)
   ============================ */
footer {
    background-color: var(--bg-dark);
    color: var(--text-on-dark);
    padding: 8rem var(--container-padding) 4rem;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr;
    gap: 4rem;
    position: relative;
    z-index: 2;
    margin-bottom: 6rem;
}

.footer-logo-section svg {
    color: var(--primary);
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

.footer-link-list li {
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.footer-link-list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease;
}

.footer-link-list a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-link-list .arrow {
    color: var(--primary);
    font-family: var(--font-mono);
    font-weight: 400;
}

.footer-mid {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10rem;
    position: relative;
    z-index: 2;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flag-icon {
    width: 30px;
    height: auto;
}

.footer-tagline {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    max-width: 200px;
    line-height: 1.4;
}

.footer-address {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-align: right;
    line-height: 1.6;
    color: var(--text-muted);
}

.footer-big-text {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: clamp(10rem, 25vw, 25rem);
    font-family: var(--font-heading);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    letter-spacing: -0.05em;
    width: 100%;
    overflow: hidden;
}

.footer-bottom-bar {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

.footer-legal-links {
    display: flex;
    gap: 3rem;
}

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

/* ============================
   Blog Navigation (Integrated)
   ============================ */
.blog-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--container-padding);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

/* ============================
   Mobile Footer
   ============================ */
@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-mid {
        flex-direction: column;
        align-items: flex-start;
        gap: 3rem;
    }
    .footer-address {
        text-align: left;
    }
    .footer-bottom-bar {
        flex-direction: column;
        gap: 1.5rem;
    }
    .footer-legal-links {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: #000;
    padding: 1rem;
    z-index: 10001;
}

.skip-link:focus {
    top: 0;
}

/* ============================
   Mobile Responsiveness
   ============================ */
@media (max-width: 768px) {
    :root {
        --container-padding: 1.5rem;
    }

    .sticky-nav .nav-container {
        padding: 1rem var(--container-padding);
    }

    .sticky-nav .nav-logo {
        font-size: 1rem;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    /* Stack hero sections */
    .hero-left {
        height: auto;
        padding: 6rem var(--container-padding) 4rem; /* More top padding for sticky nav */
        border-right: none;
        border-bottom: 2px solid var(--border-color);
    }

    .hero-right {
        grid-template-rows: auto auto;
    }

    .hero-left h1 {
        font-size: clamp(2.5rem, 12vw, 4rem);
        margin: 1.5rem 0;
    }

    .hero-left .tagline {
        margin-left: 0;
        margin-top: 1rem;
        max-width: 100%;
        line-height: 1.4;
    }

    .hero-top-right {
        padding: 3rem var(--container-padding);
        display: flex;
        justify-content: flex-start;
        border-bottom: 1px solid var(--border-color);
    }

    .mune-btn {
        margin-top: 0;
    }

    .hero-bottom-right {
        padding: 3rem var(--container-padding);
    }

    .status-list {
        gap: 1rem;
    }

    /* Section adjustments */
    .section-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-label {
        position: static;
        margin-bottom: 1rem;
        font-size: 0.7rem;
    }

    .section-content h2 {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

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

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Footer adjustments */
    footer {
        padding: 4rem var(--container-padding);
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-mid {
        flex-direction: column;
        align-items: flex-start;
        gap: 4rem;
        margin-bottom: 6rem;
    }

    .footer-big-text {
        font-size: clamp(3rem, 15vw, 6rem);
        bottom: 1rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 2rem;
        align-items: flex-start;
    }

    .legal-links {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .social-links {
        justify-content: flex-start;
        width: 100%;
    }

    /* Menu overlay mobile tweaks */
    .menu-content {
        padding: 4rem var(--container-padding);
    }

    .menu-link {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-left h1 {
        font-size: 2.5rem;
    }
    
    .binary-code {
        display: none; /* Hide binary on very small phones to save space */
    }
}