@font-face {
    font-family: 'Axis Std';
    src: local('Axis Std Light'),
         url('/fonts/AxisStd-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Andale Mono';
    src: local('Andale Mono'),
         url('/fonts/AndaleMono.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Fira Code';
    src: url('https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/woff2/FiraCode-Light.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/woff/FiraCode-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

::selection {
    background: white;
    color: black;
}

::-moz-selection {
    background: white;
    color: black;
}

:root {
    --text-primary: #F2F2F2;
    --text-body: #A0A0A0;
    --text-secondary: #888888;
    --text-muted: #767676;
    --text-inactive: #555555;
}

body {
    font-family: 'Axis Std', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: black;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1 {
    font-family: 'Andale Mono', monospace !important;
    font-variant: small-caps !important;
    font-size: 1.5rem !important;
    line-height: 1.4 !important;
    word-spacing: -0.4em;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    margin-bottom: 2rem !important;
    margin-top: 0;
    color: var(--text-primary) !important;
}

#back-button {
    position: relative;
}

#back-button::before {
    content: 'Home';
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    padding: 0.35rem 0.65rem;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    font-family: 'Axis Std', sans-serif;
    font-size: 0.75rem;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 20;
}

#back-button::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0.75rem;
    margin-top: 0.25rem;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #444;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 21;
}

#back-button:hover::before,
#back-button:hover::after {
    opacity: 1;
}

.header-media-wrapper {
    position: relative;
    width: 100%;
    margin: 2rem 0 0.5rem 0;
    border-radius: 4px;
    overflow: hidden;
}

.header-image,
.header-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: opacity 0.5s ease-in-out;
}

.header-image.placeholder {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    z-index: 1;
}

.header-video {
    position: relative;
    opacity: 0;
    z-index: 2;
}

.header-video.loaded {
    opacity: 1;
}

.header-image.placeholder.fade-out {
    opacity: 0;
}

.content-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 2rem 0 0.5rem 0;
    border-radius: 4px;
}

.image-caption {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 2.5rem 0;
    font-style: italic;
}

h2 {
    font-family: 'Axis Std', sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.6;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h3 {
    font-family: 'Axis Std', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.4;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: #C0C0C0;
}

h2:first-of-type {
    margin-top: 2rem;
}

h2 + p,
h3 + p {
    margin-top: 0;
}

.container {
    max-width: 38rem;
    margin: 0 auto;
    padding: 2rem;
    opacity: 0; /* Initially hidden */
}

p {
    font-family: 'Axis Std', sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    margin-top: 0;
    letter-spacing: 0.01em;
    color: var(--text-body);
}

p strong {
    color: var(--text-primary);
}

ul {
    font-family: 'Axis Std', sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    margin-top: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
    color: var(--text-body);
}

li {
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

h4 {
    font-family: 'Axis Std', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

hr {
    border: none;
    border-top: 1px solid #333;
    margin: 3rem 0;
}

code {
    font-family: 'Fira Code', 'Andale Mono', monospace;
    font-size: 0.85em;
    background-color: #1a1a1a;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: #e0e0e0;
}

.code-block-wrapper {
    position: relative;
    margin: 1.5rem 0;
}

pre {
    font-family: 'Fira Code', 'Andale Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
    color: #e0e0e0;
}

.copy-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-block-wrapper:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background-color: #3a3a3a;
}

.copy-button:active {
    background-color: #4a4a4a;
}

.copy-button svg {
    display: block;
    width: 18px;
    height: 18px;
}

.copy-button::before {
    content: 'Copy';
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    padding: 0.35rem 0.65rem;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    font-family: 'Axis Std', sans-serif;
    font-size: 0.75rem;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 20;
}

.copy-button::after {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 0.75rem;
    margin-bottom: 0.25rem;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #444;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 21;
}

.copy-button:hover::before,
.copy-button:hover::after {
    opacity: 1;
}

.copy-button.copied {
    opacity: 1;
    background-color: #1a4a1a;
    border-color: #2a6a2a;
}

.copy-button.copied svg {
    fill: #4ade80;
}

.copy-button.copied::before {
    content: 'Copied!';
    background-color: #1a4a1a;
    border-color: #2a6a2a;
    color: #4ade80;
    opacity: 1;
}

.copy-button.copied::after {
    border-top-color: #2a6a2a;
    opacity: 1;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
    display: block;
}

/* Scrollable code block */
.code-block-wrapper.code-block-scrollable pre {
    max-height: 60vh;
    overflow-y: auto;
}

p + .code-block-wrapper,
ul + .code-block-wrapper,
.code-block-wrapper + p,
.code-block-wrapper + ul {
    margin-top: 1.5rem;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    display: inline;
    padding: 0 0.1em;
    transition: color 0.3s;
    z-index: 1;
    white-space: nowrap;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: white;
    transition: height 0.2s, bottom 0.2s;
    z-index: -1;
}

@media (hover: hover) {
    a:hover {
        color: black;
    }
    
    a:hover::after {
        height: calc(100% + 4px);
        bottom: -2px;
        background-color: white;
    }
}

.contact-links {
    font-size: 0.75rem;
    margin-top: 5rem;
}

.contact-links a {
    margin-right: 1rem;
}

.contact-links a:last-child {
    margin-right: 0;
}


footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4rem 0;
    margin-top: 4rem;
}

a.logo {
    display: inline-block;
    margin-bottom: 0.5rem;
    width: 27px;
    height: 30px;
    position: relative;
    cursor: pointer;
    padding: 0;
}

a.logo::after {
    display: none;
}

a.logo:hover {
    color: inherit;
}

a.logo .logo-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.65rem;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    font-family: 'Axis Std', sans-serif;
    font-size: 0.75rem;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 20;
}

a.logo .logo-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #444;
}

a.logo:hover .logo-tooltip {
    opacity: 1;
}

.logo svg {
    width: 100%;
    height: 100%;
    display: block;
}

.logo .mb-path {
    fill: #FFFFFF;
}

.footer-text {
    font-size: 0.65rem;
    line-height: 1.5;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.5rem;
}

/* Exclude Folders Input */
.exclude-folders-wrapper {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 200, 50, 0.08) 0%, rgba(255, 150, 50, 0.04) 100%);
    border: 1px solid rgba(255, 180, 50, 0.3);
    border-left: 3px solid rgba(255, 180, 50, 0.6);
    border-radius: 6px;
}

.exclude-folders-wrapper label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 200, 100, 0.9);
}

.exclude-folders-wrapper input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
    font-size: 0.85rem;
    color: #f2f2f2;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 180, 50, 0.25);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.exclude-folders-wrapper input:focus {
    border-color: rgba(255, 180, 50, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 180, 50, 0.1);
}

.exclude-folders-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.exclude-folders-hint {
    margin: 0.5rem 0 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

.exclude-folders-hint code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-size: 0.85em;
}

/* TV Turn-On Animation Styles */
#crt-line, #flash-circle {
    opacity: 0; /* Initially hidden */
}

/* Fallback for when JS is disabled */
.no-js .container {
    opacity: 1;
}

@media (min-width: 590px) {
    .nowrap-desktop {
        white-space: nowrap;
    }
}

/* Wider media elements on desktop */
@media (min-width: 769px) {
    .header-media-wrapper,
    .content-image {
        width: calc(100% + 6rem);
        margin-left: -3rem;
        margin-right: -3rem;
    }
    
    .header-media-wrapper {
        margin-top: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .content-image {
        margin-top: 2rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        max-width: 100%;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    pre {
        font-size: 0.75rem;
        padding: 1rem;
    }
    
    .copy-button {
        opacity: 1;
    }
    
    footer {
        padding: 2rem 0;
    }
}

/* Contact Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem 2rem 2rem 2rem;
    width: 90%;
    max-width: 420px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-family: 'Andale Mono', monospace;
    font-variant: small-caps;
    font-size: 1.5rem;
    line-height: 1.4;
    word-spacing: -0.4em;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-close svg {
    display: block;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contact-form input,
#contact-form textarea {
    font-family: 'Andale Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    outline: none;
    transition: border-color 0.2s ease;
    resize: vertical;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: var(--text-inactive);
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: #666;
}

#contact-form textarea {
    min-height: 100px;
}

/* Form field validation */
.form-field {
    position: relative;
    z-index: 1;
}

.form-field.error {
    z-index: 10;
}

.form-field input,
.form-field textarea {
    width: 100%;
    box-sizing: border-box;
}

.form-field.error input,
.form-field.error textarea {
    border-color: #a44;
}

.field-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    padding: 0.35rem 0.65rem;
    background-color: #1a1a1a;
    border: 1px solid #a44;
    border-radius: 4px;
    font-family: 'Axis Std', sans-serif;
    font-size: 0.75rem;
    color: #e88;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 20;
}

.field-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0.75rem;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #a44;
}

.form-field.error .field-tooltip {
    opacity: 1;
    visibility: visible;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.modal-buttons button {
    flex: 1;
    font-family: 'Andale Mono', monospace;
    font-size: 0.85rem;
    padding: 0.85rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

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

.btn-cancel:hover {
    border-color: #555;
    color: var(--text-primary);
}

.btn-send {
    background: #1a1a1a;
    border: 1px solid #444;
    color: var(--text-primary);
}

.btn-send:hover {
    background: #252525;
    border-color: #555;
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    text-align: center;
    padding: 2rem 0;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.modal-success.animate-in {
    opacity: 1;
    transform: scale(1);
}

.modal-success.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.modal-success p {
    font-family: 'Axis Std', sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Animated checkmark */
.success-checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #4ade80;
    stroke-miterlimit: 10;
    box-shadow: inset 0 0 0 #4ade80;
}

.success-checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #4ade80;
    fill: none;
}

.success-checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #4ade80;
    stroke-width: 3;
    stroke-linecap: round;
    fill: none;
}

.modal-success.animate-in .success-checkmark__circle {
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.modal-success.animate-in .success-checkmark__check {
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
} 