/* ============================================
   hwaklyul.com — Executive Naturalism
   Chrome-metallic palette, Korean mountain aesthetic
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --anthracite: #0d0d0f;
    --pearl-ash: #f0f0f2;
    --polished-silver: #c0c0c8;
    --tarnished-steel: #8a8a92;
    --deep-celadon: #4a6e5c;
    --charcoal-ink: #1a1a1e;
    --steel-mist: #6b6b72;
    --frost-white: #e8e8ec;

    --chrome-gradient: linear-gradient(135deg, #c0c0c8 0%, #8a8a92 55%, #c0c0c8 100%);
    --brushed-metal: linear-gradient(135deg, #c0c0c8 0%, #8a8a92 55%, #c0c0c8 100%),
                     linear-gradient(137deg, #b8b8c0 0%, #909098 50%, #b8b8c0 100%),
                     linear-gradient(133deg, #c4c4cc 0%, #8c8c94 55%, #c4c4cc 100%);

    --ease-corporate: cubic-bezier(0.25, 0.1, 0.25, 1);

    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

/* ---------- 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(--charcoal-ink);
    background-color: var(--anthracite);
    line-height: 1.7;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

a {
    color: var(--charcoal-ink);
    text-decoration: none;
    transition: color 0.2s var(--ease-corporate);
    background-image: linear-gradient(var(--deep-celadon), var(--deep-celadon));
    background-size: 0% 1px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: color 0.2s var(--ease-corporate), background-size 0.3s var(--ease-corporate);
}

a:hover {
    color: var(--deep-celadon);
    background-size: 100% 1px;
}

/* ---------- Navigation ---------- */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background-color: rgba(13, 13, 15, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-corporate);
    border-bottom: 1px solid rgba(232, 232, 236, 0.08);
}

.nav-bar.visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    color: var(--frost-white);
}

.nav-links {
    display: flex;
    gap: 32px;
    position: relative;
    align-items: center;
}

.nav-link {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tarnished-steel);
    background-image: none;
    transition: color 0.2s var(--ease-corporate);
    padding-bottom: 4px;
}

.nav-link:hover {
    color: var(--frost-white);
    background-image: none;
    background-size: 0;
}

.nav-indicator {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 1px;
    background-color: var(--frost-white);
    transition: transform 0.3s var(--ease-corporate), width 0.3s var(--ease-corporate);
    opacity: 0;
}

/* ---------- Hero: Executive Viewport ---------- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--anthracite);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-mountain {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 120% 80% at 60% 40%, rgba(74, 110, 92, 0.06), transparent),
        radial-gradient(ellipse 100% 60% at 40% 55%, rgba(138, 138, 146, 0.08), transparent),
        linear-gradient(180deg,
            #0d0d0f 0%,
            #151518 15%,
            #1e1e24 25%,
            #252530 32%,
            #1a1a22 38%,
            #2a2a35 42%,
            #222230 48%,
            #1c1c28 55%,
            #282838 60%,
            #1a1a28 65%,
            #202030 70%,
            #262638 75%,
            #1e1e2c 82%,
            #181822 90%,
            #0d0d0f 100%
        );
    filter: saturate(0.6) hue-rotate(-10deg);
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    background-attachment: fixed;
}

.hero-mountain.revealed {
    opacity: 1;
    transform: scale(1);
}

.hero-chrome-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(192, 192, 200, 0.12) 0%,
        rgba(138, 138, 146, 0.08) 55%,
        rgba(192, 192, 200, 0.1) 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(232, 232, 236, 0.1);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-100%);
    transition: transform 0.8s var(--ease-corporate);
    transition-delay: 0.5s;
    overflow: hidden;
}

.hero-chrome-panel.revealed {
    transform: translateX(0);
}

.hero-chrome-content {
    text-align: center;
    padding: 40px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.8rem, 7vw, 6rem);
    letter-spacing: 0.04em;
    line-height: 1.1;
    color: var(--frost-white);
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: 2px solid var(--frost-white);
    animation: none;
}

.hero-title.typing {
    animation: typewriter 0.7s steps(12) forwards, blink-caret 0.6s step-end 2;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    50% { border-color: transparent; }
}

.hero-title.typed {
    width: 100%;
    border-right: none;
}

.hero-rule {
    width: 100%;
    height: 1px;
    background-color: var(--frost-white);
    margin-top: 16px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-corporate);
}

.hero-rule.drawn {
    transform: scaleX(1);
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tarnished-steel);
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.6s var(--ease-corporate);
}

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

.hero-plum-blossom {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 100px;
    height: 150px;
    opacity: 0.04;
    z-index: 3;
}

.plum-svg {
    width: 100%;
    height: 100%;
}

/* ---------- Divider Bands ---------- */
.divider-band {
    width: 100%;
    height: 80px;
    background: var(--chrome-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider-text {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--charcoal-ink);
}

/* ---------- Vitrine Grid Sections ---------- */
.vitrine-section {
    padding: 60px 24px;
    max-width: 1248px;
    margin: 0 auto;
}

.vitrine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ---------- Vitrine Cards ---------- */
.vitrine-card {
    position: relative;
    overflow: hidden;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 141.4%; /* Silver ratio 1:1.414 */
    overflow: hidden;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: saturate(0.6) hue-rotate(-10deg);
}

.card-reflection {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: inherit;
    transform: scaleY(-1);
    opacity: 0.06;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.15), transparent);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
}

.chrome-bar {
    width: 100%;
    height: 2px;
    background: var(--chrome-gradient);
    transition: height 0.3s var(--ease-corporate);
}

.vitrine-card:hover .chrome-bar {
    height: 4px;
}

/* Card Dark Variant */
.card-dark {
    background-color: var(--anthracite);
    transition: box-shadow 0.3s var(--ease-corporate);
}

.card-dark:hover {
    box-shadow: 0 4px 24px rgba(192, 192, 200, 0.08);
}

.card-dark .card-title {
    color: var(--frost-white);
}

.card-dark .card-body {
    color: var(--tarnished-steel);
}

.card-dark .card-meta {
    color: var(--steel-mist);
}

/* Card Light Variant */
.card-light {
    background-color: var(--pearl-ash);
    transition: box-shadow 0.3s var(--ease-corporate);
}

.card-light:hover {
    box-shadow: 0 4px 24px rgba(13, 13, 15, 0.2);
}

.card-light .card-title {
    color: var(--charcoal-ink);
}

.card-light .card-body {
    color: var(--steel-mist);
}

.card-light .card-meta {
    color: var(--tarnished-steel);
}

/* Card Content */
.card-content {
    padding: 20px;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin-bottom: 12px;
}

.card-body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    max-width: 38em;
    margin-bottom: 16px;
}

.card-meta {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: block;
}

/* Card reveal animation */
.card-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-corporate), transform 0.6s var(--ease-corporate);
}

.card-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Terminal Shelf (Footer) ---------- */
.terminal-shelf {
    position: relative;
    width: 100%;
    min-height: 60vh;
    background-color: var(--anthracite);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.terminal-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 50% 30%, rgba(192, 192, 200, 0.05), transparent),
        linear-gradient(180deg,
            rgba(26, 26, 30, 0.3) 0%,
            rgba(42, 42, 50, 0.2) 20%,
            rgba(34, 34, 42, 0.25) 40%,
            rgba(26, 26, 35, 0.3) 60%,
            rgba(20, 20, 28, 0.35) 80%,
            rgba(13, 13, 15, 0.5) 100%
        );
    filter: saturate(0.4);
    background-attachment: fixed;
}

.terminal-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(4rem, 10vw, 9rem);
    letter-spacing: 0.04em;
    color: var(--frost-white);
    opacity: 0.03;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.terminal-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 24px;
}

.terminal-plum {
    width: 80px;
    height: 120px;
    margin: 0 auto 24px;
    opacity: 0.3;
}

.plum-footer {
    width: 100%;
    height: 100%;
}

.terminal-text {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    letter-spacing: 0.04em;
    color: var(--frost-white);
    margin-bottom: 8px;
}

.terminal-meta {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--steel-mist);
}

/* ---------- Blockquote (if used) ---------- */
blockquote {
    border-left: 3px solid var(--deep-celadon);
    padding-left: 16px;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--steel-mist);
}

/* ---------- Hairline Separators ---------- */
.hairline-dark {
    width: 100%;
    height: 1px;
    background-color: var(--frost-white);
}

.hairline-light {
    width: 100%;
    height: 1px;
    background-color: var(--tarnished-steel);
}

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

    .hero-chrome-panel {
        width: 50%;
    }
}

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

    .hero-chrome-panel {
        width: 70%;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-link {
        font-size: 0.65rem;
    }

    .vitrine-section {
        padding: 40px 16px;
    }

    .card-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .hero-chrome-panel {
        width: 85%;
    }

    .nav-links {
        gap: 12px;
    }

    .hero-plum-blossom {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 90px;
    }
}

/* ---------- Parallax fallback for mobile ---------- */
@supports not (background-attachment: fixed) {
    .hero-mountain,
    .terminal-photo {
        background-attachment: scroll;
    }
}

@media (hover: none) {
    .hero-mountain,
    .terminal-photo {
        background-attachment: scroll;
    }
}
