/* ========================================
   gunsul.studio - Inflated 3D Portfolio
   ======================================== */

:root {
    --warm-cream: #FBF6F0;
    --soft-linen: #FFF8F2;
    --warm-charcoal: #3D3229;
    --muted-umber: #8A7D72;
    --terracotta-blush: #D4856A;
    --deep-terracotta: #B8664E;
    --pale-sand: #E8DFD4;
    --warm-shadow: #C9B8A8;
    --roasted-cocoa: #4A3728;
    --ease-inflate: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--warm-cream);
    color: var(--warm-charcoal);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

/* --- Typography --- */
h1 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.15;
    color: var(--warm-charcoal);
}

h2 {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.35rem);
    letter-spacing: -0.01em;
    color: var(--warm-charcoal);
}

/* --- Flowing Curves --- */
.flowing-curves {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.flowing-curves path {
    fill: none;
    stroke: var(--pale-sand);
    stroke-width: 1.5;
}

/* --- Landing --- */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 2rem;
    text-align: center;
}

.landing-title {
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.landing-tagline {
    font-size: clamp(0.875rem, 1.5vw, 1.1rem);
    color: var(--muted-umber);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

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

.landing-curve {
    width: 10px;
    height: 200px;
    margin-top: 2rem;
}

.landing-curve-path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawCurve 1.2s ease 1.2s forwards;
}

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

/* --- Header --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem clamp(2rem, 6vw, 5rem);
    position: relative;
    z-index: 1;
}

.header-identity {
    font-weight: 500;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.header-tagline {
    font-size: clamp(0.875rem, 1.5vw, 1.1rem);
    color: var(--muted-umber);
}

.header-line {
    height: 1px;
    background: var(--pale-sand);
    margin: 0 clamp(2rem, 6vw, 5rem);
    position: relative;
    z-index: 1;
}

/* --- Portfolio Grid --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem clamp(2rem, 6vw, 5rem) 4rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 1024px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .portfolio-grid { grid-template-columns: 1fr; }
}

/* --- Project Cards --- */
.project-card {
    border-radius: 24px;
    overflow: hidden;
    background: var(--soft-linen);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.06),
        inset 4px 4px 12px rgba(255,255,255,0.25),
        inset -4px -4px 12px rgba(0,0,0,0.08);
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s var(--ease-inflate), transform 0.6s var(--ease-inflate), box-shadow 0.35s var(--ease-spring);
    cursor: pointer;
}

.project-card.revealed {
    opacity: 1;
    transform: scale(1);
}

.project-card:hover {
    transform: scale(1.035);
    box-shadow:
        0 12px 40px rgba(0,0,0,0.1),
        inset 4px 4px 12px rgba(255,255,255,0.25),
        inset -4px -4px 12px rgba(0,0,0,0.08);
    transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring);
}

.project-card:not(:hover) {
    transition: transform 0.45s var(--ease-inflate), box-shadow 0.45s var(--ease-inflate);
}

/* --- Card Image --- */
.card-image {
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
}

.card-image-bg {
    width: 100%;
    height: 100%;
}

.duotone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--terracotta-blush);
    mix-blend-mode: multiply;
    opacity: 0.5;
    transition: opacity 0.5s ease-out;
    z-index: 1;
}

.project-card:hover .duotone-overlay {
    opacity: 0;
}

/* --- Card Caption --- */
.card-caption {
    padding: 1rem 1.25rem;
}

.card-title {
    position: relative;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.title-underline {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 8px;
}

.title-underline path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 0.4s ease;
}

.project-card:hover .title-underline path {
    stroke-dashoffset: 0;
}

.card-tag {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted-umber);
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

.footer-email {
    font-size: 1rem;
    color: var(--warm-charcoal);
    margin-bottom: 1.5rem;
}

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

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 35% 25%, rgba(255,255,255,0.4) 0%, var(--soft-linen) 60%);
    box-shadow:
        0 4px 12px rgba(0,0,0,0.06),
        inset 2px 2px 6px rgba(255,255,255,0.3),
        inset -2px -2px 6px rgba(0,0,0,0.06);
    display: block;
    transition: transform 0.35s var(--ease-spring);
}

.social-link:hover {
    transform: scale(1.1);
}
