/* Global Styles & Resets */
html {
    scroll-behavior: smooth;
}

body {
    background-color: #0D1117;
    color: #e6edf3;
    font-family: 'Space Grotesk', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Text Selection */
::selection {
    background: #A3E635;
    color: #000;
}

::-moz-selection {
    background: #A3E635;
    color: #000;
}

/* Focus & Accessibility */
:focus-visible {
    outline: 2px solid #7C3AED;
    outline-offset: 2px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #0D1117;
}

::-webkit-scrollbar-thumb {
    background: #7C3AED;
    border-radius: 0;
}

/* Borders */
.technical-border {
    border: 2px solid #21262D;
}

.technical-border-hover:hover {
    border-color: #7C3AED;
    box-shadow: 4px 4px 0px #7C3AED;
    transform: translate(-2px, -2px);
    transition: all 0.2s ease;
}

.tag {
    padding: 2px 10px;
    border: 1px solid #21262D;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #a1a1aa;
    border-radius: 2px;
    transition: border-color 0.2s;
}

.tag:hover {
    border-color: #a1a1aa;
}

/* Backgrounds */
.grid-bg {
    background-image:
        linear-gradient(to right, #1C2129 1px, transparent 1px),
        linear-gradient(to bottom, #1C2129 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Text Effects */
.gradient-text {
    background: linear-gradient(90deg, #7C3AED, #a855f7);
    /* Standard property for browsers that support it */
    background-clip: text;
    /* Fallback for strict validators/browsers that don't support background-clip:text */
    color: transparent;
}

/* WebKit-only rules placed inside @supports to avoid validator warnings */
@supports (-webkit-background-clip: text) {
    .gradient-text {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #A3E635;
}

/* Material Icons */
.mi {
    font-family: 'Material Icons Outlined';
    font-size: 1.25rem;
    line-height: 1;
}

.mi-sm {
    font-size: 1rem;
}

.mi-lg {
    font-size: 1.5rem;
}

.mi-xl {
    font-size: 6rem;
}

/* Reading Card & Article Prose */
.reading-card {
    background: #fff;
    color: #111;
    border-radius: 0;
    border: 2px solid #e5e7eb;
}

.reading-card .article-body {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #1c1c1e;
}

.reading-card .article-body p {
    margin-bottom: 1.4em;
}

.reading-card .article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2em 0 0.6em;
}

.reading-card .article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.8em 0 0.5em;
}

.reading-card .article-body a {
    color: #7C3AED;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.reading-card .article-body code {
    background: #f4f4f5;
    padding: 0.1em 0.35em;
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
}

.reading-card .article-body pre {
    background: #161B22;
    color: #e4e4e7;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.875em;
    border-left: 3px solid #7C3AED;
}

.reading-card .article-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.reading-card .article-body blockquote {
    border-left: 4px solid #A3E635;
    padding-left: 1.25rem;
    margin: 1.5em 0;
    color: #555;
    font-style: italic;
}

/* Animations & Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(81, 43, 212, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(81, 43, 212, 0.8);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

.animate-pulse-dot {
    animation: pulse-dot 2s ease infinite;
}

/* Interactive Elements */
a {
    position: relative;
    text-decoration: none;
}

button,
a,
[role="button"] {
    transition: all 0.2s ease;
}

/* Form Elements */
input,
textarea,
select {
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #7C3AED;
}

/* Navigation Bar */
.nav-bar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    background: rgba(13, 17, 23, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid #21262D;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo-badge {
    width: 2rem;
    height: 2rem;
    background: #7C3AED;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

.nav-logo span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: bold;
    letter-spacing: -0.05em;
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.nav-desktop a {
    color: #e4e4e7;
    transition: color 0.2s ease;
}

.nav-desktop a:hover {
    color: #7C3AED;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-cta-button {
    display: none;
    background: #A3E635;
    color: black;
    padding: 0.5rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: bold;
    border: 2px solid transparent;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.nav-cta-button:hover {
    border-color: black;
    background: white;
}

@media (min-width: 768px) {
    .nav-cta-button {
        display: flex;
    }
}

.nav-contact-mobile {
    display: flex;
    background: #A3E635;
    color: black;
    padding: 0.5rem 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid transparent;
    align-items: center;
    transition: all 0.2s ease;
}

.nav-contact-mobile:hover {
    border-color: black;
}

@media (min-width: 768px) {
    .nav-contact-mobile {
        display: none;
    }
}

/* Mobile navigation controls wrapper (hamburger + contact shortcut) */
.nav-mobile-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .nav-mobile-controls {
        display: none;
    }
}

/* Hamburger button */
.nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: 1px solid #21262D;
    color: #e4e4e7;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-hamburger:hover {
    border-color: #7C3AED;
    color: #7C3AED;
}

/* Mobile dropdown menu */
.nav-mobile-menu {
    position: fixed;
    top: 5rem;
    left: 0;
    right: 0;
    z-index: 49;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid #21262D;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1.5rem 1.5rem;
}

.nav-mobile-menu a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: #e4e4e7;
    padding: 1rem 0;
    border-bottom: 1px solid #21262D;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-mobile-menu a:hover {
    color: #7C3AED;
}

.nav-mobile-cta {
    margin-top: 1rem;
    background: #A3E635;
    color: black !important;
    padding: 0.75rem 1rem !important;
    font-weight: bold;
    justify-content: center;
    border: 2px solid transparent !important;
}

.nav-mobile-cta:hover {
    border-color: black !important;
}

/* Layout Components */
.main-content {
    flex-grow: 1;
    padding-top: 5rem;
}

.footer {
    background: #0A0E14;
    padding-top: 5rem;
    padding-bottom: 2.5rem;
    border-top: 4px solid #7C3AED;
    margin-top: 0;
}

.footer-featured-card {
    background: #161B22;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid #21262D;
}

.footer-featured-card:hover {
    border-color: #7C3AED;
    box-shadow: 4px 4px 0px #7C3AED;
    transform: translate(-2px, -2px);
    transition: all 0.2s ease;
}

.footer-featured-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(124, 58, 237, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.footer-featured-card:hover::before {
    opacity: 1;
}

.footer-section-title {
    font-family: 'JetBrains Mono', monospace;
    color: #71717a;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.footer-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #d4d4d8;
    font-family: 'Space Grotesk', sans-serif;
}

.footer-nav-list a {
    transition: all 0.2s ease;
}

.footer-nav-list a:hover {
    color: #7C3AED;
    padding-left: 0.5rem;
}

.footer-social-links {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #21262D;
    transition: all 0.2s ease;
}

.footer-social-icon:hover {
    background: white;
    color: black;
}

.footer-copyright {
    padding-top: 2rem;
    border-top: 1px solid #21262D;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #71717a;
    font-family: 'JetBrains Mono', monospace;
}

@media (min-width: 768px) {
    .footer-copyright {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #7C3AED;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    transition: background 0.2s ease;
    font-size: 0.875rem;
}

.btn-primary:hover {
    background: rgba(124, 58, 237, 0.8);
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
}