/* ============================================
   Doyo Choi Portfolio
   Margaret Howell Inspired Minimal Design
   ============================================ */

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

:root {
    --bg: #F9F9F7;
    --paper: #FFFEF9;
    --text: #1a1a1a;
    --text-light: #888;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
}

/* ============================================
   Header - Ultra Minimal
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: var(--bg);
    z-index: 1000;
}

.site-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.03em;
}

.header-nav {
    display: flex;
    gap: 25px;
}

.nav-link {
    font-size: 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.contact-link {
    font-size: 0.7rem;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.contact-link:hover {
    color: var(--text);
}

/* ============================================
   Page Title
   ============================================ */
.page-title {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.page-title span {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.15em;
}

/* ============================================
   Canvas - Drag Area
   ============================================ */
.canvas {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 40px;
}

/* ============================================
   Draggable Items - Paper / Photo Style
   ============================================ */
.item {
    position: absolute;
    cursor: grab;
    user-select: none;
    transition: filter 0.2s, transform 0.1s;
}

.item:active {
    cursor: grabbing;
}

.item.is-dragging {
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.15));
    z-index: 9999 !important;
}

/* Minimized state (double-click to toggle) */
.item.minimized {
    transform-origin: center center;
}

/* Photos - like printed photographs */
.item img {
    display: block;
    max-width: 320px;
    height: auto;
    background: var(--paper);
    padding: 8px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ============================================
   Text Card - Margaret Howell Style
   ============================================ */
.text-card {
    max-width: 280px;
    min-width: 180px;
    background: var(--paper);
    padding: 28px 24px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.03);
}

.text-card .text-content {
    font-family: var(--serif);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    letter-spacing: 0.02em;
    /* Allow text selection/copy */
    user-select: text;
    cursor: text;
}

.text-card .text-content p {
    margin: 0;
    white-space: pre-line;
}

/* Text card hover - subtle */
.text-card:hover {
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.06),
        0 6px 20px rgba(0, 0, 0, 0.04);
}

/* Make text selectable when not dragging */
.text-card:not(.is-dragging) .text-content {
    cursor: text;
}

/* ============================================
   Clickable Items (with URL)
   ============================================ */
.item.clickable {
    cursor: pointer;
}

.item.clickable:hover::after {
    content: '↗';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.8rem;
    color: var(--text-light);
    background: var(--paper);
    padding: 4px 6px;
    border-radius: 4px;
    opacity: 0.8;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    font-size: 0.65rem;
    color: var(--text-light);
    background: var(--bg);
    z-index: 100;
}

.footer a {
    color: var(--text-light);
    text-decoration: none;
}

.footer a:hover {
    color: var(--text);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .item img {
        max-width: 220px;
    }

    .text-card {
        max-width: 220px;
        min-width: 140px;
        padding: 20px 18px;
    }

    .text-card .text-content {
        font-size: 0.85rem;
    }
}