/* === CUSTOM PROPERTIES === */
:root {
    --deep-void: #0a0a14;
    --concrete-base: #1a1a2e;
    --slab-surface: #242440;
    --amethyst: #6b3fa0;
    --soft-amethyst: #c4a7e7;
    --sapphire: #2d5a9e;
    --ruby: #9e2d4a;
    --emerald: #2d7a5e;
    --pale-lavender: #d4d0e8;
    --gold: #c4a84d;
    --deep-amethyst: #4a2d6b;
    --muted-amethyst: #6b5b8a;
    --slab-width: 85vw;
}

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--deep-void);
    color: var(--pale-lavender);
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

/* === PARTICLE CANVAS === */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* === TIMELINE SPINE === */
#timeline-spine {
    position: fixed;
    left: 48px;
    top: 0;
    width: 2px;
    height: 100%;
    z-index: 5;
}

#spine-line {
    width: 2px;
    height: 100%;
}

#spine-path {
    stroke-dasharray: 10000;
    stroke-dashoffset: 10000;
    transition: none;
}

/* === DIAMOND NAVIGATION === */
#diamond-nav {
    position: fixed;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.diamond-marker {
    width: 12px;
    height: 12px;
    background: var(--sapphire);
    transform: rotate(45deg) scale(0);
    display: block;
    transition: background 0.3s, transform 0.3s;
    text-decoration: none;
    opacity: 0;
}

.diamond-marker.visible {
    transform: rotate(45deg) scale(1);
    opacity: 1;
}

.diamond-marker.active {
    background: var(--amethyst);
    transform: rotate(45deg) scale(1.3);
}

.diamond-marker::after {
    content: attr(data-label);
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--soft-amethyst);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.diamond-marker:hover::after {
    opacity: 1;
}

/* === SLABS === */
.slab {
    position: relative;
    min-height: 100vh;
    width: var(--slab-width);
    background: var(--concrete-base);
    z-index: 2;
    display: flex;
    align-items: center;
    overflow: hidden;
    opacity: 0;
    transform: perspective(1200px) rotateY(12deg);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.slab.revealed {
    opacity: 1;
    transform: perspective(1200px) rotateY(0deg);
}

.slab--center {
    margin-left: auto;
    margin-right: auto;
    width: 100vw;
}

.slab--left {
    margin-left: 0;
    margin-right: auto;
    border-right: 3px solid var(--amethyst);
}

.slab--right {
    margin-left: auto;
    margin-right: 0;
    border-left: 3px solid var(--amethyst);
}

.slab--inverted {
    background: var(--soft-amethyst);
    color: var(--concrete-base);
    width: 100vw;
}

.slab--inverted .slab-heading {
    color: var(--concrete-base);
}

.slab--inverted .closing-line {
    color: var(--slab-surface);
}

.slab-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 120px;
    position: relative;
    z-index: 3;
    width: 100%;
}

/* === GUTTERS === */
.gutter {
    position: absolute;
    top: 0;
    height: 100%;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

.gutter--left {
    left: 0;
}

.gutter--right {
    right: 0;
}

.gutter-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--amethyst);
    opacity: 0.4;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

/* === HERO === */
#slab-hero {
    justify-content: center;
    text-align: center;
    transform: translateY(100vh);
    opacity: 0;
}

#slab-hero.revealed {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease;
}

.hero-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.5em;
    color: var(--soft-amethyst);
    text-transform: uppercase;
    margin-bottom: 24px;
    transition: letter-spacing 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-title.contracted {
    letter-spacing: 0.15em;
}

.hero-subtitle {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--pale-lavender);
    letter-spacing: 0.05em;
}

.typewriter-word {
    opacity: 0;
    display: inline;
}

.typewriter-word.visible {
    opacity: 1;
}

.subtitle-separator {
    opacity: 0;
    color: var(--amethyst);
}

.subtitle-separator.visible {
    opacity: 1;
}

/* === HEADINGS === */
.slab-heading {
    font-family: 'Poiret One', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.15em;
    color: var(--soft-amethyst);
    text-transform: uppercase;
    margin-bottom: 40px;
}

/* === CONTENT === */
.slab-content p {
    margin-bottom: 1.2em;
    font-size: 1rem;
    max-width: 640px;
}

.icon-row {
    margin-bottom: 24px;
}

/* === CONTENT ICONS === */
.content-icon {
    transition: transform 0.3s, fill-opacity 0.3s;
    cursor: default;
}

.content-icon:hover {
    transform: scale(1.3);
}

/* === SKILLS === */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.skill-block h3 {
    font-family: 'Poiret One', cursive;
    font-size: 1.3rem;
    color: var(--soft-amethyst);
    letter-spacing: 0.1em;
    margin: 12px 0 8px;
}

.skill-block p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* === PROJECTS === */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.project-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.project-info h3 {
    font-family: 'Poiret One', cursive;
    font-size: 1.4rem;
    color: var(--soft-amethyst);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.gold-marker {
    color: var(--gold);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.project-info p {
    font-size: 0.95rem;
}

/* === PHILOSOPHY === */
.philosophy-quote {
    font-family: 'Poiret One', cursive;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--soft-amethyst);
    border-left: 3px solid var(--amethyst);
    padding-left: 24px;
    margin-bottom: 32px;
    letter-spacing: 0.05em;
    line-height: 1.5;
}

/* === CONTACT === */
.contact-icons {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-bottom: 40px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--concrete-base);
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-link:hover {
    transform: perspective(600px) rotateY(15deg) scale(1.1);
}

.closing-line {
    text-align: center;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: var(--slab-surface);
}

/* === CHASMS === */
.chasm {
    height: 40vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.icon-cluster {
    position: relative;
    width: 120px;
    height: 120px;
}

.orbit-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0.3;
    animation: orbit 60s linear infinite;
}

.orbit-icon:nth-child(1) { animation-delay: 0s; }
.orbit-icon:nth-child(2) { animation-delay: -12s; }
.orbit-icon:nth-child(3) { animation-delay: -24s; }
.orbit-icon:nth-child(4) { animation-delay: -36s; }
.orbit-icon:nth-child(5) { animation-delay: -48s; }

@keyframes orbit {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateX(40px) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(40px) rotate(-360deg); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    :root {
        --slab-width: 95vw;
    }

    .slab-inner {
        padding: 60px 32px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    #diamond-nav {
        left: 12px;
    }

    #timeline-spine {
        left: 18px;
    }

    .gutter {
        display: none;
    }

    .contact-icons {
        gap: 24px;
    }

    .project-item {
        flex-direction: column;
    }
}
