/* ============================================
   penclos.com — Flat-design burnt-orange focus space
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --deep-amber: #2A1808;
    --warm-brown: #5A4020;
    --burnt-orange: #C87830;
    --stack-shadow: #E8D0B0;
    --warm-cream: #FFF6EC;
    --card-white: #FFFAF2;
    --spotlight-glow: rgba(200, 120, 40, 0.06);
    --bokeh-warm: rgba(200, 120, 40, 0.04);

    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-accent: 'Space Grotesk', sans-serif;

    --mx: 50%;
    --my: 50%;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    color: var(--warm-brown);
    background-color: var(--warm-cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Cursor-Follow Spotlight Overlay --- */
#spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle 180px at var(--mx) var(--my), var(--spotlight-glow), transparent);
    transition: background 0.15s ease;
}

/* --- Bokeh Depth Circles --- */
#bokeh-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--bokeh-warm);
    opacity: 0;
    animation: bokeh-drift 20s infinite ease-in-out;
}

.bokeh-1 {
    width: 50px;
    height: 50px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 22s;
}

.bokeh-2 {
    width: 30px;
    height: 30px;
    top: 25%;
    right: 8%;
    animation-delay: 3s;
    animation-duration: 18s;
}

.bokeh-3 {
    width: 40px;
    height: 40px;
    top: 50%;
    left: 3%;
    animation-delay: 6s;
    animation-duration: 25s;
}

.bokeh-4 {
    width: 20px;
    height: 20px;
    top: 70%;
    right: 5%;
    animation-delay: 2s;
    animation-duration: 20s;
}

.bokeh-5 {
    width: 35px;
    height: 35px;
    top: 85%;
    left: 10%;
    animation-delay: 8s;
    animation-duration: 24s;
}

.bokeh-6 {
    width: 15px;
    height: 15px;
    top: 15%;
    right: 15%;
    animation-delay: 5s;
    animation-duration: 19s;
}

.bokeh-7 {
    width: 45px;
    height: 45px;
    top: 40%;
    right: 3%;
    animation-delay: 10s;
    animation-duration: 23s;
}

.bokeh-8 {
    width: 25px;
    height: 25px;
    top: 60%;
    left: 7%;
    animation-delay: 7s;
    animation-duration: 21s;
}

@keyframes bokeh-drift {
    0% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }
    20% {
        opacity: 1;
    }
    50% {
        transform: translateY(-30px) scale(1.15);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
}

/* --- Minimal Navigation --- */
#main-nav {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
}

#menu-toggle {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 6px;
    position: relative;
    z-index: 101;
}

.menu-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--burnt-orange);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.open .menu-bar:first-child {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle.open .menu-bar:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

#nav-menu {
    position: absolute;
    top: 50px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--card-white);
    padding: 1.5rem 2rem;
    box-shadow: 3px 3px 0 var(--stack-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

#nav-menu.nav-menu-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-link {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--burnt-orange);
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--deep-amber);
}

/* --- Focus Canvas (Main Content) --- */
#focus-canvas {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

/* --- Sections --- */
.section {
    padding: 4rem 0;
}

/* --- Hero --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

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

#site-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--deep-amber);
    letter-spacing: 0.06em;
    margin-bottom: 1.5rem;
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--warm-brown);
    line-height: 1.8;
    max-width: 480px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(16px);
    animation: fade-up 1s ease 0.6s forwards;
}

@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Kinetic-Animated Headings --- */
.kinetic-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--deep-amber);
    letter-spacing: 0.02em;
    animation: kinetic-weight 6s ease-in-out infinite;
}

@keyframes kinetic-weight {
    0%, 100% {
        font-weight: 500;
    }
    50% {
        font-weight: 700;
    }
}

h2.kinetic-heading {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 1.5rem;
}

/* --- Accent Labels --- */
.accent-label {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--burnt-orange);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-block;
    margin-bottom: 0.75rem;
}

/* --- Paper Cards (Layered Depth) --- */
.paper-card {
    background: var(--card-white);
    padding: 2.5rem 2rem;
    position: relative;
    box-shadow: 3px 3px 0 var(--stack-shadow);
}

.card-stack-1::before,
.card-stack-2::before,
.card-stack-3::before,
.card-stack-4::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: -4px;
    bottom: -4px;
    background: var(--stack-shadow);
    z-index: -1;
}

.card-stack-1::after,
.card-stack-2::after,
.card-stack-3::after,
.card-stack-4::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
    background: rgba(232, 208, 176, 0.5);
    z-index: -2;
}

/* --- Paragraphs inside cards --- */
.paper-card p {
    margin-bottom: 1rem;
}

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

/* --- Project List --- */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.project-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--stack-shadow);
}

.project-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.project-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--deep-amber);
    margin-bottom: 0.5rem;
}

.project-item p {
    font-weight: 300;
    margin-bottom: 0;
}

/* --- Thoughts List --- */
.thought-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.thought-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--stack-shadow);
}

.thought-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.thought-date {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--burnt-orange);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 0.35rem;
}

.thought-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--deep-amber);
    margin-bottom: 0.5rem;
}

.thought-item p {
    font-weight: 300;
    margin-bottom: 0;
}

/* --- Contact --- */
.contact-links {
    margin-top: 1.5rem;
}

.contact-link {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--burnt-orange);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.contact-link:hover {
    border-bottom-color: var(--burnt-orange);
}

/* --- Footer --- */
#site-footer {
    padding: 4rem 0 3rem;
    text-align: center;
}

/* --- Scroll Reveal for sections --- */
.section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

#hero {
    opacity: 1;
    transform: none;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    #focus-canvas {
        padding: 0 1rem;
    }

    .paper-card {
        padding: 2rem 1.5rem;
    }

    #main-nav {
        top: 1rem;
        right: 1rem;
    }

    #hero {
        min-height: 90vh;
    }
}
