/* ========================================
   LEE SUMIN Portfolio
   Exhibition-AI Track 브랜드(오렌지 #FF7D00, Orbitron 로고 서체) + 이전 포트폴리오의 창 구성.
   원칙: 강조색은 오렌지 하나(버튼·선택 상태·연도), 표면은 단색, 깊이는 헤어라인으로.
   ======================================== */
@font-face {
    font-family: 'Pretendard';
    src: url('../assets/portfolio/PretendardVariable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --orange: #FF7D00;
    --orange-hover: #FF8F24;
    --purple: #4003B1;

    --bg: #07040F;
    --surface: #120C22;
    --surface-2: #19122D;
    --surface-3: #241B3C;

    --text: #F2F0F7;
    --muted: #A9A3BA;
    --accent: #FF9A3D;

    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 125, 0, 0.55);
    --tag-bg: rgba(255, 255, 255, 0.06);

    --r-sm: 6px;
    --r: 10px;
    --r-win: 12px;
    --shadow-win: 0 12px 32px rgba(0, 0, 0, 0.45);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.light {
    --bg: #FFF2E6;
    --surface: #FFFFFF;
    --surface-2: #FFF8F1;
    --surface-3: #F6E8DA;

    --text: #2D241E;
    --muted: #6F6359;
    --accent: #C85C00;

    --border: rgba(0, 0, 0, 0.12);
    --border-strong: rgba(200, 92, 0, 0.6);
    --tag-bg: rgba(0, 0, 0, 0.05);
    --shadow-win: 0 12px 28px rgba(60, 35, 15, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.6;
    word-break: keep-all;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app-title, .win-title { font-family: 'Orbitron', 'Pretendard', sans-serif; }

#hero-canvas-container { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ---------- Menu bar ---------- */
.menubar {
    position: fixed; inset: 0 0 auto 0; z-index: 1000; height: 40px;
    display: flex; align-items: center; gap: 1rem; padding: 0 1rem;
    background: var(--surface); border-bottom: 1px solid var(--border); font-size: 0.85rem;
}
.menubar-logo { display: flex; align-items: baseline; gap: 0.45rem; text-decoration: none; }
.logo-name { font-weight: 800; font-size: 0.95rem; }
.logo-sub { font-size: 0.82rem; color: var(--muted); }
.menubar-apps { display: flex; gap: 0.2rem; }
.menubar-apps button { padding: 0.3rem 0.6rem; border-radius: var(--r-sm); color: var(--muted); transition: background 0.15s, color 0.15s; }
.menubar-apps button:hover { background: var(--surface-3); color: var(--text); }
.menubar-right { margin-left: auto; display: flex; align-items: center; gap: 0.8rem; }
.menubar-clock { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.theme-toggle { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-sm); }
.theme-toggle:hover { background: var(--surface-3); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .sun-icon, .light .theme-toggle .moon-icon { display: none; }
/* 프로필 사진: 다크 모드는 검은 배경, 라이트 모드는 흰 배경 증명사진 */
.photo-light, .light .photo-dark { display: none !important; }
.light .photo-light { display: block !important; }
.light .theme-toggle .sun-icon { display: block; }

/* ---------- Desk ---------- */
.desk {
    position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; scroll-margin-top: 0;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2.5rem; align-items: center;
    max-width: 1280px; margin: 0 auto; padding: 72px 2rem 120px;
}

.welcome { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-win); overflow: hidden; }
.welcome-body { display: grid; grid-template-columns: 170px 1fr; gap: 1.6rem; padding: 1.8rem; align-items: center; }
.welcome-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); background: #000; }
.light .welcome-photo, .light .profile > img { background: #fff; border: 1px solid var(--border); }
.welcome h2 { font-size: clamp(2.2rem, 3.8vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.welcome-role { margin: 0.5rem 0 0.9rem; font-weight: 600; }
.welcome-text { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.4rem; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cta-button {
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.65rem 1.2rem; border-radius: var(--r-sm);
    font-weight: 700; font-size: 0.9rem; text-decoration: none; transition: background 0.15s, border-color 0.15s;
}
.cta-button.primary { background: var(--orange); color: #fff; }
.cta-button.primary:hover { background: var(--orange-hover); }
.cta-button.ghost { border: 1px solid var(--border); }
.cta-button.ghost:hover { border-color: var(--border-strong); }
.welcome-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.stat { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-value { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }

.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.app-tile {
    display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 1.4rem 0.6rem 1.2rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.app-tile:hover { border-color: var(--border-strong); background: var(--surface-2); }
.app-icon { color: var(--text); margin-bottom: 0.4rem; }
.app-tile:hover .app-icon { color: var(--orange); }
.app-icon svg { width: 34px; height: 34px; }
.app-title { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; }
.app-sub { font-size: 0.75rem; color: var(--muted); }
.desk-hint { margin-top: 1rem; font-size: 0.8rem; color: var(--muted); text-align: center; }

/* ---------- Intro + scroll rise ---------- */
.intro {
    position: relative; z-index: 1; min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
    padding: 40px 1.5rem 3rem; text-align: center;
}
.intro-name { font-family: 'Orbitron', 'Pretendard', sans-serif; font-size: clamp(2.6rem, 9vw, 6.5rem); font-weight: 900; letter-spacing: 0.04em; line-height: 1; }
.intro-line { font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 600; }
.scroll-cue {
    position: absolute; bottom: 7rem; left: 50%; transform: translateX(-50%);
    font-size: 0.85rem; color: var(--muted); text-decoration: none; white-space: nowrap;
}
.scroll-cue span { display: inline-block; animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.rise { will-change: transform, opacity; }

/* ---------- Dock ---------- */
.dock-wrap { position: fixed; left: 0; right: 0; bottom: 14px; z-index: 900; display: flex; justify-content: center; pointer-events: none; }
.dock {
    pointer-events: auto; display: flex; gap: 0.25rem; padding: 0.4rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-win);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.dock-item { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0.1rem 0.1rem 0.45rem; }
.dock-icon {
    width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center;
    background: var(--surface-2); border: 1px solid var(--border); transition: border-color 0.15s, color 0.15s;
}
.dock-icon svg { width: 22px; height: 22px; }
.dock-item:hover .dock-icon { border-color: var(--border-strong); color: var(--orange); }
.dock-label {
    position: absolute; bottom: calc(100% + 8px); padding: 0.2rem 0.55rem; border-radius: var(--r-sm); font-size: 0.7rem; font-weight: 700;
    background: var(--surface-3); white-space: nowrap; opacity: 0; transition: opacity 0.15s; pointer-events: none;
}
.dock-item:hover .dock-label { opacity: 1; }
.dock-dot { position: absolute; bottom: 1px; width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.dock-item.running .dock-dot { background: var(--orange); }

/* ---------- Windows ---------- */
#window-layer { position: relative; z-index: 50; }
.win {
    position: fixed; display: flex; flex-direction: column; min-width: 320px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-win);
    box-shadow: var(--shadow-win); overflow: hidden;
    opacity: 0; transition: opacity 0.15s var(--ease);
}
.win.open { opacity: 1; }
.win.focused { border-color: var(--border-strong); }
.win.minimized { display: none; }
.win.maximized { left: 8px !important; top: 48px !important; width: calc(100vw - 16px) !important; height: calc(100dvh - 140px) !important; }
.win.dragging { transition: none; user-select: none; }
.win-titlebar {
    display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0.9rem; cursor: grab;
    background: var(--surface-2); border-bottom: 1px solid var(--border); touch-action: none;
}
.win.dragging .win-titlebar { cursor: grabbing; }
.traffic { display: flex; gap: 0.45rem; }
.tl { width: 13px; height: 13px; border-radius: 50%; }
.tl-red { background: #FF5F57; } .tl-yellow { background: #FEBC2E; } .tl-green { background: #28C840; }
.win-title { flex: 1; text-align: center; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; }
.win-crumb { font-size: 0.72rem; color: var(--muted); min-width: 60px; text-align: right; }
.win-body { flex: 1; overflow-y: auto; padding: 1.6rem 1.8rem 2rem; overscroll-behavior: contain; }
.win-footer {
    display: flex; align-items: center; gap: 1rem; padding: 0.55rem 0.9rem;
    border-top: 1px solid var(--border); background: var(--surface-2); font-size: 0.8rem;
}
.win-footer-msg { flex: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.win-footer-btn { padding: 0.3rem 0.9rem; border-radius: var(--r-sm); border: 1px solid var(--border); font-size: 0.8rem; font-weight: 600; transition: border-color 0.15s; }
.win-footer-btn:hover { border-color: var(--border-strong); }

/* ---------- Window content: shared ---------- */
.win-head { margin-bottom: 1.4rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.win-head h2 { font-size: 1.6rem; font-weight: 800; }
.win-head p { color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }
.section-label { margin: 2.2rem 0 0.9rem; }
.section-label h3 { font-size: 1.1rem; font-weight: 800; }
.section-label p { font-size: 0.85rem; color: var(--muted); margin-top: 0.2rem; }
.section-label-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sort-toggle { display: inline-flex; padding: 2px; border-radius: var(--r-sm); border: 1px solid var(--border); }
.sort-toggle button { padding: 0.25rem 0.75rem; border-radius: 4px; font-size: 0.78rem; color: var(--muted); transition: background 0.15s, color 0.15s; }
.sort-toggle button:hover { color: var(--text); }
.sort-toggle button.active { background: var(--orange); color: #fff; font-weight: 700; }
.paper-kind { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.muted-small { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.72rem; font-weight: 600; border: 1px solid var(--border); color: var(--muted); }
.badge-live { border-color: var(--border-strong); color: var(--accent); font-weight: 700; }
.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag { font-size: 0.74rem; padding: 0.12rem 0.5rem; border-radius: 4px; background: var(--tag-bg); color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.2rem; }
.chip { padding: 0.32rem 0.75rem; border-radius: var(--r-sm); border: 1px solid var(--border); font-size: 0.82rem; color: var(--muted); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.chip span { font-size: 0.72rem; opacity: 0.7; font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.more { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; font-weight: 700; color: var(--accent); }

/* ---------- About ---------- */
.profile { display: grid; grid-template-columns: 180px 1fr; gap: 1.6rem; align-items: start; }
.profile > img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); background: #000; }
.profile-card h2 { font-size: 1.9rem; font-weight: 800; line-height: 1.2; }
.profile-card h2 span { font-size: 1.1rem; font-weight: 600; color: var(--muted); margin-left: 0.3rem; }
.profile-headline { font-weight: 600; margin: 0.35rem 0 1rem; }
.profile-dl { display: grid; grid-template-columns: 3rem 1fr; gap: 0.4rem 0.8rem; font-size: 0.88rem; margin-bottom: 1rem; }
.profile-dl dt { color: var(--muted); }
.skill-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 1.2rem; margin-top: 1.6rem; }
.skill { padding-top: 0.7rem; border-top: 1px solid var(--border); }
.skill h4 { font-size: 0.86rem; margin-bottom: 0.15rem; }
.skill p { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.history-year { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; margin-bottom: 0.6rem; }
.history-year h4 { font-size: 1.05rem; font-weight: 800; color: var(--accent); padding-top: 0.1rem; font-variant-numeric: tabular-nums; }
.history-year ol { list-style: none; border-left: 1px solid var(--border); }
.history-item { position: relative; display: grid; grid-template-columns: 6.8rem 1fr; gap: 0.8rem; padding: 0 0 1.1rem 1.2rem; }
.history-item::before { content: ''; position: absolute; left: -4px; top: 0.5rem; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.history-item.upcoming::before { background: transparent; border: 1px solid var(--muted); }
.history-date { font-size: 0.8rem; font-weight: 600; color: var(--muted); padding-top: 0.1rem; font-variant-numeric: tabular-nums; }
.history-title { font-weight: 700; font-size: 0.96rem; }
.soon { margin-left: 0.25rem; font-size: 0.72rem; font-weight: 600; color: var(--accent); vertical-align: 1px; }
.history-place { font-size: 0.84rem; }
.history-desc { font-size: 0.85rem; color: var(--muted); }

/* ---------- Projects ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem 1rem; }
.card { display: flex; flex-direction: column; gap: 0.7rem; }
.card-thumb { aspect-ratio: 16 / 10; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; transition: border-color 0.15s; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-thumb { border-color: var(--border-strong); }
.card:hover .card-title { color: var(--accent); }
.card-body { display: flex; flex-direction: column; gap: 0.15rem; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.status-dev { padding: 0 0.4rem; border-radius: 4px; border: 1px solid var(--border-strong); color: var(--accent); font-weight: 700; font-size: 0.7rem; }
.card-title { font-weight: 700; font-size: 1rem; line-height: 1.35; transition: color 0.15s; }
.card-sub { font-size: 0.8rem; color: var(--muted); }
.card.is-private { cursor: default; }
.card.is-private:hover .card-thumb { border-color: var(--border); }
.card.is-private:hover .card-title { color: inherit; }

/* ---------- Detail ---------- */
.back-button { margin-bottom: 1.2rem; padding: 0.3rem 0.8rem; border-radius: var(--r-sm); border: 1px solid var(--border); font-size: 0.82rem; color: var(--muted); transition: color 0.15s, border-color 0.15s; }
.back-button:hover { color: var(--text); border-color: var(--border-strong); }
.detail-hero { margin-bottom: 1.3rem; border-radius: var(--r); overflow: hidden; background: #000; }
.detail-hero img { width: 100%; max-height: 380px; object-fit: contain; }
.detail-title { font-size: 1.6rem; font-weight: 800; line-height: 1.3; margin-top: 0.5rem; }
.detail-sub { color: var(--muted); margin-top: 0.3rem; font-size: 0.92rem; }
.detail-authors { color: var(--muted); font-size: 0.85rem; font-style: italic; margin-top: 0.2rem; }
.detail-desc { margin: 1.2rem 0; line-height: 1.8; }
.detail-list { padding-left: 1.1rem; display: grid; gap: 0.45rem; margin-bottom: 1.4rem; color: var(--muted); font-size: 0.92rem; }
.detail-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.link-button { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.5rem 1rem; border-radius: var(--r-sm); background: var(--orange); color: #fff; text-decoration: none; font-weight: 700; font-size: 0.85rem; transition: background 0.15s; }
.link-button:hover { background: var(--orange-hover); }

/* ---------- Papers ---------- */
.paper-list { display: grid; grid-template-columns: 1fr; }
.paper {
    display: flex; flex-direction: column; gap: 0.35rem; padding: 1.3rem 0;
    border-bottom: 1px solid var(--border);
}
.paper:first-child { padding-top: 0; }
.paper:hover .paper-title { color: var(--accent); }
.paper-title { font-size: 1.2rem; font-weight: 800; transition: color 0.15s; }
.paper-full { font-size: 0.82rem; color: var(--muted); font-style: italic; }
.paper-desc { font-size: 0.88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Certificates ---------- */
.award-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.award { display: grid; grid-template-columns: 120px 1fr; overflow: hidden; border-radius: var(--r); border: 1px solid var(--border); transition: border-color 0.15s; }
.award:hover { border-color: var(--border-strong); }
.award-thumb { background: var(--surface-3); }
.award-thumb img { width: 100%; height: 100%; object-fit: cover; }
.award-body { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.9rem 1rem; }
.cert-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.cert { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem 1.1rem; border-radius: var(--r); border: 1px solid var(--border); }
.cert h4 { font-size: 1rem; }
.cert-org { font-size: 0.84rem; color: var(--muted); }
.cert-id { font-size: 0.8rem; color: var(--muted); }
.cert-id code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }
.cert-desc { font-size: 0.85rem; color: var(--muted); }
.cert-list { padding-left: 1rem; font-size: 0.8rem; color: var(--muted); display: grid; gap: 0.15rem; }
.cert-link { margin-top: 0.3rem; display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; font-weight: 700; color: var(--accent); text-decoration: none; }

/* ---------- Archive ---------- */
.talk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1.2rem; }
.talk { display: flex; flex-direction: column; gap: 0.7rem; }
.talk-thumb { aspect-ratio: 16 / 8; overflow: hidden; border-radius: var(--r); background: #000; }
.talk-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.talk-redacted { display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--border); }
.sticker {
    display: inline-block; padding: 0.4rem 1rem; border-radius: 4px; transform: rotate(-4deg);
    background: var(--orange); color: #fff; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.02em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.sticker-sm { margin-top: 0.3rem; padding: 0.1rem 0.55rem; font-size: 0.74rem; transform: rotate(-2deg); }
.talk-body h4 { font-size: 1rem; margin: 0.1rem 0 0.3rem; }
.talk-body > p:last-child { font-size: 0.86rem; color: var(--muted); }
.method { list-style: none; display: grid; grid-template-columns: repeat(8, 1fr); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.method li { padding: 0.8rem 0.4rem; text-align: center; font-size: 0.82rem; font-weight: 600; }
.method li + li { border-left: 1px solid var(--border); }
.method li span { display: block; font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.blog-card { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); text-decoration: none; }
.blog-card strong { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 1.05rem; }
.blog-card:hover strong { color: var(--accent); }
.blog-card span { font-size: 0.86rem; color: var(--muted); }

/* ---------- Contact ---------- */
.namecard { max-width: 520px; margin: 0.5rem auto 0; padding: 1.6rem 1.8rem; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.namecard-top { margin-bottom: 1.2rem; }
.namecard-org { font-size: 0.8rem; color: var(--muted); }
.namecard h2 { font-size: 1.9rem; font-weight: 800; }
.namecard h2 span { font-size: 0.95rem; font-weight: 600; color: var(--muted); margin-left: 0.4rem; letter-spacing: 0.04em; }
.namecard-pos { color: var(--muted); font-size: 0.9rem; margin: 0.3rem 0 1.2rem; }
.namecard dl { display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.4rem 0.8rem; font-size: 0.92rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.namecard dt { color: var(--muted); font-size: 0.82rem; padding-top: 0.1rem; }
.namecard dd a { text-decoration: none; }
.namecard dd a:hover { color: var(--accent); }
.copy { margin-left: 0.4rem; padding: 0.05rem 0.5rem; border-radius: 4px; border: 1px solid var(--border); font-size: 0.72rem; color: var(--muted); }
.connect { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; max-width: 520px; margin: 0 auto; }
.connect a { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--border); text-decoration: none; font-weight: 600; transition: border-color 0.15s, color 0.15s; }
.connect a:hover { border-color: var(--border-strong); color: var(--accent); }
.win[data-win="contact"] .section-label { max-width: 520px; margin-left: auto; margin-right: auto; }
.mail-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; max-width: 520px; margin: 0 auto; }
.mail-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.82rem; color: var(--muted); }
.mail-form .full { grid-column: 1 / -1; }
.mail-form input, .mail-form textarea {
    font: inherit; font-size: 0.92rem; color: var(--text); background: var(--surface-2);
    border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.6rem 0.75rem; transition: border-color 0.15s;
}
.mail-form textarea { resize: vertical; min-height: 120px; }
.mail-form input:focus, .mail-form textarea:focus { outline: none; border-color: var(--border-strong); }
.mail-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mail-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.mail-submit { border: 0; cursor: pointer; }
.mail-submit:disabled { opacity: 0.6; cursor: progress; }
.mail-status { font-size: 0.84rem; color: var(--muted); }
.mail-status[data-state="ok"] { color: var(--text); font-weight: 600; }
.mail-status[data-state="error"] { color: var(--accent); }
@media (max-width: 560px) { .mail-form { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .desk { grid-template-columns: 1fr; max-width: 760px; gap: 1.5rem; padding-top: 64px; }
    .skill-grid { grid-template-columns: repeat(3, 1fr); gap: 0.8rem 1.2rem; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .method { grid-template-columns: repeat(4, 1fr); }
    .method li:nth-child(5) { border-left: 0; }
    .method li:nth-child(n+5) { border-top: 1px solid var(--border); }
}
@media (max-width: 860px) {
    .menubar-apps { display: none; }
    .desk { padding: 56px 1rem 110px; }
    .win {
        left: 0 !important; top: 40px !important; width: 100vw !important; height: calc(100dvh - 40px) !important;
        border-radius: 0; border-left: 0; border-right: 0;
    }
    .win-titlebar { cursor: default; }
    .win-body { padding: 1.2rem 1rem 1.6rem; }
    .dock-wrap { bottom: 8px; }
    body.has-window .dock-wrap { display: none; }
    .dock { gap: 0.1rem; padding: 0.35rem; }
    .dock-icon { width: 40px; height: 40px; }
    .dock-label { display: none; }
    .profile { grid-template-columns: 110px 1fr; gap: 0.9rem; }
    .award-grid, .talk-grid { grid-template-columns: 1fr; }
    .cert-row { grid-template-columns: 1fr; }
    .history-year { grid-template-columns: 1fr; gap: 0.4rem; }
}
@media (max-width: 560px) {
    html { font-size: 14px; }
    .menubar-clock { display: none; }
    .welcome-body { grid-template-columns: 96px 1fr; gap: 1rem; padding: 1.2rem; align-items: start; }
    .welcome-stats { grid-template-columns: repeat(2, 1fr); }
    .welcome-stats .stat:nth-child(3) { border-left: 0; }
    .welcome-stats .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
    .app-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .profile { grid-template-columns: 1fr; }
    .profile > img { max-width: 160px; }
    .skill-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: 1fr; }
    .history-item { grid-template-columns: 1fr; gap: 0; }
    .award { grid-template-columns: 96px 1fr; }
    .method { grid-template-columns: repeat(2, 1fr); }
    .method li:nth-child(odd) { border-left: 0; }
    .method li:nth-child(n+3) { border-top: 1px solid var(--border); }
    .connect { grid-template-columns: 1fr; }
    .namecard { padding: 1.3rem; }
    .win-crumb { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
