﻿/*
 * © 2026 Jaisal E. K. All Rights Reserved.
 */

@font-face {
    font-family: 'Switzer';
    src: url('../fonts/Switzer-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('../fonts/Switzer-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('../fonts/Switzer-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('../fonts/Switzer-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('../fonts/SourceSerif4-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('../fonts/SourceSerif4-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('../fonts/SourceSerif4-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/JetBrainsMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #F5F3EF;
    --text-color: #141414;
    --accent-color: #66023C;
    --accent-light: rgba(102, 2, 60, 0.1);
    --complementary-color: #1F4E3D;
    --card-bg: rgba(255, 255, 255, 0.6);
    --border-radius: 16px;
    --font-sans: 'Switzer', sans-serif;
    --font-serif: 'Source Serif 4', serif;
    --font-mono: 'JetBrains Mono', monospace;
    --selection-bg: #fbd714;
}

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

::selection {
    background-color: var(--selection-bg);
    color: var(--text-color);
    text-shadow: none;
}

::-moz-selection {
    background-color: var(--selection-bg);
    color: var(--text-color);
    text-shadow: none;
}

body {
    font-family: var(--font-serif);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, .btn {
    font-family: var(--font-sans);
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--complementary-color);
}

p code, li code {
    font-family: var(--font-mono);
    background-color: rgba(102, 2, 60, 0.08);
    color: var(--accent-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon-text {
    filter: brightness(0) invert(8%);
}

.icon-accent {
    filter: brightness(0) saturate(100%) invert(10%) sepia(31%) saturate(7479%) hue-rotate(309deg) brightness(98%) contrast(108%);
}

.icon-white {
    filter: brightness(0) invert(1);
}

.nav-link:hover .icon, .btn-secondary:hover .icon, .close-modal:hover .icon {
    filter: brightness(0) saturate(100%) invert(24%) sepia(18%) saturate(1914%) hue-rotate(112deg) brightness(97%) contrast(92%);
}

.btn-primary:hover .icon-white, .btn-primary-alt:hover .icon-white {
    filter: brightness(0) invert(1);
}

.nav-link .icon, .btn .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.card-icon .icon {
    width: 2rem;
    height: 2rem;
}

.close-modal .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.acrylic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg-color);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #C48B9F;
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: #E8B4B8;
    bottom: -150px;
    right: -100px;
    animation-delay: -10s;
}

.guilloche-overlay {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(102, 2, 60, 0.03) 10px, rgba(102, 2, 60, 0.03) 11px);
    opacity: 0.8;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(1.1); }
    100% { transform: translate(-30px, 50px) scale(0.9); }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    padding-bottom: 32px;
}

.header nav {
    display: flex;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--accent-color);
}

.logo img {
    width: 32px;
    height: 32px;
    filter: none;
}

.nav-link {
    color: var(--text-color);
    font-family: var(--font-sans);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero {
    text-align: center;
    padding-bottom: 40px;
}

.hero-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--complementary-color);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--accent-color);
}

.hero .subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 32px auto;
    color: #4A4A4A;
}

.cta-top {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.download-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.download-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.version-text {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: #4A4A4A;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--complementary-color);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 78, 61, 0.3);
}

.btn-primary-alt {
    background-color: var(--complementary-color);
    color: #FFFFFF;
}

.btn-primary-alt:hover {
    background-color: var(--accent-color);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 2, 60, 0.3);
}

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

.btn-secondary:hover {
    border-color: var(--complementary-color);
    color: var(--complementary-color);
    background-color: rgba(31, 78, 61, 0.05);
}

.align-bottom {
    margin-top: auto;
    align-self: flex-start;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 40px;
}

.bento-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-4px);
}

.bento-card.span-1 {
    grid-column: span 1;
}

.bento-card.span-2 {
    grid-column: span 2;
}

.bento-card.span-3 {
    grid-column: span 3;
}

.horizontal-layout {
    flex-direction: row;
    align-items: center;
}

.horizontal-layout .card-content {
    flex: 1;
}

.card-icon {
    margin-bottom: 16px;
}

.bento-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-color);
}

.bento-card p {
    color: #4A4A4A;
    margin-bottom: 24px;
}

.bento-card p a {
    font-weight: 500;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.topic-tag {
    background-color: rgba(102, 2, 60, 0.08);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
}

.topic-more {
    color: #6A6A6A;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    align-self: center;
    margin-left: 4px;
}

.fine-print {
    text-align: center;
    font-size: 0.85rem;
    color: #6A6A6A;
    margin-top: 40px;
    margin-bottom: 20px;
}

.fine-print a {
    color: #6A6A6A;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.fine-print a:hover {
    color: var(--accent-color);
}

.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(102, 2, 60, 0.1);
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

.footer a {
    font-weight: 400;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-container {
    background: var(--bg-color);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-container.markdown-container {
    max-width: 900px;
}

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

.modal-header {
    padding: 20px 32px;
    border-bottom: 1px solid rgba(102, 2, 60, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.4);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--accent-color);
}

.close-modal {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    transform: scale(1.1);
}

.modal-body {
    padding: 0;
    overflow: hidden;
}

.modal-body pre {
    padding: 32px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre;
    color: #333;
    margin: 0;
    overflow: auto;
    max-height: 60vh;
}

.markdown-body {
    padding: 32px;
    overflow-y: auto;
    max-height: 60vh;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: #333;
}

.markdown-body h1 {
    display: none;
}

.markdown-body h2:first-of-type {
    margin-top: 0;
}

.markdown-body h2, .markdown-body h3 {
    color: var(--accent-color);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.markdown-body h2 { font-size: 1.5rem; }
.markdown-body h3 { font-size: 1.25rem; }

.markdown-body p, .markdown-body ul, .markdown-body ol {
    margin-bottom: 1em;
    line-height: 1.6;
}

.markdown-body ul, .markdown-body ol {
    padding-left: 24px;
}

.markdown-body li {
    margin-bottom: 0.25em;
}

.markdown-body pre {
    background: #e8e6e1;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5em;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
    color: #141414;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .bento-grid { display: flex; flex-direction: column; }
    .bento-card.span-1, .bento-card.span-2, .bento-card.span-3 { grid-column: span 1; }
    .horizontal-layout { flex-direction: column; align-items: flex-start; }
    .horizontal-layout .card-content { padding-right: 0; }
    .header nav { gap: 12px; }
    .modal-body pre, .markdown-body { padding: 20px; max-height: 70vh; }
    .download-group { flex-direction: column; width: 100%; align-items: stretch; }
}

@media (orientation: landscape) and (min-width: 768px) {
    .hero-intro {
        min-height: calc(100vh - 100px);
        min-height: calc(100svh - 100px);
    }
}