/* ==========================================================================
   1. Root, Basic & General Styles
   ========================================================================== */
:root {
    --primary-bg: hsl(236, 60%, 6%);
    --secondary-bg: hsl(248, 50%, 19%);
    --card-bg: hsla(0, 0%, 100%, 0.03);
    --text-primary: hsl(0, 0%, 94%);
    --text-secondary: hsl(0, 0%, 85%);
    --text-muted: hsl(240, 40%, 77%);
    --accent:  #00ccaa;
    --accent1: #00ccbb;
    --accent-pink: hsla(326, 87%, 68%, 0.2);
    --accent-blue: hsla(225, 94%, 65%, 0.2);
    --code-bg: rgba(20, 20, 40, 0.7);
    --gaph: clamp(0.75rem, 2vw, 1.5rem);
    --gapv: clamp(3rem, 2vw, 5rem);
    --padding: clamp(1rem, 3vw, 1.25rem);
    --border-radius: 10px;
    --transition: 0.3s ease;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --white: #fff;
    --shadow-color-dark: rgba(0, 0, 0, 0.5);
    --accent-hover: rgba(138, 92, 248, 0.1);
    --code-number-color: #777;
    --code-keyword-color: #ff79c6;
    --code-string-color: #f1fa8c;
    --code-function-color: #50fa7b;
    --code-comment-color: #6272a4;
    --transparent: rgba(255, 255, 255, 0);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-60: rgba(255, 255, 255, 0.6);
    --white-100: rgba(255, 255, 255, 1);
    --white-10: rgba(255, 255, 255, 0.1);
    --white-34: rgba(255, 255, 255, 0.34);
    --white-3: rgba(255, 255, 255, 0.03);
    --accent-20: rgba(138, 92, 248, 0.2);
    --accent-40: rgba(138, 92, 248, 0.4);
    --accent-pink-glow: hsla(328, 98%, 70%, 0.98);
    --browser-mockup-bg: rgba(20, 20, 40, 0.3);
    --black: black;
    --border-color-light: #ddd;
    --textarea-bg: rgba(20, 20, 40, 0.5);
    --accent-border: rgba(138, 92, 248, 0.2);
    --textarea-focus-bg: rgba(20, 20, 40, 0.7);
    --accent-shadow: rgba(138, 92, 248, 0.1);
    --accent-border-hover: rgba(138, 92, 248, 0.4);
    --accent-gradient-end: #9f6ff8;
    --accent-shadow-light: rgba(138, 92, 248, 0.2);
    --accent-shadow-dark: rgba(138, 92, 248, 0.3);
    --btn-secondary-bg: rgba(255, 255, 255, 0.05);
    --btn-secondary-border: rgba(255, 255, 255, 0.1);
    --accent-gradient-start-50: rgba(138, 92, 248, 0.5);
    --btn-secondary-hover-bg: rgba(255, 255, 255, 0.08);
    --btn-secondary-hover-border: rgba(138, 92, 248, 0.1);
    --btn-secondary-active-bg: rgba(255, 255, 255, 0.03);
    --white-30: rgba(255, 255, 255, 0.3);
    --white-1: rgba(255, 255, 255, 0.01);
    --transparent-color: transparent;
    --current-color: currentColor;
    --link-visited: rgba(138, 92, 248, 0.8);
    --card-link-visited: rgba(221, 221, 221, 0.8);
    --hand-lettered-bg: rgba(255, 255, 255, 0.02);
    --light-theme-text-muted: #505070;
    --light-theme-code-bg: rgba(230, 230, 250, 0.7);
    --brand-text: #fff
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.4s ease, color 0.34s ease, border-color 0.34s ease;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: var(--padding);
    background: var(--primary-bg);
    background-image:
        radial-gradient(farthest-side at 63% 35%, var(--secondary-bg) 17.6%, var(--primary-bg) 97.9%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ==========================================================================
   2. Animations
   ========================================================================== */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0% {
        opacity: 0.6;
    }

    25% {
        opacity: 1;
    }

    75% {
        opacity: 0.2
    }

    100% {
        opacity: 0.6
    }
}

@keyframes pulse-glow1 {
    0% {
        opacity: 0.1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0.1
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   3. Layout
   ========================================================================== */
.container {
    max-width: 1800px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(min(250px, 50vh), auto);
    column-gap: var(--gaph);
    row-gap: var(--gapv);
}

.slogan {
    font-size: clamp(1.6rem, 5vw, 2.8rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-top: clamp(5rem, 8vw, 7rem);
    text-align: center;
}

/* Grid utilities */
.col1 { grid-column: span 1 !important; }
.col2 { grid-column: span 2 !important; }
.col3 { grid-column: span 3 !important; }
.col4 { grid-column: span 4 !important; }
.col5 { grid-column: span 5 !important; }
.col6 { grid-column: span 6 !important; }
.col7 { grid-column: span 7 !important; }
.col8 { grid-column: span 8 !important; }
.col9 { grid-column: span 9 !important; }
.col10 { grid-column: span 10 !important; }
.col11 { grid-column: span 11 !important; }
.col12 { grid-column: span 12 !important; }

.row1 { grid-row: span 1; }
.row2 { grid-row: span 2; }
.row3 { grid-row: span 3; }
.row4 { grid-row: span 4; }

/* ==========================================================================
   4. Components
   ========================================================================== */

/* Brand */
.brand {
    position: absolute;
    top: clamp(0.75rem, 2vw, 1rem);
    left: clamp(2rem, 3vw, 4rem);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(0.2rem, 1vw, 0.4rem);
    white-space: nowrap;
    font-size: clamp(1.3rem, 2.2vw, 1.5rem);
    
}

.brand .logo {
    line-height: 1;
    flex-shrink: 0;
    display: block;
    width: clamp(1.5rem, 2vw, 1.7rem);
    
}

.brand .logo img {
    width: 100%;
    height: auto;
    display: block;
}

.brand .title {
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    opacity: 0.9;
    transition: opacity var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    padding-left: 0.2rem;
}

.brand-in-line {
    
    font-weight: 600;
    font-style: italic;
    color: var(--brand-text);
}

@media (hover: hover) {
    .brand:hover .brand.title {
        opacity: 1;
    }
}

/* Language Selector & Theme Switcher */
.language-selector {
    position: absolute;
    top: clamp(0.2rem, 1.3vw, 0.5rem);
    right: clamp(1rem, 2vw, 3rem);
}

.lang-dropdown-btn {
    background: var(--white-3);
    border: 0.8px solid var(--white-1);
    border-radius: 2px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    outline: none;
    min-width: 48px;
    justify-content: center;
}

.lang-dropdown-btn:hover {
    color: var(--text-primary);
    background: var(--card-bg);
}

.lang-dropdown-btn svg {
    transition: transform var(--transition);
    opacity: 0.8;
}

.lang-dropdown-btn.open svg {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    background: var(--btn-secondary-bg);
    border: 0.5px solid var(--btn-secondary-border);
    border-radius: 2px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    min-width: 48px;
    box-shadow: 0 4px 20px var(--shadow-color-dark);
}

.lang-dropdown a {
    all: unset;
    display: block;
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    background: var(--transparent-color);
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
    width: 100%;
    text-align: center;
    outline: none;
}

.lang-option:hover {
    background: var(--btn-secondary-hover-bg);
    color: var(--text-primary);
}

.lang-option.active {
    background: var(--accent-20);
    color: var(--accent);
}

.lang-dropdown-btn:focus-visible,
.lang-option:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 1px;
}

.theme-switcher {
    position: absolute;
    top: clamp(0.2rem, 1.3vw, 0.5rem);
    right: calc(clamp(3rem, 2vw, 7rem) + 48px);
}

#theme-toggle {
    background: var(--transparent-color);
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    outline: none;
    justify-content: center;
}

#theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--white-10);
}

.larger-text {
    font-size: 1.2rem !important;
    line-height: 1.4 !important;
}

.smaller-text {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
}

/* Card */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: var(--padding);
    box-shadow: 0 4px 30px var(--shadow-color);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
    position: relative;
    opacity: 0;
    display: flex;
    flex-direction: column;
}

.card-centered {
    grid-column: 1 / -1 !important;
    max-width: 50%;
    justify-self: center;
    /* --- Base Card Styles --- */
    overflow: hidden;
    position: relative;
    /* --- Centering Styles --- */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card.content-centered {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card.vertical-centered {
    align-items: center;
    flex-direction: row;
    gap: 1em;
}

.card.visible {
    opacity: 1;
}

.card.animated {
    animation: fadeInUp 0.66s ease-out forwards;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius);
    padding: 1px;
    background: linear-gradient(to bottom right, var(--white-20) 0%, var(--transparent-color) 63%);
    -webkit-mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.card-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
    line-height: 1.2;
    color: var(--text-muted);
    padding-bottom: clamp(0.5rem, 1vw, 1rem);
}

.card-content {
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.6;
    opacity: 0.9;
    color: var(--text-secondary);
    flex: 1;
}

.card-content p {
    margin-bottom: clamp(0.5rem, 2vw, 0.75rem);
}

.card-content p:last-child {
    margin-bottom: 0;
}

.card-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: calc(var(--border-radius) / 2);
    margin-top: 0.75rem;
}

.card-content a {
    color: var(--text-secondary);
    border-bottom: 1px solid var(--transparent-color);
    transition: all var(--transition);
}

.card-content a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.card-content a::after {
    display: none;
}

.card-content a:visited {
    color: var(--card-link-visited);
}

@media (min-width: 769px) {
    .card:nth-child(4n+2) {
        grid-column: span 5;
    }

    .card:nth-child(4n+3) {
        grid-column: span 7;
    }

    .card:nth-child(4n+4) {
        grid-column: span 7;
    }

    .card:nth-child(4n+1) {
        grid-column: span 5;
    }
}

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(-1px);
        box-shadow: 3px 8px 33px var(--shadow-color-dark);
    }
}

@media (hover: none) or (pointer: coarse) {
    .card:active {
        transform: scale(0.98);
    }
}

.card-centered.col4 { --col-span: 4; }
.card-centered.col5 { --col-span: 5; }
.card-centered.col6 { --col-span: 6; }
.card-centered.col7 { --col-span: 7; }
.card-centered.col8 { --col-span: 8; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.625rem, 2vw, 0.875rem) clamp(1.25rem, 3vw, 1.75rem);
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 500;
    font-family: inherit;
    line-height: 1.2;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: var(--transparent-color);
    -webkit-appearance: none;
    appearance: none;
    user-select: none;
}

.btn-primary {
    /*background: linear-gradient(135deg, var(--accent) 0%, var(--accent-gradient-end) 100%);*/
    background: var(--accent1);
    color: var(--white);
    position: relative;
    z-index: 1;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-gradient-end) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: -1;
}

.btn-primary:active::before {
    opacity: 1;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px var(--accent-shadow-light);
    transform: scale(1.01);
    opacity: 0.9;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px var(--accent-shadow-dark);
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--text-primary);
    border: 0.5px solid var(--btn-secondary-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 5px;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-gradient-start-50) 0%, var(--transparent-color) 60%);
    -webkit-mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover-bg);
    border-color: var(--btn-secondary-hover-border);
}

.btn-secondary:hover::before {
    opacity: 1;
}

.btn-secondary:active {
    background: var(--btn-secondary-active-bg);
    transform: translateY(0);
}

.btn-small {
    padding: clamp(0.375rem, 1.5vw, 0.5rem) clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
}

.btn-large {
    padding: clamp(0.875rem, 2.5vw, 1.125rem) clamp(1.75rem, 4vw, 2.5rem);
    font-size: clamp(1rem, 2.2vw, 1.125rem);
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    flex-wrap: wrap;
    align-items: center;
    margin-top: clamp(1rem, 3vw, 1.5rem);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-loading {
    color: var(--transparent-color);
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid var(--white-30);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-icon {
    padding: clamp(0.625rem, 2vw, 0.875rem);
    aspect-ratio: 1;
}

.fab {
    position: fixed;
    bottom: clamp(1rem, 3vw, 2rem);
    right: clamp(1rem, 3vw, 2rem);
    width: clamp(3rem, 8vw, 3.5rem);
    height: clamp(3rem, 8vw, 3.5rem);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-gradient-end) 100%);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 20px var(--accent-shadow-fab);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    transition: all var(--transition);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 25px var(--accent-shadow-fab-hover);
}

.fab:active {
    transform: scale(0.95);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Forms */
.form-group {
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: var(--text-secondary);
    font-weight: 500;
}

input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: clamp(0.625rem, 2vw, 0.875rem) clamp(1rem, 3vw, 1.25rem);
    background-color: var(--textarea-bg);
    border: 0.4px solid var(--accent-border);
    border-radius: 3px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.2;
    transition: all var(--transition);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="email"]:focus {
    border-color: var(--accent);
    background-color: var(--textarea-focus-bg);
    box-shadow: 0 0 0 2px var(--accent-shadow);
}

input[type="email"]:hover:not(:focus) {
    border-color: var(--accent-border-hover);
}

input[type="email"]::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

input[type="email"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.textarea {
    width: 100%;
    min-height: clamp(80px, 15vh, 120px);
    padding: clamp(0.625rem, 2vw, 0.875rem);
    background-color: var(--textarea-bg);
    border: 0.4px solid var(--accent-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.5;
    resize: vertical;
    transition: all var(--transition);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.textarea:focus {
    border-color: var(--accent);
    background-color: var(--textarea-focus-bg);
    box-shadow: 0 0 0px 0px var(--accent-shadow);
}

.textarea:hover:not(:focus) {
    border-color: var(--accent-border-hover);
}

.textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Lists */
.list,
.card-content ul,
.card-content ol {
    padding-left: 1.25rem;
    margin: 0;
    line-height: 1.6;
}

.list li,
.card-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    position: relative;
}

.list li:last-child,
.card-content li:last-child {
    margin-bottom: 0;
}

.list-styled {
    list-style: none;
    padding-left: 0;
}

.list-styled li {
    padding-left: clamp(1.25rem, 3vw, 1.5rem);
    position: relative;
}

.list-styled li::before {
    content: "•";
    color: var(--accent1);
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: 0;
    line-height: inherit;
}

.list-numbered {
    counter-reset: list-counter;
    list-style: none;
    padding-left: 0;
}

.list-numbered li {
    counter-increment: list-counter;
    padding-left: clamp(1.75rem, 4vw, 2rem);
    position: relative;
}

.list-numbered li::before {
    content: counter(list-counter) ".";
    color: var(--accent1);
    font-weight: 600;
    position: absolute;
    left: 0;
    top: 0;
    min-width: 1.5rem;
}

.list-compact li {
    margin-bottom: 0.25rem;
}

.list-spaced li {
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
}

.list-interactive li {
    padding: clamp(0.375rem, 1vw, 0.5rem) clamp(0.5rem, 2vw, 0.75rem);
    border-radius: 6px;
    transition: all var(--transition);
    cursor: pointer;
}

.half {
    min-width: 50vw;
    aspect-ratio: 16 / 9;
}

@media (hover: hover) {
    .list-interactive li:hover {
        background-color: var(--accent-hover);
        color: var(--text-primary);
        transform: translateX(4px);
    }
}

/* Code Block */
.code-block {
    background-color: var(--code-bg);
    border-radius: 1px;
    padding: clamp(0.75rem, 2vw, 1rem);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    margin: clamp(0.75rem, 2vw, 1rem) 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.code-number {
    color: var(--code-number-color);
    margin-right: clamp(0.5rem, 2vw, 1rem);
    user-select: none;
    display: inline-block;
}

.code-keyword {
    color: var(--code-keyword-color);
}

.code-string {
    color: var(--code-string-color);
}

.code-function {
    color: var(--code-function-color);
}

.code-comment {
    color: var(--code-comment-color);
}

/* Chat */
.chat-container {
    display: flex;
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    align-items: center;
    gap: 0.625rem;
}

.avatar {
    width: clamp(1.75rem, 5vw, 2.25rem);
    height: clamp(1.75rem, 5vw, 2.25rem);
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: clamp(0.75rem, 2vw, 1rem);
}

.figure {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
}

.figure img {
filter: invert(84%) sepia(8%) saturate(1463%) hue-rotate(193deg) brightness(91%) contrast(86%);
}

.message {
    background-color: var(--accent-20);
    padding: clamp(0.5rem, 2vw, 0.625rem) clamp(0.75rem, 2vw, 1rem);
    border-radius: 10px;
    
}

.message.you {
    background-color: var(--accent-40);
}

/* Browser Mockup */
.browser-mockup {
    background-color: var(--browser-mockup-bg);
    border-radius: 12px;
    padding: clamp(0.75rem, 2vw, 1rem);
    margin-top: clamp(0.75rem, 2vw, 1rem);
}

.browser-dots {
    display: flex;
    align-items: center;
    margin-bottom: 0.625rem;
    gap: 0.3125rem;
}

.browser-dot {
    background-color: var(--white-10);
    border-radius: 50%;
    width: 10px;
    height: 10px;
}

.browser-url {
    flex-grow: 1;
    text-align: center;
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    opacity: 0.7;
}

/* Dropdown */
.dropdown {
    background-color: var(--code-bg);
    border-radius: 8px;
    padding: clamp(0.5rem, 2vw, 0.625rem);
    margin-left: clamp(0.75rem, 2vw, 1.25rem);
    margin-top: 0.75rem;
}

.dropdown-item {
    padding: clamp(0.375rem, 1.5vw, 0.5rem) clamp(0.625rem, 2vw, 0.75rem);
    color: var(--text-muted);
    border-radius: 6px;
    margin-bottom: 0.25rem;
    font-size: clamp(0.875rem, 2vw, 1rem);
    transition: background-color var(--transition), color var(--transition);
}

.dropdown-item:last-child {
    margin-bottom: 0;
}

@media (hover: hover) {
    .dropdown-item:hover {
        background-color: var(--accent-20);
        color: var(--white);
    }
}

/* Hand Lettered */
.hand-lettered {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    line-height: 1.7;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
    padding: clamp(1rem, 3vw, 1.5rem);
    border-left: 3px solid var(--accent);
    background: var(--hand-lettered-bg);
    border-radius: 0 8px 8px 0;
    margin: clamp(1rem, 3vw, 2rem) 0;
}

.hand-lettered.signature {
    font-style: normal;
    color: var(--text-muted);
    background: var(--transparent-color);
    margin: 0;
    text-align: right;
    border-left: none;
    font-size: clamp(0.5rem, 1.78vw, 1rem);
    line-height: 1.8;
}

/* Footer */
.footer {
    text-align: center;
    padding-bottom: clamp(0.3rem, 1vw, 0.8rem);
    padding-top: clamp(3rem, 6vw, 5rem);
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: var(--text-muted);
    opacity: 0.7;
}

/* ==========================================================================
   5. Links & Typography
   ========================================================================== */
a {
    color: var(--accent1) !important;
    text-decoration: none;
    position: relative;
    transition: all var(--transition);
    font-weight: 500;
}

a:hover {
    color: var(--link-hover) !important;
}

a:focus-visible {
    outline: 1px solid var(--accent1);
    outline-offset: 2px;
    border-radius: 2px;
}

a:not(.btn):not(.no-underline)::after {
    content: "";
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background: var(--accent-gradient);
    transition: width var(--transition);
}

a:not(.btn):not(.no-underline):hover::after {
    width: 100%;
}

a:visited {
    color: var(--link-visited);
}

.link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.625rem, 2vw, 0.875rem) clamp(1.25rem, 3vw, 1.75rem);
    background: var(--link-btn-bg);
    border: 0.5px solid var(--link-btn-border);
    border-radius: 5px;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition);
    font-weight: 500;
}

.link-btn:hover {
    background: var(--btn-secondary-hover-bg);
    border-color: var(--link-btn-hover-border);
    transform: translateY(-1px);
}

.link-btn::after {
    display: none;
}

.nav-link {
    color: var(--text-muted);
    font-size: clamp(0.875rem, 2vw, 1rem);
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--transparent-color);
    transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-link::after {
    display: none;
}

/* ==========================================================================
   6. Effects & Utilities
   ========================================================================== */
.bg-cover1,
.bg-cover2,
.bg-cover3 {
    position: absolute;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
    transform: translateZ(0);
}

.bg-cover1 {
    top: 30vh;
    left: 40%;
    width: clamp(80px, 15vw, 160px);
    height: clamp(100px, 20vw, 200px);
    background: var(--accent-pink);
    filter: blur(98px);
}

.bg-cover2 {
    position: fixed;
    top: 15%;
    left: 50%;
    width: clamp(80px, 15vw, 160px);
    height: clamp(100px, 20vw, 200px);
    background: var(--accent-blue);
    filter: blur(58px);
}

.bg-cover3 {
    background: var(--accent-pink-glow);
    filter: blur(100px);
    width: clamp(46px, 10vw, 92px);
    height: clamp(84px, 15vw, 168px);
    bottom: 20vh;
    left: 14vw;
}

.glow1 {
    position: relative;
    overflow: hidden;
}

.glow1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom right,
            var(--transparent) 8%,
            var(--white-20) 79%,
            var(--white-60) 87%,
            var(--white-100) 100%);
    filter: blur(3px);
    animation: pulse-glow 6s infinite ease-in-out;
    pointer-events: none;
}

.glow2 {
    position: relative;
    overflow: hidden;
}

.glow2::after {
    content: '';
    position: absolute;
    overflow: hidden;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom left,
            var(--white-100) 0%,
            var(--white-10) 8%,
            var(--white-34) 12%,
            var(--white-3) 30%);
    filter: blur(40px);
    transform: translate(53%, -27%) rotate(-10deg);
    pointer-events: none;
    opacity: 0.65;
}

.spatiat {
    white-space: pre;
}

/* ==========================================================================
   7. Media Queries & Theming
   ========================================================================== */

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(6, 1fr);
    }

    .card,
    .card:nth-child(4n+1),
    .card:nth-child(4n+2),
    .card:nth-child(4n+3),
    .card:nth-child(4n+4) {
        grid-column: span 6;
    }

    .col7,
    .col8,
    .col9,
    .col10,
    .col11,
    .col12 {
        grid-column: span 6;
    }

    .col4,
    .col5,
    .col6 {
        grid-column: span 6;
    }

    .col3 {
        grid-column: span 3;
    }

    .col2 {
        grid-column: span 2;
    }

    .row3,
    .row4 {
        grid-row: span 2;
    }
    
    .card-centered {
        min-width: 100% !important;
    }

    .bg-cover1,
    .bg-cover2,
    .bg-cover3 {
        filter: blur(50px);
        opacity: 0.5;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    body {
        padding: 0.75rem;
    }

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

    .card,
    .col1,
    .col2,
    .col3,
    .col4,
    .col5,
    .col6,
    .col7,
    .col8,
    .col9,
    .col10,
    .col11,
    .col12,
    .card-centered {
        grid-column: span 1 !important;
    }

    .row2,
    .row3,
    .row4 {
        grid-row: span 1 !important;
    }

    .message {
        max-width: 90%;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }

    .fab {
        bottom: 1rem;
        right: 1rem;
    }

    .language-selector {
        top: 0.5rem;
        right: 0.75rem;
    }

    .lang-dropdown-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        min-width: 44px;
    }

    .lang-option {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }
    
    .container {
        max-width: 2000px;
    }
}

/* Accessibility */
@media (hover: none) or (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .btn:active {
        transform: scale(0.95);
    }

    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.95);
    }

    .fab:active {
        transform: scale(0.9);
    }
}

@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--white);
    }

    .card-content {
        opacity: 1;
    }

    .btn {
        border: 2px solid var(--current-color);
    }

    .textarea {
        border-width: 2px;
    }
    
    a {
        text-decoration: underline;
        text-decoration-color: var(--accent);
    }

    a::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Theming */
.light-theme {
    --primary-bg: hsl(0, 0%, 100%);
    --secondary-bg: hsl(0, 0%, 94%);
    --card-bg: hsla(236, 73%, 6%, 0.01);
    --text-primary: hsl(236, 73%, 6%);
    --text-secondary: hsl(248, 56%, 19%);
    --text-muted: var(--light-theme-text-muted);
    --accent: #00ccaa;
    --accent-pink: hsla(326, 87%, 68%, 0.2);
    --accent-blue: hsla(225, 94%, 65%, 0.2);
    --code-bg: var(--light-theme-code-bg);
    --btn-secondary-bg: hsla(236, 73%, 6%, 0.03);
    --btn-secondary-border: hsla(236, 73%, 6%, 0.1);
    --btn-secondary-hover-bg: hsla(236, 73%, 6%, 0.06);
    --btn-secondary-hover-border: hsla(236, 73%, 6%, 0.2);
    --btn-secondary-active-bg: hsla(236, 73%, 6%, 0.09);
    --browser-mockup-bg: hsla(236, 73%, 6%, 0.03);
    --textarea-bg: hsla(236, 73%, 6%, 0.03);
    --textarea-focus-bg: hsla(236, 73%, 6%, 0.06);
    --accent-border: hsla(236, 73%, 6%, 0.2);
    --accent-border-hover: hsla(236, 73%, 6%, 0.4);
    --hand-lettered-bg: hsla(236, 73%, 6%, 0.03);
    --link-btn-bg: hsla(236, 73%, 6%, 0.03);
    --link-btn-border: hsla(236, 73%, 6%, 0.1);
    --link-btn-hover-border: hsla(236, 73%, 6%, 0.2);
    --link-btn-hover-bg: hsla(236, 73%, 6%, 0.06);
    --shadow-color-dark: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(255, 255, 255, 0.7);
    --shadow-color-light: rgba(0, 0, 0, 0.05);
    --accent-shadow: rgba(138, 92, 248, 0.3);
    --accent-shadow-light: rgba(138, 92, 248, 0.2);
    --accent-shadow-dark: rgba(138, 92, 248, 0.4);
    --accent-shadow-fab: rgba(138, 92, 248, 0.4);
    --accent-shadow-fab-hover: rgba(138, 92, 248, 0.6);
    --transparent-color: rgba(255, 255, 255, 0);
    --white-100: rgba(0, 0, 0, 1);
    --white-60: rgba(0, 0, 0, 0.6);
    --white-34: rgba(0, 0, 0, 0.34);
    --white-20: rgba(0, 0, 0, 0.2);
    --white-10: rgba(0, 0, 0, 0.1);
    --white-3: rgba(0, 0, 0, 0.03);
    --white-1: rgba(0, 0, 0, 0.01);
    --black: rgba(0, 0, 0, 1);
    --black-60: rgba(0, 0, 0, 0.6);
    --black-34: rgba(0, 0, 0, 0.34);
    --black-20: rgba(0, 0, 0, 0.2);
    --black-10: rgba(0, 0, 0, 0.1);
    --black-3: rgba(0, 0, 0, 0.03);
    --black-1: rgba(0, 0, 0, 0.01);
    --brand-text: hsl(0, 0%, 0%);
}

@media (prefers-color-scheme: light) {
    body:not(.dark-theme) {
        --primary-bg: hsl(0, 0%, 100%);
        --secondary-bg: hsl(0, 0%, 94%);
        --card-bg: hsla(236, 73%, 6%, 0.03);
        --text-primary: hsl(236, 73%, 6%);
        --text-secondary: hsl(248, 56%, 19%);
        --text-muted: var(--light-theme-text-muted);
        --accent: hsl(258, 92%, 67%);
        --accent-pink: hsla(326, 87%, 68%, 0.2);
        --accent-blue: hsla(225, 94%, 65%, 0.2);
        --code-bg: var(--light-theme-code-bg);
        --btn-secondary-bg: hsla(236, 73%, 6%, 0.03);
        --btn-secondary-border: hsla(236, 73%, 6%, 0.1);
        --btn-secondary-hover-bg: hsla(236, 73%, 6%, 0.06);
        --btn-secondary-hover-border: hsla(236, 73%, 6%, 0.2);
        --btn-secondary-active-bg: hsla(236, 73%, 6%, 0.09);
        --browser-mockup-bg: hsla(236, 73%, 6%, 0.03);
        --textarea-bg: hsla(236, 73%, 6%, 0.03);
        --textarea-focus-bg: hsla(236, 73%, 6%, 0.06);
        --accent-border: hsla(236, 73%, 6%, 0.2);
        --accent-border-hover: hsla(236, 73%, 6%, 0.4);
        --hand-lettered-bg: hsla(236, 73%, 6%, 0.03);
        --link-btn-bg: hsla(236, 73%, 6%, 0.03);
        --link-btn-border: hsla(236, 73%, 6%, 0.1);
        --link-btn-hover-border: hsla(236, 73%, 6%, 0.2);
        --link-btn-hover-bg: hsla(236, 73%, 6%, 0.06);
        --shadow-color-dark: rgba(0, 0, 0, 0.1);
        --shadow-color-light: rgba(0, 0, 0, 0.05);
        --accent-shadow: rgba(138, 92, 248, 0.3);
        --accent-shadow-light: rgba(138, 92, 248, 0.2);
        --accent-shadow-dark: rgba(138, 92, 248, 0.4);
        --accent-shadow-fab: rgba(138, 92, 248, 0.4);
        --accent-shadow-fab-hover: rgba(138, 92, 248, 0.6);
        --transparent-color: rgba(255, 255, 255, 0);
        --white-100: rgba(0, 0, 0, 1);
        --white-60: rgba(0, 0, 0, 0.6);
        --white-34: rgba(0, 0, 0, 0.34);
        --white-20: rgba(0, 0, 0, 0.2);
        --white-10: rgba(0, 0, 0, 0.1);
        --white-3: rgba(0, 0, 0, 0.03);
        --white-1: rgba(0, 0, 0, 0.01);
        --black: rgba(0, 0, 0, 1);
        --black-60: rgba(0, 0, 0, 0.6);
        --black-34: rgba(0, 0, 0, 0.34);
        --black-20: rgba(0, 0, 0, 0.2);
        --black-10: rgba(0, 0, 0, 0.1);
        --black-3: rgba(0, 0, 0, 0.03);
        --black-1: rgba(0, 0, 0, 0.01);
    }
}

/* Print */
@media print {
    body {
        background: var(--white);
        color: var(--black);
    }

    .bg-cover1,
    .bg-cover2,
    .bg-cover3 {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--border-color-light);
        page-break-inside: avoid;
    }
}
