/* ============================================
   piospapios.com — style.css
   Warm, round, generous aesthetic
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --cream: #FFF8EE;
    --warm-white: #FFFDF8;
    --yolk: #E8923E;
    --yolk-light: #F2C94C;
    --coral: #D4603A;
    --golden-light: #F5DEB3;
    --brown-dark: #2C1810;
    --brown-medium: #5C3D2E;
    --brown-light: #8B6B5A;
    --surface: #FFF3E3;
    --dark-bg: #1A0F08;
    --dark-surface: rgba(255, 255, 255, 0.04);
    --dark-border: rgba(255, 255, 255, 0.07);

    --font-display: 'Fraunces', serif;
    --font-body: 'Nunito', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--brown-dark);
    background: var(--cream);
    line-height: 1.7;
    font-size: clamp(1rem, 1.1vw, 1.125rem);
    overflow-x: hidden;
    cursor: none;
}

@media (hover: none), (pointer: coarse) {
    body { cursor: auto; }
}

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: var(--yolk);
    color: var(--cream);
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* ---------- Noise Overlay ---------- */
.noise {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.028;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ---------- Custom Cursor ---------- */
.cursor,
.cursor-trail {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor {
    width: 10px;
    height: 10px;
    background: var(--yolk);
    mix-blend-mode: exclusion;
}

.cursor-trail {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--yolk);
    transition: width 0.3s var(--ease-out-expo),
                height 0.3s var(--ease-out-expo),
                opacity 0.3s ease;
}

body:hover .cursor,
body:hover .cursor-trail {
    opacity: 1;
}

.cursor-trail.hovering {
    width: 52px;
    height: 52px;
    border-color: var(--coral);
}

@media (hover: none), (pointer: coarse) {
    .cursor, .cursor-trail { display: none !important; }
}

/* ---------- Navigation ---------- */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem clamp(1.5rem, 4vw, 3rem);
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#nav.scrolled {
    background: rgba(255, 248, 238, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(44, 24, 16, 0.06);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s var(--ease-out-back);
}

.nav-logo:hover {
    transform: scale(1.1) rotate(-5deg);
}

.nav-links {
    display: flex;
    gap: 2.25rem;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--brown-medium);
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--yolk);
    border-radius: 2px;
    transition: width 0.4s var(--ease-out-expo);
}

.nav-links a:hover {
    color: var(--brown-dark);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ---------- Hero ---------- */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(
        140deg,
        var(--cream) 0%,
        #FFF3E0 25%,
        #FFE8CC 50%,
        #FFF0DB 75%,
        var(--cream) 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

#particles {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Decorative blobs */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    will-change: transform;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--yolk);
    opacity: 0.08;
    top: -10%;
    right: -5%;
    animation: floatBlob 25s ease-in-out infinite;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: var(--coral);
    opacity: 0.06;
    bottom: 5%;
    left: -5%;
    animation: floatBlob 20s ease-in-out infinite reverse;
}

.blob-3 {
    width: 280px;
    height: 280px;
    background: var(--yolk-light);
    opacity: 0.07;
    top: 40%;
    left: 15%;
    animation: floatBlob 22s ease-in-out infinite 3s;
}

.blob-4 {
    width: 200px;
    height: 200px;
    background: var(--golden-light);
    opacity: 0.1;
    top: 20%;
    right: 20%;
    animation: floatBlob 18s ease-in-out infinite 5s;
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(15px, 15px) scale(1.02); }
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 1rem;
}

.brand-name {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 9vw, 8rem);
    font-weight: 800;
    font-optical-sizing: auto;
    color: var(--brown-dark);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.brand-name .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(50px) scale(0.8);
    animation: letterReveal 0.7s var(--ease-out-back) forwards;
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Staggered delays set in HTML via JS */
.brand-name .letter:nth-child(1) { animation-delay: 0.3s; }
.brand-name .letter:nth-child(2) { animation-delay: 0.37s; }
.brand-name .letter:nth-child(3) { animation-delay: 0.44s; }
.brand-name .letter:nth-child(4) { animation-delay: 0.51s; }
.brand-name .letter:nth-child(5) { animation-delay: 0.58s; }
.brand-name .letter:nth-child(6) { animation-delay: 0.65s; }
.brand-name .letter:nth-child(7) { animation-delay: 0.72s; }
.brand-name .letter:nth-child(8) { animation-delay: 0.79s; }
.brand-name .letter:nth-child(9) { animation-delay: 0.86s; }
.brand-name .letter:nth-child(10) { animation-delay: 0.93s; }

.whisper {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--yolk);
    letter-spacing: 0.35em;
    opacity: 0;
    filter: blur(4px);
    animation: whisperPulse 9s ease-in-out 2s infinite;
    margin-bottom: 1.5rem;
}

@keyframes whisperPulse {
    0%, 100% { opacity: 0; filter: blur(4px); }
    20%, 65% { opacity: 0.55; filter: blur(0); }
    85% { opacity: 0; filter: blur(3px); }
}

.tagline {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 300;
    color: var(--brown-light);
    letter-spacing: 0.2em;
    text-transform: lowercase;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out-expo) 1.5s forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out-expo) 2.5s forwards;
}

.scroll-egg {
    width: 16px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--brown-light);
    opacity: 0.4;
    animation: eggBounce 2.5s ease-in-out infinite;
    position: relative;
}

.scroll-egg::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 5px;
    border-radius: 3px;
    background: var(--brown-light);
    animation: scrollDot 2.5s ease-in-out infinite;
}

@keyframes eggBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes scrollDot {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(4px); }
}

.scroll-text {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brown-light);
    opacity: 0.35;
}

/* ---------- About ---------- */
#about {
    padding: clamp(5rem, 10vw, 9rem) 0;
    background: var(--cream);
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--brown-dark);
    line-height: 1.15;
    margin-bottom: 2rem;
    letter-spacing: -0.015em;
}

.about-text p {
    color: var(--brown-medium);
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    margin-bottom: 1.5rem;
    max-width: 540px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-illustration {
    width: 100%;
    max-width: 380px;
    height: auto;
    animation: gentleSway 12s ease-in-out infinite;
}

@keyframes gentleSway {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(1deg) scale(1.01); }
    50% { transform: rotate(-0.5deg) scale(0.99); }
    75% { transform: rotate(0.5deg) scale(1.005); }
}

/* ---------- Work / Craft ---------- */
#work {
    padding: clamp(5rem, 10vw, 9rem) 0;
    background: var(--dark-bg);
    position: relative;
}

#work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--yolk) 50%, transparent 100%);
    opacity: 0.3;
}

.section-title--light {
    color: var(--cream);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    margin-top: 3rem;
}

.skill-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 24px;
    padding: clamp(2rem, 3vw, 2.75rem);
    transition: transform 0.5s var(--ease-out-expo),
                box-shadow 0.5s var(--ease-out-expo),
                background 0.4s ease,
                border-color 0.4s ease;
}

.skill-card:hover {
    transform: translateY(-6px) scale(1.015);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.skill-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
}

.skill-icon svg {
    width: 100%;
    height: 100%;
}

.skill-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.skill-card p {
    font-size: 0.95rem;
    color: var(--brown-light);
    line-height: 1.65;
}

/* ---------- Contact ---------- */
#contact {
    padding: clamp(5rem, 10vw, 9rem) 0;
    background: var(--cream);
    text-align: center;
    position: relative;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--coral) 50%, transparent 100%);
    opacity: 0.2;
}

.contact-message {
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    color: var(--brown-medium);
    max-width: 480px;
    margin: 0 auto 2.5rem;
    line-height: 1.75;
}

.contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--brown-dark);
    padding: 0.75rem 2rem;
    border-radius: 100px;
    background: linear-gradient(135deg, var(--yolk) 0%, var(--coral) 100%);
    background-size: 200% 200%;
    color: var(--cream);
    transition: transform 0.4s var(--ease-out-back),
                box-shadow 0.4s var(--ease-out-expo),
                background-position 0.6s ease;
    box-shadow: 0 4px 20px rgba(232, 146, 62, 0.2);
    margin-bottom: 3rem;
}

.contact-email:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 36px rgba(232, 146, 62, 0.35);
    background-position: 100% 100%;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid rgba(44, 24, 16, 0.15);
    color: var(--brown-medium);
    transition: transform 0.4s var(--ease-out-back),
                border-color 0.3s ease,
                color 0.3s ease,
                background 0.3s ease;
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    border-color: var(--yolk);
    color: var(--yolk);
    background: rgba(232, 146, 62, 0.06);
}

/* ---------- Footer ---------- */
footer {
    padding: 2.5rem 0;
    background: var(--dark-bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    font-size: 0.82rem;
    color: var(--brown-light);
    opacity: 0.5;
}

.footer-tagline {
    font-style: italic;
    font-family: var(--font-display);
    letter-spacing: 0.06em;
}

/* ---------- Scroll Animations ---------- */
.animate-in {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children in about section */
.about-text .animate-in:nth-child(1) { transition-delay: 0s; }
.about-text .animate-in:nth-child(2) { transition-delay: 0.1s; }
.about-text .animate-in:nth-child(3) { transition-delay: 0.2s; }
.about-text .animate-in:nth-child(4) { transition-delay: 0.3s; }

/* Stagger skill cards */
.skills-grid .animate-in:nth-child(1) { transition-delay: 0s; }
.skills-grid .animate-in:nth-child(2) { transition-delay: 0.1s; }
.skills-grid .animate-in:nth-child(3) { transition-delay: 0.2s; }
.skills-grid .animate-in:nth-child(4) { transition-delay: 0.3s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-visual {
        order: -1;
    }

    .about-illustration {
        max-width: 280px;
    }

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

@media (max-width: 600px) {
    .nav-links {
        gap: 1.25rem;
    }

    .nav-links a {
        font-size: 0.82rem;
    }

    .brand-name {
        font-size: clamp(2.6rem, 14vw, 4rem);
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .skill-card {
        padding: 1.75rem;
    }

    .contact-email {
        font-size: 1.1rem;
        padding: 0.65rem 1.5rem;
    }
}
