/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Instrument Serif', serif;
    background-color: #0d0d12;
    color: #4a4a5c;
    overflow-x: hidden;
    position: relative;
}

/* Color palette from DESIGN.md */
:root {
    --color-obsidian: #0d0d12;
    --color-basalt: #3a3a4a;
    --color-granite: #4a4a5c;
    --color-marble-light: #f5f0e8;
    --color-marble-med: #e8e0d4;
    --color-marble-grey: #d4cfc5;
    --color-accent-rose: #b84a5a;
    --color-accent-green: #3a8a7a;
    --color-accent-gold: #c9963a;
}

/* Main Container */
.container {
    width: 100%;
    position: relative;
    z-index: 1;
}

/* SVG Vein Network */
.vein-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.vein {
    stroke-linecap: round;
    stroke-linejoin: round;
    /* Uses color #3a3a4a from palette */
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 40px;
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d4cfc5;
    margin-bottom: 20px;
    line-height: 1;
    animation: fadeIn 1s ease-out 2s both;
}

.hero-subtitle {
    font-family: 'Instrument Serif', serif;
    font-size: 1.2rem;
    color: #b84a5a;
    letter-spacing: 0.05em;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 1s ease-out 2.5s both;
    font-style: italic;
}

/* Typewriter Effect for title */
.hero-title.typewriter {
    opacity: 0;
    animation: typewriter 3s steps(8, end) 1.5s forwards;
    overflow: hidden;
    white-space: nowrap;
}

@keyframes typewriter {
    from {
        width: 0;
        opacity: 1;
    }
    to {
        width: 8em;
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes dashDraw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Navigation */
.nav-bar {
    position: sticky;
    top: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 20px;
    z-index: 10;
    background: transparent;
}

.nav-item {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d4cfc5;
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    opacity: 0.7;
}

.nav-item:hover {
    color: #b84a5a;
    text-shadow: 0 0 8px rgba(184, 74, 90, 0.4);
}

/* Marble Texture - Base Definition */
.marble-texture {
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(232, 224, 212, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 207, 197, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 60%, rgba(245, 240, 232, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, rgba(74, 74, 92, 0.05) 0%, transparent 50%, rgba(232, 224, 212, 0.05) 100%),
        linear-gradient(-45deg, rgba(212, 207, 197, 0.05) 0%, transparent 50%, rgba(74, 74, 92, 0.05) 100%);
    filter: contrast(1.1) saturate(0.9);
    background-color: #f5f0e8;
}

/* Card Sections */
.card-section {
    padding: 100px 40px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    perspective: 1000px;
}

.card {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 4 / 5;
    position: relative;
    border-radius: 4px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 1px rgba(184, 74, 90, 0.5);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.card-marble {
    position: absolute;
    inset: 0;
    border-radius: 4px;
    z-index: 1;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(232, 224, 212, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 207, 197, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 60%, rgba(245, 240, 232, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, rgba(74, 74, 92, 0.05) 0%, transparent 50%, rgba(232, 224, 212, 0.05) 100%),
        linear-gradient(-45deg, rgba(212, 207, 197, 0.05) 0%, transparent 50%, rgba(74, 74, 92, 0.05) 100%);
    filter: contrast(1.1) saturate(0.9);
    background-color: #f5f0e8;
}

.card-content {
    position: absolute;
    inset: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;
    border-radius: 4px;
    background: linear-gradient(to bottom, rgba(13, 13, 18, 0) 0%, rgba(13, 13, 18, 0.8) 70%);
}

.card-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d4cfc5;
    margin-bottom: 15px;
    line-height: 1.2;
}

.card-text {
    font-family: 'Instrument Serif', serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e8e0d4;
    font-style: italic;
}

/* Geometry Section */
.geometry-section {
    padding: 100px 40px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    perspective: 1200px;
}

.geometry-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 600px;
}

.wireframe-shape {
    transform: rotateY(-15deg) rotateX(10deg);
    animation: rotate3d 15s infinite linear;
    filter: drop-shadow(0 0 30px rgba(184, 74, 90, 0.2));
}

@keyframes rotate3d {
    from {
        transform: rotateY(-15deg) rotateX(10deg) rotateZ(0deg);
    }
    to {
        transform: rotateY(-15deg) rotateX(10deg) rotateZ(360deg);
    }
}

.geometry-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d4cfc5;
    text-align: center;
    line-height: 1.2;
}

.geometry-text {
    font-family: 'Instrument Serif', serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #d4cfc5;
    text-align: center;
    font-style: italic;
}

/* Text Section */
.text-section {
    padding: 100px 40px;
    position: relative;
    z-index: 2;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-container {
    max-width: 700px;
    text-align: center;
}

.section-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d4cfc5;
    margin-bottom: 40px;
    line-height: 1.3;
}

.section-text {
    font-family: 'Instrument Serif', serif;
    font-size: 1.1rem;
    line-height: 1.9;
    color: #d4cfc5;
    margin-bottom: 30px;
    font-style: italic;
}

.section-text.secondary {
    font-size: 0.95rem;
    color: #b84a5a;
    margin-bottom: 0;
}

/* Closing Section */
.closing-section {
    padding: 120px 40px;
    position: relative;
    z-index: 2;
    text-align: center;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, rgba(13, 13, 18, 0) 0%, rgba(13, 13, 18, 0.5) 100%);
}

.closing-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d4cfc5;
    margin-bottom: 30px;
    line-height: 1;
}

.closing-text {
    font-family: 'Instrument Serif', serif;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #b84a5a;
    max-width: 600px;
    font-style: italic;
}

/* Tilt Effect for cards */
.card[data-tilt] {
    transition: transform 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav-bar {
        gap: 30px;
        top: 20px;
    }

    .nav-item {
        font-size: 0.75rem;
    }

    .card-section {
        padding: 60px 20px;
        min-height: 400px;
    }

    .card {
        max-width: 90%;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .card-text {
        font-size: 0.85rem;
    }

    .geometry-section {
        padding: 60px 20px;
        min-height: 400px;
    }

    .wireframe-shape {
        width: 200px;
        height: 200px;
    }

    .geometry-title {
        font-size: 1.5rem;
    }

    .geometry-text {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-text {
        font-size: 0.95rem;
    }

    .closing-title {
        font-size: 3rem;
    }

    .closing-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .nav-bar {
        gap: 20px;
        flex-wrap: wrap;
    }

    .card-section {
        padding: 40px 15px;
        min-height: 300px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-text {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .closing-title {
        font-size: 2rem;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}
