/* Obsidian Design System — Core Styles */

:root {
    /* Obsidian Palette */
    --color-bg:         #0c0b09;
    --color-bg-2:       #111009;
    --color-surface:    #161410;
    --color-text:       #e8e0d0;
    --color-muted:      #867f73;
    --color-gold:       #C9A465;
    --color-gold-light: #E8C88A;
    --color-gold-dark:  #8B6D35;
    --color-border:     rgba(201,164,101,0.10);

    /* Fonts */
    --font-title:    'Panchang',  sans-serif;
    --font-body:     'Switzer',   sans-serif;
    --font-sub:      'Satoshi',   sans-serif;
    --font-accent:   'Syne',      sans-serif;

    /* Glass */
    --glass-bg:     rgba(22, 20, 16, 0.72);
    --glass-border: rgba(201, 164, 101, 0.12);
    --glass-blur:   12px;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-gold:    cubic-bezier(0.19, 1, 0.22, 1);

    /* --- Fluid Typography --- */
    --text-xs:   clamp(0.75rem,  0.65rem + 0.5vw,  0.875rem);
    --text-sm:   clamp(0.875rem, 0.75rem + 0.6vw,  1rem);
    --text-base: clamp(1rem,     0.85rem + 0.75vw,  1.125rem);
    --text-lg:   clamp(1.125rem, 1rem + 1vw,        1.35rem);
    --text-xl:   clamp(1.35rem,  1.15rem + 1.25vw,  1.75rem);
    --text-2xl:  clamp(1.75rem,  1.45rem + 1.5vw,   2.25rem);
    --text-3xl:  clamp(2.25rem,  1.85rem + 2vw,     3rem);
    --text-4xl:  clamp(3rem,     2.5rem + 2.5vw,    4.5rem);
    --text-hero: clamp(3rem, 8vw, 7rem);

    /* --- Fluid Spacing --- */
    --space-sm: clamp(0.5rem,  0.4rem + 0.5vw,  0.75rem);
    --space-md: clamp(1rem,    0.8rem + 1vw,    1.5rem);
    --space-lg: clamp(1.5rem,  1.2rem + 1.5vw,  2.5rem);
    --space-xl: clamp(2.5rem,  2rem + 2.5vw,    5rem);
}

/* --- Base --- */
body.obsidian-mode {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 300;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Ambient Background (ersetzt liquid-bg) --- */
.obsidian-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--color-bg);
}

.obsidian-bg::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(201,164,101,0.07) 0%, transparent 65%);
    border-radius: 50%;
    animation: obsidianPulse 18s ease-in-out infinite alternate;
}

.obsidian-bg::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(139,109,53,0.05) 0%, transparent 65%);
    border-radius: 50%;
    animation: obsidianPulse 24s ease-in-out infinite alternate-reverse;
}

@keyframes obsidianPulse {
    0%   { transform: translate(0, 0)     scale(1);   opacity: 1; }
    50%  { transform: translate(20px, -30px) scale(1.05); opacity: 0.7; }
    100% { transform: translate(-10px, 15px) scale(0.95); opacity: 1; }
}

/* --- Glassmorphism Utilities --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
}

.glass-card {
    background: linear-gradient(135deg, rgba(22, 20, 16, 0.82), rgba(12, 11, 9, 0.72));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(201, 164, 101, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.55);
    border-radius: 16px;
    transition: transform 0.3s var(--ease-elastic), box-shadow 0.3s ease, border-color 0.3s ease;

    container-type: inline-size;
    container-name: card;
}

.glass-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(201, 164, 101, 0.15);
    border-color: rgba(201, 164, 101, 0.22);
}

@container card (max-width: 350px) {
    .glass-card h3 { font-size: var(--text-xl) !important; }
    .glass-card p  { font-size: var(--text-sm) !important; }
    .glass-card    { padding: 1.5rem !important; }
}

@container card (min-width: 500px) {
    .glass-card h3 { font-size: var(--text-3xl); }
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    grid-auto-rows: minmax(200px, auto);
    gap: 1.5rem;
}

.bento-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .bento-large { grid-column: span 2; grid-row: span 2; }
    .bento-tall  { grid-row: span 2; }
    .bento-wide  { grid-column: span 2; }
}

/* --- Portfolio Carousel --- */
.carousel-track {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.carousel-items {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: carouselScroll 40s linear infinite;
}

.carousel-items:hover { animation-play-state: paused; }

.carousel-card {
    flex-shrink: 0;
    width: 190px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(201, 164, 101, 0.08);
    background: rgba(22, 20, 16, 0.8);
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease;
    display: block;
}

.carousel-card:hover { transform: translateY(-2px); }

.carousel-card img {
    width: 100%;
    height: 115px;
    object-fit: cover;
    object-position: top center;
    display: block;
    filter: brightness(0.22);
    transition: filter 0.4s ease;
}

.carousel-card.lit img  { filter: brightness(1); }
.carousel-card.lit      { border-color: rgba(201, 164, 101, 0.45); }

.carousel-label {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    color: rgba(232, 224, 208, 0.45);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.04em;
}

@keyframes carouselScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Scroll Storytelling --- */
.story-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.story-element.visible {
    opacity: 1;
    transform: translateY(0);
}

.story-text-highlight {
    background: linear-gradient(90deg, var(--color-gold-light), var(--color-gold));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

/* --- Fluid Typography Utilities --- */
.text-fluid-hero { font-size: var(--text-hero); line-height: 1.1; }
.text-fluid-4xl  { font-size: var(--text-4xl);  line-height: 1.25; }
.text-fluid-3xl  { font-size: var(--text-3xl);  line-height: 1.25; }
.text-fluid-2xl  { font-size: var(--text-2xl);  line-height: 1.35; }
.text-fluid-xl   { font-size: var(--text-xl);   line-height: 1.35; }
.text-fluid-lg   { font-size: var(--text-lg);   line-height: 1.35; }
.text-fluid-base { font-size: var(--text-base); line-height: 1.5; }
.text-fluid-sm   { font-size: var(--text-sm);   line-height: 1.5; }

@keyframes shine {
    to { background-position: 200% center; }
}

/* --- Navigation Dropdown (CSS fallback) --- */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 260px;
    background: rgba(12, 11, 9, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(201, 164, 101, 0.15);
    border-radius: 16px;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(232, 224, 208, 0.7);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: rgba(201, 164, 101, 0.08);
    color: var(--color-gold-light);
    transform: translateX(4px);
}

.dropdown-item span { font-size: 1.2rem; }
