/* ================================================================
   lifelog.css  —  lifelog Shared Design System
   ================================================================
   <link rel="stylesheet" href="/css/lifelog.css" />
   각 HTML의 <style> 태그 전체를 이 파일로 교체하고,
   페이지별 고유 스타일은 별도 <style> 태그에 최소한으로 유지.

   Contents
   ────────────────────────────────────────────────────────────
   01  Design Tokens (CSS Custom Properties)
   02  Reset & Base
   03  Navigation
   04  Footer
   05  Animations & Keyframes
   06  Utilities
   07  Components — Tags / Chips / Badges
   08  Components — Buttons
   09  Components — Form Inputs & Tag-Wrap
   10  Components — Toggle Switch
   11  Components — Toast Notification
   12  Components — Modal Backdrop
   13  Components — Status Bar
   14  Components — Section Divider
   15  Components — Pagination
   16  Components — Author Card & Share Row
   17  Components — Comment Section
   18  Components — Code Block
   19  Components — Syntax Highlight Tokens
   20  Components — Callout Box
   21  Components — Option Table
   22  Page: index.html (Blog List + Hero)
   23  Page: post.html  (Post Detail)
   24  Page: profile.html (Resume)
   25  Page: photos.html (Gallery)
   26  Page: editor.html (Post Editor)
   27  Page: photo-upload.html
   28  Responsive (Media Queries)
   ================================================================ */


/* ════════════════════════════════════════════════════════════════
   01  Design Tokens
   ════════════════════════════════════════════════════════════════ */
:root {
    --ink:      #1a1714;
    --paper:    #f5f0e8;
    --cream:    #ede8dc;
    --accent:   #8b3a2a;
    --accent2:  #c46a3e;
    --muted:    #7a736a;
    --border:   #d4cdc0;

    --nav-h:    64px;
    --nav-bg:   rgba(26, 23, 20, 0.97);

    --code-bg:     #0f0e0c;
    --code-border: rgba(255, 255, 255, 0.08);

    --r-sm: 3px;
    --r-md: 5px;
    --r-lg: 8px;
    --t:    0.2s ease;
}


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

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; }


/* ════════════════════════════════════════════════════════════════
   03  Navigation
   ════════════════════════════════════════════════════════════════ */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--nav-bg);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
    font-family: 'EB Garamond', serif;
    font-size: 1.25rem;
    color: #f5f0e8;
    letter-spacing: 0.03em;
    text-decoration: none;
    opacity: 0.9;
    flex-shrink: 0;
}
.nav-logo span { color: var(--accent2); }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }

.nav-links li a {
    display: flex; align-items: center; gap: 6px;
    color: rgba(245,240,232,0.65);
    text-decoration: none;
    font-size: 0.78rem; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase;
    padding: 8px 18px; border-radius: var(--r-sm);
    position: relative;
    transition: color var(--t), background var(--t);
}
.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; right: 50%;
    height: 2px; background: var(--accent2);
    transition: left 0.3s, right 0.3s;
    border-radius: 1px;
}
.nav-links li a:hover,
.nav-links li a.active        { color: #f5f0e8; background: rgba(255,255,255,0.06); }
.nav-links li a:hover::after,
.nav-links li a.active::after { left: 16px; right: 16px; }

.nav-icon { font-size: 0.9rem; opacity: 0.6; transition: opacity var(--t), transform 0.3s; }
.nav-links li a:hover .nav-icon,
.nav-links li a.active .nav-icon { opacity: 1; transform: translateY(-1px); }

/* Nav separator & action buttons (editor / upload pages) */
.nav-sep { width: 1px; height: 18px; background: rgba(255,255,255,0.1); flex-shrink: 0; }

.nav-post-title-input {
    flex: 1; background: none; border: none; outline: none;
    font-family: 'EB Garamond', serif; font-size: 1.1rem;
    color: rgba(245,240,232,0.75); letter-spacing: 0.01em; min-width: 0;
}
.nav-post-title-input::placeholder { color: rgba(245,240,232,0.2); }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.nav-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.63rem; letter-spacing: 0.12em; text-transform: uppercase;
    padding: 6px 16px; border-radius: var(--r-sm);
    cursor: pointer; border: none; transition: all var(--t);
}
.nav-btn-ghost   { background: rgba(255,255,255,0.05); color: rgba(245,240,232,0.45); border: 1px solid rgba(255,255,255,0.1); }
.nav-btn-ghost:hover { color: rgba(245,240,232,0.8); background: rgba(255,255,255,0.09); }
.nav-btn-outline { background: transparent; color: rgba(245,240,232,0.55); border: 1px solid rgba(255,255,255,0.15); }
.nav-btn-outline:hover { border-color: var(--accent2); color: var(--accent2); }
.nav-btn-primary { background: var(--accent2); color: #fff; }
.nav-btn-primary:hover    { background: var(--accent); }
.nav-btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }

/* Save status indicator */
.save-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem; letter-spacing: 0.12em;
    color: rgba(245,240,232,0.25);
    display: flex; align-items: center; gap: 5px;
}
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(245,240,232,0.2); transition: background 0.3s; }
.save-dot.saved   { background: #28c840; }
.save-dot.saving  { background: var(--accent2); animation: pulse 1s infinite; }
.save-dot.unsaved { background: #ff5f57; }

/* Nav dropdown */
.nav-logo-wrap { position: relative; }
.nav-logo-wrap .nav-dropdown-menu { left: 0; transform: none; }
.nav-dropdown { position: relative; }

.nav-dropdown-toggle { cursor: pointer; }
.nav-arrow {
    font-size: 0.6rem;
    opacity: 0.5;
    transition: transform 0.2s ease;
    display: inline-block;
}
.nav-dropdown.open .nav-arrow { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 23, 20, 0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-width: 200px;
    padding: 6px 0;
    list-style: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 1001;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }

.nav-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(245,240,232,0.65);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--t), background var(--t);
}
.nav-dropdown-menu li a:hover {
    color: #f5f0e8;
    background: rgba(255,255,255,0.06);
}
.nav-dropdown-menu li a.disabled-link {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Nav-links 내부 dropdown (Labs 등) */
.nav-links li.nav-dropdown { position: relative; }
.nav-links li.nav-dropdown > a.nav-dropdown-toggle {
    display: flex; align-items: center; gap: 6px;
    color: rgba(245,240,232,0.65);
    text-decoration: none;
    font-size: 0.78rem; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase;
    padding: 8px 18px; border-radius: var(--r-sm);
    position: relative;
    transition: color var(--t), background var(--t);
    cursor: pointer;
}
.nav-links li.nav-dropdown > a.nav-dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; right: 50%;
    height: 2px; background: var(--accent2);
    transition: left 0.3s, right 0.3s;
    border-radius: 1px;
}
.nav-links li.nav-dropdown > a.nav-dropdown-toggle:hover,
.nav-links li.nav-dropdown.open > a.nav-dropdown-toggle {
    color: #f5f0e8; background: rgba(255,255,255,0.06);
}
.nav-links li.nav-dropdown > a.nav-dropdown-toggle:hover::after,
.nav-links li.nav-dropdown.open > a.nav-dropdown-toggle::after {
    left: 16px; right: 16px;
}
.nav-links li.nav-dropdown .nav-dropdown-menu {
    left: 50%; transform: translateX(-50%);
}


/* ════════════════════════════════════════════════════════════════
   04  Footer
   ════════════════════════════════════════════════════════════════ */
footer {
    background: var(--ink);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-logo {
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    color: rgba(245,240,232,0.5);
    letter-spacing: 0.04em;
}
.footer-logo span { color: var(--accent2); }
footer p {
    font-size: 0.72rem;
    color: rgba(245,240,232,0.25);
    font-weight: 300;
}
footer a { color: rgba(196,106,62,0.7); text-decoration: none; transition: color var(--t); }
footer a:hover { color: var(--accent2); }


/* ════════════════════════════════════════════════════════════════
   05  Animations & Keyframes
   ════════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrollLine {
    0%   { transform: scaleY(0); transform-origin: top;    opacity: 1; }
    50%  { transform: scaleY(1); transform-origin: top;    opacity: 1; }
    51%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}
@keyframes pulse  { 0%,100%{opacity:1}  50%{opacity:0.4} }
@keyframes blink  { 0%,100%{opacity:1}  50%{opacity:0.3} }
@keyframes popIn  {
    from { opacity: 0; transform: scale(0.94) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Scroll-reveal helper */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s, transform 0.5s; }
.reveal.visible { opacity: 1; transform: translateY(0); }


/* ════════════════════════════════════════════════════════════════
   06  Utilities
   ════════════════════════════════════════════════════════════════ */
.container      { max-width: 860px;  margin: 0 auto; padding: 0 32px; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 48px; }


/* ════════════════════════════════════════════════════════════════
   07  Components — Tags / Chips / Badges
   ════════════════════════════════════════════════════════════════ */
.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--accent);
    background: rgba(139,58,42,0.08); border: 1px solid rgba(139,58,42,0.2);
    padding: 2px 8px; border-radius: var(--r-sm); display: inline-block;
    text-decoration: none; transition: background 0.2s, color 0.2s; cursor: pointer;
}
.tag:hover {
    background: rgba(139,58,42,0.2); color: #fff;
}
.tag.tag-active {
    font-weight: 700; color: #fff;
    background: rgba(139,58,42,0.25); border-color: rgba(139,58,42,0.45);
}

.hero-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--accent2);
    background: rgba(196,106,62,0.12); border: 1px solid rgba(196,106,62,0.25);
    padding: 3px 10px; border-radius: var(--r-sm); display: inline-block;
}

.badge-pill {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem; letter-spacing: 0.1em;
    color: var(--accent2);
    background: rgba(196,106,62,0.1); border: 1px solid rgba(196,106,62,0.2);
    padding: 2px 9px; border-radius: 20px;
}

.skill-tag {
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.04em;
    color: var(--ink); background: var(--cream); border: 1px solid var(--border);
    padding: 4px 10px; border-radius: var(--r-sm);
    transition: background var(--t), border-color var(--t), color var(--t);
    cursor: default;
}
.skill-tag:hover,
.skill-tag.primary:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.skill-tag.primary { background: rgba(26,23,20,0.07); border-color: rgba(26,23,20,0.25); font-weight: 500; }

/* Status dot (sb-dot / sb-item helper) */
.sb-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(245,240,232,0.15); display: inline-block; flex-shrink: 0; }
.sb-dot.green  { background: #28c840; }
.sb-dot.orange { background: var(--accent2); animation: blink 1s infinite; }


/* ════════════════════════════════════════════════════════════════
   08  Components — Buttons
   ════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
    letter-spacing: 0.12em; text-transform: uppercase;
    padding: 10px 22px; border-radius: var(--r-sm);
    cursor: pointer; border: none; text-decoration: none; transition: all var(--t);
}
.btn-primary  { background: var(--accent2); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-outline  { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--cream); border-color: var(--muted); }

.col-sm-btn {
    font-family: 'JetBrains Mono', monospace; font-size: 0.58rem;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted); background: var(--cream); border: 1px solid var(--border);
    padding: 4px 11px; border-radius: var(--r-sm); cursor: pointer; transition: all var(--t);
}
.col-sm-btn:hover { color: var(--ink); border-color: var(--ink); }


/* ════════════════════════════════════════════════════════════════
   09  Components — Form Inputs & Tag-Wrap
   ════════════════════════════════════════════════════════════════ */
/* Dark bg (editor / upload sidebar) */
.form-input, .form-select, .form-textarea,
.sb-input, .sb-select, .sb-textarea {
    width: 100%;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--r-sm); padding: 9px 12px;
    font-family: 'Noto Sans KR', sans-serif; font-size: 0.82rem;
    color: rgba(245,240,232,0.75); outline: none; resize: none;
    transition: border-color var(--t), background var(--t);
}
.form-input:focus, .form-select:focus, .form-textarea:focus,
.sb-input:focus,   .sb-select:focus,   .sb-textarea:focus {
    border-color: var(--accent2); background: rgba(255,255,255,0.07);
}
.form-input::placeholder, .form-textarea::placeholder,
.sb-input::placeholder, .sb-textarea::placeholder { color: rgba(245,240,232,0.15); }

/* Light bg (post comment section) */
.comment-input, .comment-textarea {
    width: 100%; font-family: 'Noto Sans KR', sans-serif; font-size: 0.85rem;
    background: var(--cream); border: 1px solid var(--border);
    border-radius: var(--r-sm); padding: 10px 14px;
    color: var(--ink); outline: none; resize: none; transition: border-color var(--t);
}
.comment-input:focus, .comment-textarea:focus { border-color: var(--accent2); }

/* Select arrow */
.form-select, .sb-select {
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(245,240,232,0.3)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; cursor: pointer;
}
.form-select option, .sb-select option { background: var(--ink); color: rgba(245,240,232,0.8); }

/* Labels */
.form-label {
    font-family: 'JetBrains Mono', monospace; font-size: 0.58rem;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(245,240,232,0.28); display: block; margin-bottom: 6px;
}
.form-label .required { color: rgba(196,106,62,0.7); margin-left: 3px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Tag chip input */
.tag-wrap {
    display: flex; flex-wrap: wrap; gap: 5px; padding: 7px 10px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--r-sm); min-height: 38px; align-items: center;
    cursor: text; transition: border-color var(--t);
}
.tag-wrap:focus-within { border-color: var(--accent2); }
.tag-chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.62rem;
    color: var(--accent2); background: rgba(196,106,62,0.15); border: 1px solid rgba(196,106,62,0.25);
    padding: 2px 7px; border-radius: 20px;
}
.tag-del { cursor: pointer; opacity: 0.5; transition: opacity var(--t); }
.tag-del:hover { opacity: 1; }
.tag-text-input, .tag-text {
    background: none; border: none; outline: none;
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
    color: rgba(245,240,232,0.5); min-width: 70px; flex: 1;
}
.tag-text-input::placeholder, .tag-text::placeholder { color: rgba(245,240,232,0.15); }


/* ════════════════════════════════════════════════════════════════
   10  Components — Toggle Switch
   ════════════════════════════════════════════════════════════════ */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; }
.toggle-label, .toggle-lbl { font-size: 0.8rem; color: rgba(245,240,232,0.45); font-weight: 300; }
.toggle-switch, .toggle-sw { position: relative; width: 34px; height: 18px; flex-shrink: 0; }
.toggle-switch input, .toggle-sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.1); border-radius: 9px;
    cursor: pointer; transition: background var(--t);
}
.toggle-track::after {
    content: ''; position: absolute; left: 2px; top: 2px;
    width: 14px; height: 14px; background: rgba(245,240,232,0.4); border-radius: 50%;
    transition: transform var(--t), background var(--t);
}
.toggle-switch input:checked + .toggle-track,
.toggle-sw     input:checked + .toggle-track { background: var(--accent2); }
.toggle-switch input:checked + .toggle-track::after,
.toggle-sw     input:checked + .toggle-track::after { transform: translateX(16px); background: #fff; }


/* ════════════════════════════════════════════════════════════════
   11  Components — Toast Notification
   ════════════════════════════════════════════════════════════════ */
.toast {
    position: fixed; bottom: 36px; left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(26,23,20,0.96); border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--r-sm); padding: 10px 20px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.08em;
    color: rgba(245,240,232,0.8); z-index: 600;
    opacity: 0; transition: opacity 0.2s, transform 0.2s;
    pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* ════════════════════════════════════════════════════════════════
   12  Components — Modal Backdrop
   ════════════════════════════════════════════════════════════════ */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(10,8,6,0.85); backdrop-filter: blur(6px);
    z-index: 500; display: none; align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }

.modal {
    background: var(--ink); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-lg); width: 460px; max-width: 92vw;
    overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.6);
    animation: popIn 0.25s cubic-bezier(.22,.68,0,1.2) forwards;
}
.modal-header {
    padding: 20px 24px 16px; border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-title   { font-family: 'EB Garamond', serif; font-size: 1.3rem; color: var(--paper); }
.modal-close   { background: none; border: none; color: rgba(245,240,232,0.3); font-size: 1.1rem; cursor: pointer; transition: color var(--t); }
.modal-close:hover { color: var(--paper); }
.modal-body    { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer  { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.07); display: flex; gap: 10px; justify-content: flex-end; }
.modal-btn {
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
    letter-spacing: 0.12em; text-transform: uppercase;
    padding: 9px 20px; border-radius: var(--r-sm); cursor: pointer; border: none; transition: all var(--t);
}
.modal-btn-cancel  { background: rgba(255,255,255,0.06); color: rgba(245,240,232,0.4); border: 1px solid rgba(255,255,255,0.1); }
.modal-btn-cancel:hover { color: rgba(245,240,232,0.7); }
.modal-btn-publish { background: var(--accent2); color: #fff; }
.modal-btn-publish:hover { background: var(--accent); }


/* ════════════════════════════════════════════════════════════════
   13  Components — Status Bar
   ════════════════════════════════════════════════════════════════ */
.status-bar {
    height: 26px; background: rgba(15,14,12,0.95);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex; align-items: center; padding: 0 16px; gap: 20px; flex-shrink: 0;
}
.status-item, .sb-item {
    font-family: 'JetBrains Mono', monospace; font-size: 0.58rem;
    letter-spacing: 0.1em; color: rgba(245,240,232,0.22);
    display: flex; align-items: center; gap: 5px;
}
.status-item.active, .sb-item.hi { color: rgba(245,240,232,0.45); }


/* ════════════════════════════════════════════════════════════════
   14  Components — Section Divider
   ════════════════════════════════════════════════════════════════ */
.section-divider {
    display: flex; align-items: center; gap: 16px; margin-bottom: 60px;
}
.section-divider span {
    font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
    letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.section-divider::before,
.section-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }


/* ════════════════════════════════════════════════════════════════
   15  Components — Pagination
   ════════════════════════════════════════════════════════════════ */
.pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 48px 0 0; font-family: 'EB Garamond', serif;
}
.page-info  { font-size: 0.9rem; color: var(--muted); font-style: italic; }
.page-link  {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ink); text-decoration: none; font-size: 0.85rem;
    padding: 8px 20px; border: 1px solid var(--border); border-radius: var(--r-sm);
    transition: background var(--t), border-color var(--t);
}
.page-link:hover { background: var(--cream); border-color: var(--muted); }


/* ════════════════════════════════════════════════════════════════
   16  Components — Author Card & Share Row
   ════════════════════════════════════════════════════════════════ */
.author-card {
    display: flex; align-items: center; gap: 20px;
    padding: 24px 28px; background: var(--cream);
    border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 32px;
}
.author-avatar {
    width: 54px; height: 54px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex; align-items: center; justify-content: center;
    font-family: 'EB Garamond', serif; font-size: 1.4rem; color: var(--paper);
    flex-shrink: 0; border: 2px solid rgba(26,23,20,0.1);
}
.author-info  { min-width: 0; }
.author-name  { font-family: 'EB Garamond', serif; font-size: 1.15rem; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.author-bio   { font-size: 0.82rem; color: var(--muted); font-weight: 300; }
.author-github {
    margin-left: auto; display: flex; align-items: center; gap: 6px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.08em;
    color: var(--muted); text-decoration: none;
    border: 1px solid var(--border); padding: 6px 14px; border-radius: var(--r-sm);
    transition: color var(--t), border-color var(--t); white-space: nowrap; flex-shrink: 0;
}
.author-github:hover { color: var(--ink); border-color: var(--ink); }

.share-row   { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-label { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.share-btn   {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.08em;
    color: var(--muted); text-decoration: none;
    border: 1px solid var(--border); padding: 6px 14px; border-radius: var(--r-sm);
    transition: all var(--t); background: var(--cream);
}
.share-btn:hover { border-color: var(--accent2); color: var(--accent2); background: var(--paper); }


/* ════════════════════════════════════════════════════════════════
   17  Components — Comment Section
   ════════════════════════════════════════════════════════════════ */
.comment-section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.comment-section-title {
    font-family: 'EB Garamond', serif; font-size: 1.3rem; font-weight: 500; color: var(--ink);
    margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.comment-count-badge {
    font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
    color: var(--accent2); background: rgba(196,106,62,0.1); border: 1px solid rgba(196,106,62,0.2);
    padding: 2px 8px; border-radius: 20px;
}
.comment-form      { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.comment-form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.comment-submit {
    align-self: flex-end;
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
    letter-spacing: 0.12em; text-transform: uppercase;
    background: var(--ink); color: var(--paper); border: none;
    padding: 10px 22px; border-radius: var(--r-sm); cursor: pointer; transition: background var(--t);
}
.comment-submit:hover { background: var(--accent2); }
.comment-list  { display: flex; flex-direction: column; gap: 24px; }
.comment-item  { display: flex; gap: 14px; }
.comment-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--cream); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-family: 'EB Garamond', serif; font-size: 0.95rem; font-weight: 500; color: var(--muted);
    flex-shrink: 0;
}
.comment-body  { min-width: 0; }
.comment-meta  { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author { font-size: 0.85rem; font-weight: 500; color: var(--ink); }
.comment-date   { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--border); letter-spacing: 0.04em; }
.comment-text   { font-size: 0.88rem; line-height: 1.7; color: var(--muted); font-weight: 300; }


/* ════════════════════════════════════════════════════════════════
   18  Components — Code Block
   ════════════════════════════════════════════════════════════════ */
.code-block-wrap {
    margin: 6px 0 24px; border-radius: var(--r-md); overflow: hidden;
    border: 1px solid var(--code-border); box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.code-block-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; background: #1a1816;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.code-dots   { display: flex; gap: 5px; }
.code-dot    { width: 10px; height: 10px; border-radius: 50%; }
.code-dot.red    { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green  { background: #28c840; }
.code-lang   { font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.25); margin-left: 4px; }
.code-copy-btn {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: rgba(255,255,255,0.25); background: none;
    border: 1px solid rgba(255,255,255,0.1); padding: 3px 10px; border-radius: var(--r-sm);
    cursor: pointer; transition: color var(--t), border-color var(--t);
}
.code-copy-btn:hover  { color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.3); }
.code-copy-btn.copied { color: #28c840; border-color: #28c840; }

pre {
    background: var(--code-bg); padding: 22px 24px; overflow-x: auto; margin: 0;
}
pre::-webkit-scrollbar { height: 4px; }
pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
pre code {
    font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; line-height: 1.75;
    color: #c9c0b0; background: none; border: none; padding: 0;
}


/* ════════════════════════════════════════════════════════════════
   19  Components — Syntax Highlight Tokens
   ════════════════════════════════════════════════════════════════ */
.kw { color: #c792ea; }
.an { color: #82aaff; }
.cl { color: #ffcb6b; }
.st { color: #c3e88d; }
.cm { color: #546e7a; font-style: italic; }
.nm { color: #f78c6c; }
.mt { color: #89ddff; }
.tp { color: #ffcb6b; }
.ym { color: #89ddff; }
.yv { color: #c3e88d; }


/* ════════════════════════════════════════════════════════════════
   20  Components — Callout Box
   ════════════════════════════════════════════════════════════════ */
.callout {
    display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--r-sm);
    margin: 4px 0 24px; font-size: 0.88rem; line-height: 1.7; font-weight: 300;
}
.callout.info    { background: rgba(130,170,255,0.08); border: 1px solid rgba(130,170,255,0.2); color: #4a6a9a; }
.callout.warning { background: rgba(255,203,107,0.08); border: 1px solid rgba(255,203,107,0.2); color: #7a6020; }
.callout-icon    { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }


/* ════════════════════════════════════════════════════════════════
   21  Components — Option Table
   ════════════════════════════════════════════════════════════════ */
.option-table { width: 100%; border-collapse: collapse; margin: 6px 0 24px; font-size: 0.85rem; }
.option-table th {
    font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted); text-align: left; padding: 8px 14px;
    border-bottom: 2px solid var(--border); background: var(--cream);
}
.option-table td {
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    color: #3a3530; font-weight: 300; line-height: 1.6; vertical-align: top;
}
.option-table tr:last-child td { border-bottom: none; }
.option-table td:first-child { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--accent2); white-space: nowrap; }
.option-table tr:hover td { background: var(--cream); }


/* ════════════════════════════════════════════════════════════════
   22  Page: index.html — Blog List + Hero
   ════════════════════════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: var(--nav-h) 24px 0; position: relative; background: var(--ink);
}
.hero-content { max-width: 680px; }
.hero-eyebrow {
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase;
    color: var(--accent2); margin-bottom: 20px; opacity: 0; animation: fadeUp 0.8s 0.2s forwards;
}
.hero-title {
    font-family: 'EB Garamond', serif; font-size: clamp(3rem,8vw,5.5rem); font-weight: 400;
    color: #f5f0e8; line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 16px;
    opacity: 0; animation: fadeUp 0.9s 0.4s forwards;
}
.hero-subtitle {
    font-size: 1rem; font-weight: 300; color: rgba(245,240,232,0.7); letter-spacing: 0.04em; margin-bottom: 40px;
    opacity: 0; animation: fadeUp 0.9s 0.6s forwards;
}
.hero-cta {
    display: inline-flex; align-items: center; gap: 10px; color: #f5f0e8; text-decoration: none;
    font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
    border: 1px solid rgba(245,240,232,0.35); padding: 12px 28px; border-radius: 2px;
    transition: background 0.3s, border-color 0.3s; opacity: 0; animation: fadeUp 0.9s 0.8s forwards;
}
.hero-cta:hover { background: rgba(245,240,232,0.1); border-color: rgba(245,240,232,0.7); }
.hero-cta svg { transition: transform 0.3s; }
.hero-cta:hover svg { transform: translateY(3px); }
.scroll-hint {
    position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: rgba(245,240,232,0.4); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
    opacity: 0; animation: fadeIn 1s 1.2s forwards;
}
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, rgba(245,240,232,0.4), transparent); animation: scrollLine 1.8s 1.4s infinite; }

/* Content section */
#content { background: var(--paper); padding: 80px 0 60px; }

/* 2-Column layout */
.content-layout {
    display: grid; grid-template-columns: 1fr 240px; gap: 40px; align-items: start;
}
.content-main { min-width: 0; }
.content-sidebar { position: sticky; top: 84px; }

/* Sidebar Search Card */
.sidebar-search-card {
    margin-bottom: 16px;
}
.sidebar-search-form {
    display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px;
    background: var(--cream); overflow: hidden; transition: border-color 0.2s;
}
.sidebar-search-form:focus-within {
    border-color: var(--accent);
}
.sidebar-search-input {
    flex: 1; border: none; outline: none; background: transparent;
    padding: 9px 12px; font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
    color: var(--ink); letter-spacing: 0.02em;
}
.sidebar-search-input::placeholder {
    color: var(--muted); opacity: 0.6; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.sidebar-search-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: none; background: transparent;
    color: var(--muted); cursor: pointer; transition: color 0.2s;
}
.sidebar-search-btn:hover {
    color: var(--accent);
}

/* Category Tree Card */
.cat-tree-card {
    background: var(--cream); border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.cat-tree-header {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--ink);
    font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; letter-spacing: 0.16em;
    text-transform: uppercase; color: rgba(245,240,232,0.5); cursor: pointer; user-select: none;
    transition: background 0.2s;
}
.cat-tree-header:hover { background: #2a2724; }
.cat-tree-header svg { opacity: 0.45; flex-shrink: 0; }
.cat-tree-toggle {
    margin-left: auto; font-size: 0.55rem; opacity: 0.4; transition: transform 0.25s;
}
.cat-tree-card.collapsed .cat-tree-toggle { transform: rotate(-90deg); }
.cat-tree-body {
    padding: 8px 0; max-height: 700px; opacity: 1; overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s;
}
.cat-tree-card.collapsed .cat-tree-body { max-height: 0; opacity: 0; }

/* Tree nodes */
.cat-node-row { display: flex; align-items: center; }
.cat-indent-line { width: 16px; align-self: stretch; position: relative; flex-shrink: 0; }
.cat-indent-line::before {
    content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
    width: 1px; background: var(--border);
}
.cat-indent-line.last::before { bottom: 50%; }
.cat-expand-btn {
    width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
    background: none; border: 1px solid var(--border); border-radius: 3px; cursor: pointer;
    flex-shrink: 0; color: var(--muted); transition: border-color 0.15s, background 0.15s, color 0.15s;
    margin-right: 5px;
}
.cat-expand-btn:hover { border-color: var(--accent2); color: var(--accent2); background: rgba(196,106,62,0.05); }
.cat-expand-btn svg { transition: transform 0.2s; }
.cat-expand-btn.open svg { transform: rotate(90deg); }
.cat-leaf-spacer { width: 23px; flex-shrink: 0; }
.cat-link {
    flex: 1; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 4px;
    font-size: 0.8rem; color: var(--muted); text-decoration: none; border-radius: 3px;
    transition: color 0.15s, background 0.15s; min-width: 0; line-height: 1.3;
}
.cat-link:hover { color: var(--ink); background: rgba(26,23,20,0.04); }
.cat-link.active { color: var(--accent); font-weight: 500; background: rgba(139,58,42,0.06); }
.cat-link-icon { font-size: 0.75rem; opacity: 0.45; flex-shrink: 0; }
.cat-link.active .cat-link-icon { opacity: 1; }
.cat-link-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-count {
    flex-shrink: 0; font-family: 'JetBrains Mono', monospace; font-size: 0.58rem;
    color: var(--border); background: rgba(26,23,20,0.05); border: 1px solid var(--border);
    padding: 1px 5px; border-radius: 8px;
}
.cat-link.active .cat-count {
    color: var(--accent2); border-color: rgba(196,106,62,0.3); background: rgba(196,106,62,0.08);
}
.cat-lv1 > .cat-node-row { padding-left: 10px; }
.cat-lv2 > .cat-node-row { padding-left: 10px; }
.cat-lv3 > .cat-node-row { padding-left: 10px; }
.cat-children {
    overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.28s ease, opacity 0.22s;
}
.cat-children.open { max-height: 500px; opacity: 1; }

/* Post list */
.post-list  { display: flex; flex-direction: column; }
.post-item  { padding: 40px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 24px 32px; align-items: start; }
.post-tags  { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; grid-column: 1; }
.post-title {
    grid-column: 1; font-family: 'EB Garamond', serif; font-size: 1.55rem; font-weight: 500;
    line-height: 1.3; color: var(--ink); text-decoration: none; display: block; margin-bottom: 12px;
    transition: color var(--t);
}
.post-title:hover { color: var(--accent); }
.post-excerpt { grid-column: 1; font-size: 0.9rem; line-height: 1.75; color: var(--muted); font-weight: 300; margin-bottom: 16px; }
.post-meta    { grid-column: 1; display: flex; align-items: center; gap: 16px; }
.post-author-img  { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.post-author-name { font-size: 0.8rem; color: var(--ink); font-weight: 500; }
.post-view-count { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-left: auto; }
.post-date { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
.post-read-more {
    grid-row: 1 / span 4; grid-column: 2; align-self: center;
    writing-mode: vertical-rl; font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--muted); text-decoration: none; transition: color var(--t);
    display: flex; align-items: center; gap: 8px; padding: 8px 0;
}
.post-read-more:hover { color: var(--accent); }
.post-read-more::after { content: ''; width: 1px; height: 24px; background: currentColor; opacity: 0.4; }


/* ════════════════════════════════════════════════════════════════
   23  Page: post.html — Post Detail
   ════════════════════════════════════════════════════════════════ */
.post-hero {
    margin-top: var(--nav-h); background: var(--ink);
    position: relative; overflow: hidden; padding: 64px 0 52px;
}
.post-hero::before {
    content: ''; position: absolute; inset: 0;
    background:
            repeating-linear-gradient(0deg, transparent, transparent 32px, rgba(255,255,255,0.015) 32px, rgba(255,255,255,0.015) 33px),
            linear-gradient(135deg, rgba(139,58,42,0.2) 0%, transparent 60%);
}
.post-hero::after {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: linear-gradient(to bottom, transparent, var(--accent2), transparent);
}
.post-hero-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: 0 48px; }
.post-hero-tags  { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; opacity: 0; animation: fadeUp 0.6s 0.2s forwards; }
.post-hero-title {
    font-family: 'EB Garamond', serif; font-size: clamp(1.8rem,4vw,2.9rem); font-weight: 500;
    color: var(--paper); line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 22px;
    opacity: 0; animation: fadeUp 0.7s 0.3s forwards;
}
.post-hero-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; opacity: 0; animation: fadeUp 0.7s 0.45s forwards; }

.post-layout {
    max-width: 860px; margin: 0 auto; padding: 52px 48px 80px;
    display: grid; grid-template-columns: 1fr 200px; gap: 0 48px; align-items: start;
}
.post-article { min-width: 0; font-size: 1rem; line-height: 1.9; color: #3a3530; font-weight: 300; }
.post-article h5 {
    font-family: 'EB Garamond', serif; font-size: 1.45rem; font-weight: 500; color: var(--ink);
    margin: 48px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
}
.post-article h5::before { content: '#'; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; color: var(--accent2); }
.post-article p { margin-bottom: 22px; }
.post-article strong { font-weight: 500; color: var(--ink); }
.post-article a { color: var(--accent2); text-underline-offset: 3px; }
.post-article p code, .post-article li code {
    font-family: 'JetBrains Mono', monospace; font-size: 0.82em;
    background: rgba(26,23,20,0.07); border: 1px solid rgba(26,23,20,0.1);
    color: var(--accent); padding: 1px 5px; border-radius: var(--r-sm);
}
.post-article ul, .post-article ol { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 0 0 22px; }
.post-article ul li { font-size: 0.92rem; line-height: 1.75; color: #3a3530; font-weight: 300; padding-left: 18px; position: relative; }
.post-article ul li::before { content: '–'; position: absolute; left: 0; color: var(--accent2); }
.post-article ol { counter-reset: post-counter; }
.post-article ol li { counter-increment: post-counter; padding-left: 28px; font-size: 0.95rem; line-height: 1.75; color: #3a3530; font-weight: 300; position: relative; }
.post-article ol li::before { content: counter(post-counter) '.'; position: absolute; left: 0; font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--accent2); font-weight: 500; top: 3px; }

/* TOC sidebar */
.toc-sidebar { position: sticky; top: calc(var(--nav-h) + 28px); }
.toc-label { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--border); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.toc-list  { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-link  {
    display: block; font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; line-height: 1.5; letter-spacing: 0.04em;
    color: var(--border); text-decoration: none; padding: 5px 10px;
    border-left: 2px solid transparent;
    transition: color var(--t), border-color var(--t), padding-left var(--t);
}
.toc-link:hover { color: var(--muted); border-left-color: var(--border); padding-left: 14px; }
.toc-link.active { color: var(--accent2); border-left-color: var(--accent2); }

/* Prev/Next nav */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 40px; }
.post-nav-card {
    padding: 16px 20px; background: var(--cream); border: 1px solid var(--border);
    border-radius: var(--r-sm); text-decoration: none;
    transition: border-color var(--t), background var(--t);
    display: flex; flex-direction: column; gap: 6px;
}
.post-nav-card:hover { border-color: var(--accent2); background: var(--paper); }
.post-nav-dir   { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--border); display: flex; align-items: center; gap: 6px; }
.post-nav-title { font-family: 'EB Garamond', serif; font-size: 0.95rem; color: var(--ink); line-height: 1.4; }
.post-nav-card.next { text-align: right; }
.post-nav-card.next .post-nav-dir { justify-content: flex-end; }


/* ════════════════════════════════════════════════════════════════
   24  Page: profile.html — Resume
   ════════════════════════════════════════════════════════════════ */
.about-hero { margin-top: var(--nav-h); height: 320px; position: relative; overflow: hidden; background: var(--ink); }
.about-hero-bg {
    position: absolute; inset: 0; filter: saturate(0.6);
    background:
        linear-gradient(135deg, rgba(139,58,42,0.35) 0%, rgba(26,23,20,0.85) 60%),
        url('../image/bg-picture-profile.jpg') center/cover no-repeat;
}
.about-hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(255,255,255,0.018) 28px, rgba(255,255,255,0.018) 29px);
}
.about-hero-content {
    position: relative; z-index: 2; height: 100%;
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
    padding: 0 80px 48px; max-width: 1060px; margin: 0 auto; width: 100%;
}
.hero-eyebrow {
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.25em;
    text-transform: uppercase; color: var(--accent2); margin-bottom: 10px;
    opacity: 0; animation: fadeUp 0.7s 0.15s forwards;
}
.hero-name {
    font-family: 'EB Garamond', serif; font-size: clamp(1.44rem, 3vw, 2.4rem);
    font-weight: 400; color: var(--paper); line-height: 1.05; margin-bottom: 10px;
    opacity: 0; animation: fadeUp 0.8s 0.3s forwards;
}
.hero-name em {
    font-style: italic; color: rgba(245,240,232,0.55); font-size: 0.62em;
    display: block; letter-spacing: 0.02em;
}
.hero-tagline {
    font-size: 0.88rem; font-weight: 300; color: rgba(245,240,232,0.55);
    letter-spacing: 0.05em; opacity: 0; animation: fadeUp 0.8s 0.45s forwards;
}

.about-wrap { max-width: 1060px; margin: 0 auto; padding: 64px 80px 100px; display: grid; grid-template-columns: 260px 1fr; gap: 0 64px; align-items: start; }
.about-main { min-width: 0; }

/* Sidebar (about page) */
.sidebar { position: sticky; top: calc(var(--nav-h) + 32px); }
.profile-card { background: var(--ink); border-radius: var(--r-md); overflow: hidden; margin-bottom: 24px; opacity: 0; animation: fadeUp 0.8s 0.5s forwards; }
.profile-avatar-placeholder { width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, #2a2522, var(--ink)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.profile-avatar-placeholder svg  { opacity: 0.18; }
.profile-avatar-placeholder span { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(245,240,232,0.2); }
.profile-info   { padding: 18px 20px 20px; }
.profile-name   { font-family: 'EB Garamond', serif; font-size: 1.3rem; color: var(--paper); margin-bottom: 4px; }
.profile-handle { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: var(--muted); letter-spacing: 0.1em; margin-bottom: 14px; }
.profile-bio    { font-size: 0.8rem; line-height: 1.65; color: rgba(245,240,232,0.5); font-weight: 300; border-top: 1px solid rgba(255,255,255,0.07); padding-top: 12px; }
.sidebar-links  { display: flex; flex-direction: column; gap: 8px; opacity: 0; animation: fadeUp 0.8s 0.65s forwards; }
.sidebar-link   { display: flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; font-size: 0.8rem; padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--cream); transition: color var(--t), border-color var(--t), background var(--t); }
.sidebar-link:hover { color: var(--accent); border-color: var(--accent); background: var(--paper); }
.sidebar-link-icon  { width: 18px; text-align: center; font-size: 0.9rem; flex-shrink: 0; }
.sidebar-link-label { font-weight: 500; }
.sidebar-link-url   { font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; color: var(--border); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.badge-row { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; opacity: 0; animation: fadeUp 0.8s 0.75s forwards; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.08em; color: var(--accent); background: rgba(139,58,42,0.08); border: 1px solid rgba(139,58,42,0.22); padding: 4px 10px; border-radius: 20px; }

/* Section */
.section {
    margin-bottom: 56px; opacity: 0; transform: translateY(16px);
    transition: opacity 0.55s, transform 0.55s;
}
.section.visible { opacity: 1; transform: translateY(0); }
.section-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.section-heading-icon { width: 34px; height: 34px; background: var(--ink); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; flex-shrink: 0; }
.section-heading h2  { font-family: 'EB Garamond', serif; font-size: 1.5rem; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.section-heading-line { flex: 1; height: 1px; background: transparent; }
.section-heading-tag { font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-left: auto; }
.intro-text { font-size: 0.95rem; line-height: 1.9; color: var(--muted); font-weight: 300; }
.intro-text strong { color: var(--ink); font-weight: 500; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 36px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -28px; top: 6px; width: 15px; height: 15px; background: var(--paper); border: 2px solid var(--border); border-radius: 50%; transition: border-color var(--t), background var(--t); }
.timeline-item:hover .timeline-dot       { border-color: var(--accent2); background: var(--accent2); }
.timeline-item:first-child .timeline-dot { border-color: var(--accent);  background: var(--accent); }
.timeline-header  { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.timeline-company { font-family: 'EB Garamond', serif; font-size: 1.2rem; font-weight: 500; color: var(--ink); }
.timeline-role    { font-size: 0.78rem; color: var(--accent2); font-weight: 500; background: rgba(196,106,62,0.1); border: 1px solid rgba(196,106,62,0.2); padding: 2px 9px; border-radius: var(--r-sm); white-space: nowrap; align-self: center; }
.timeline-period  { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--muted); letter-spacing: 0.06em; white-space: nowrap; align-self: center; }
.timeline-tasks   { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.timeline-tasks li { display: flex; align-items: baseline; gap: 10px; font-size: 0.85rem; line-height: 1.6; color: var(--muted); font-weight: 300; }
.timeline-tasks li::before { content: '—'; color: var(--border); font-size: 0.75rem; flex-shrink: 0; }

/* Achievements */
.timeline-achievements { margin-top: 14px; padding: 14px 18px; background: linear-gradient(135deg, rgba(255,215,0,0.06), rgba(255,180,0,0.03)); border-left: 3px solid #d4a017; border-radius: 0 8px 8px 0; }
.achievements-label { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; color: #d4a017; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.achievements-label svg { color: #f0c040; flex-shrink: 0; }
.achievements-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.achievements-list li { position: relative; padding-left: 22px; font-size: 0.83rem; line-height: 1.65; color: var(--muted); font-weight: 300; }
.achievements-list li::before { content: '▸'; position: absolute; left: 0; top: 0; color: #d4a017; font-size: 0.8rem; }

/* Skills */
.skills-grid    { display: flex; flex-direction: column; gap: 16px; }
.skill-row      { display: grid; grid-template-columns: 140px 1fr; gap: 12px 20px; align-items: start; }
.skill-category { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 5px; }
.skill-tags     { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--ink);
    background: var(--cream); border: 1px solid var(--border); padding: 4px 10px;
    border-radius: var(--r-sm); letter-spacing: 0.04em;
    transition: background 0.2s, border-color 0.2s, color 0.2s; cursor: default;
}
.skill-tag:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.skill-tag.primary {
    background: rgba(26,23,20,0.07); border-color: rgba(26,23,20,0.25); font-weight: 500;
}
.skill-tag.primary:hover { background: var(--ink); color: var(--paper); }
.skills-divider { height: 1px; background: var(--border); opacity: 0.5; }

/* Patents */
.patent-list { display: flex; flex-direction: column; gap: 14px; }
.patent-card {
    position: relative; padding: 20px 22px 20px 60px;
    background: var(--cream); border: 1px solid var(--border); border-left: 3px solid var(--accent);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.patent-card:hover { border-left-color: var(--accent2); background: var(--paper); box-shadow: 0 4px 20px rgba(26,23,20,0.07); }
.patent-number-badge { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; background: var(--ink); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--accent2); font-weight: 500; }
.patent-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.patent-title  { font-family: 'EB Garamond', serif; font-size: 1.1rem; font-weight: 500; color: var(--ink); line-height: 1.35; flex: 1; }
.patent-status { flex-shrink: 0; font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; align-self: flex-start; margin-top: 3px; }
.patent-status.filed      { color: #b07d2a; background: rgba(176,125,42,0.1); border: 1px solid rgba(176,125,42,0.25); }
.patent-status.registered { color: #3a7a50; background: rgba(58,122,80,0.1);  border: 1px solid rgba(58,122,80,0.25); }
.patent-status.pending    { color: var(--accent2); background: rgba(196,106,62,0.1); border: 1px solid rgba(196,106,62,0.25); }
.patent-meta  { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.patent-meta-item { display: flex; align-items: center; gap: 5px; font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--muted); letter-spacing: 0.05em; }
.patent-desc  { margin-top: 9px; font-size: 0.82rem; line-height: 1.65; color: var(--muted); font-weight: 300; }
.patent-count-chip { display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.1em; color: var(--accent); background: rgba(139,58,42,0.07); border: 1px solid rgba(139,58,42,0.18); padding: 4px 12px; border-radius: 20px; margin-bottom: 20px; }

/* ETC */
.etc-list { display: flex; flex-direction: column; gap: 12px; }
.etc-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--cream); border: 1px solid var(--border); border-radius: var(--r-sm); text-decoration: none; transition: border-color var(--t), background var(--t); }
.etc-item:hover { border-color: var(--accent2); background: var(--paper); }
.etc-item-icon  { font-size: 1.3rem; flex-shrink: 0; }
.etc-item-body  { min-width: 0; }
.etc-item-title { font-size: 0.88rem; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.etc-item-desc  { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--muted); letter-spacing: 0.06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etc-item-arrow { margin-left: auto; color: var(--border); font-size: 0.8rem; transition: color var(--t), transform var(--t); flex-shrink: 0; }
.etc-item:hover .etc-item-arrow { color: var(--accent2); transform: translateX(3px); }


/* ════════════════════════════════════════════════════════════════
   25  Page: photos.html — Gallery
   ════════════════════════════════════════════════════════════════ */

/* Photos page background override */
.photos-page { background: var(--ink); color: var(--paper); }

/* Page Header */
.page-header {
    padding-top: var(--nav-h); background: var(--ink);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding-bottom: 0; position: relative; overflow: hidden;
}
.header-bg-strip { position: relative; width: 100%; height: 280px; overflow: hidden; }
.header-strip-inner { display: flex; height: 100%; gap: 3px; }
.strip-img {
    flex: 1; background-size: cover; background-position: center;
    filter: brightness(0.45) saturate(0.7); transition: filter 0.4s;
}
.strip-img:hover { filter: brightness(0.7) saturate(0.9); }
.header-overlay {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to bottom, transparent 30%, rgba(26,23,20,0.6) 70%, var(--ink) 100%);
}
.header-text { position: relative; z-index: 2; padding: 32px 24px 40px; }
.header-eyebrow {
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
    letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent2);
    margin-bottom: 10px; opacity: 0; animation: fadeUp 0.7s 0.1s forwards;
}
.header-title {
    font-family: 'EB Garamond', serif; font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 400; color: var(--paper); letter-spacing: -0.01em; line-height: 1.1;
    margin-bottom: 10px; opacity: 0; animation: fadeUp 0.8s 0.25s forwards;
}
.header-sub {
    font-size: 0.85rem; color: rgba(245,240,232,0.45); letter-spacing: 0.05em;
    font-weight: 300; opacity: 0; animation: fadeUp 0.8s 0.4s forwards;
}

/* Filter Tabs */
.filter-bar {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 0 24px 32px; flex-wrap: wrap; opacity: 0; animation: fadeUp 0.8s 0.55s forwards;
}
.filter-btn {
    font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
    letter-spacing: 0.14em; text-transform: uppercase; color: rgba(245,240,232,0.45);
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    padding: 6px 16px; border-radius: 2px; cursor: pointer; transition: all 0.25s;
}
.filter-btn:hover {
    color: var(--paper); border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08);
}
.filter-btn.active { color: var(--ink); background: var(--accent2); border-color: var(--accent2); }

/* View Toggle */
.view-toggle {
    display: flex; align-items: center; gap: 4px; margin-left: auto;
    padding-right: 32px; padding-bottom: 32px; opacity: 0; animation: fadeIn 0.8s 0.6s forwards;
}
.view-btn {
    width: 32px; height: 32px; border: 1px solid rgba(255,255,255,0.15);
    background: transparent; border-radius: 3px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: rgba(245,240,232,0.4); transition: all 0.2s;
}
.view-btn.active, .view-btn:hover { border-color: var(--accent2); color: var(--accent2); }
.gallery-controls {
    display: flex; align-items: flex-end; justify-content: space-between;
    padding: 0 32px; max-width: 1400px; margin: 0 auto; width: 100%;
}

/* Gallery Grid */
.gallery-wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px 80px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.gallery-grid.masonry {
    display: block;
    column-count: 4; column-gap: 6px;
}
.gallery-grid.masonry .photo-card {
    break-inside: avoid; margin-bottom: 6px;
}

/* Photo Card */
.photo-card { position: relative; overflow: hidden; cursor: pointer; background: #111; }
.gallery-grid:not(.masonry) .photo-card::before {
    content: ''; display: block; padding-top: 100%;
}
.gallery-grid:not(.masonry) .photo-card img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.gallery-grid.masonry .photo-card img {
    width: 100%; height: auto; display: block; object-fit: cover;
}
.photo-overlay {
    position: absolute; inset: 0; background: rgba(26,23,20,0.72);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; opacity: 0; transition: opacity 0.3s;
}
.photo-card:hover .photo-overlay { opacity: 1; }
.photo-card:hover img { transform: scale(1.04); transition: transform 0.5s ease; }
.overlay-stats {
    display: flex; gap: 20px; color: #fff; font-size: 0.85rem;
    font-weight: 500; letter-spacing: 0.04em;
}
.overlay-stat { display: flex; align-items: center; gap: 5px; }
.overlay-tag {
    font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
    letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.55);
}

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center;
    justify-content: center;
    pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lb-backdrop {
    position: absolute; inset: 0; background: rgba(10,8,6,0.94); backdrop-filter: blur(8px);
}
.lb-inner {
    position: relative; z-index: 1; display: flex; width: 100%; max-width: 1100px;
    max-height: 90vh;
    margin: auto; background: #1a1714; border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 32px 80px rgba(0,0,0,0.7); transform: scale(0.96);
    transition: transform 0.35s cubic-bezier(.22,.68,0,1.2);
}
.lightbox.open .lb-inner { transform: scale(1); }
.lb-img-wrap {
    flex: 1; position: relative; min-height: 0; max-height: 90vh; background: #111;
    overflow: hidden;
}
.lb-img-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity 0.25s ease; }
.lb-loading {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.6); z-index: 10; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.lb-loading.active { opacity: 1; pointer-events: auto; }
.lb-spinner {
    width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff; border-radius: 50%; animation: lb-spin 0.7s linear infinite;
}
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lb-sidebar {
    width: 320px; flex-shrink: 0; display: flex; flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.07);
    overflow-y: auto;
}
.lb-author {
    display: flex; align-items: center; gap: 12px; padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.lb-author-img {
    width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--accent2);
}
.lb-author-name { font-weight: 500; font-size: 0.9rem; color: var(--paper); }
.lb-author-handle {
    font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
    color: var(--muted); margin-top: 2px;
}
.lb-caption { flex: 1; padding: 20px; overflow-y: auto; }
.lb-caption-title {
    font-family: 'EB Garamond', serif; font-size: 1.3rem; color: var(--paper);
    margin-bottom: 8px; line-height: 1.3;
}
.lb-caption-text {
    font-size: 0.83rem; line-height: 1.7; color: rgba(245,240,232,0.55);
    font-weight: 300; margin-bottom: 16px;
}
.lb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-tag {
    font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
    color: var(--accent2); letter-spacing: 0.08em;
}

/* EXIF / Camera Info Panel */
.lb-exif {
    margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.07); padding-top: 16px;
}
.lb-exif-header {
    display: flex; align-items: center; gap: 7px; margin-bottom: 12px;
    cursor: pointer; user-select: none;
}
.lb-exif-header-label {
    font-family: 'JetBrains Mono', monospace; font-size: 0.63rem;
    letter-spacing: 0.18em; text-transform: uppercase; color: rgba(245,240,232,0.35);
}
.lb-exif-toggle-icon {
    margin-left: auto; color: rgba(245,240,232,0.25); font-size: 0.65rem;
    transition: transform 0.25s;
}
.lb-exif.collapsed .lb-exif-toggle-icon { transform: rotate(-90deg); }
.lb-exif-body {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; overflow: hidden;
    max-height: 400px; transition: max-height 0.35s ease, opacity 0.3s; opacity: 1;
}
.lb-exif.collapsed .lb-exif-body { max-height: 0; opacity: 0; }
.exif-camera-row {
    grid-column: 1 / -1; display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px; padding: 10px 12px;
}
.exif-camera-icon { font-size: 1.05rem; opacity: 0.7; flex-shrink: 0; }
.exif-camera-model {
    font-family: 'EB Garamond', serif; font-size: 1rem;
    color: var(--paper); line-height: 1.2;
}
.exif-camera-maker {
    font-family: 'JetBrains Mono', monospace; font-size: 0.6rem;
    color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px;
}
.exif-chip {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 3px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px;
}
.exif-chip-label {
    font-family: 'JetBrains Mono', monospace; font-size: 0.58rem;
    letter-spacing: 0.14em; text-transform: uppercase; color: rgba(245,240,232,0.28);
}
.exif-chip-value {
    font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
    color: rgba(245,240,232,0.8); letter-spacing: 0.04em;
}
.exif-chip.lens-chip { grid-column: 1 / -1; }
.exif-chip.lens-chip .exif-chip-value {
    font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lb-actions {
    padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.07);
    display: flex; align-items: center; gap: 20px;
}
.lb-action-btn {
    background: none; border: none; color: rgba(245,240,232,0.5); cursor: pointer;
    display: flex; align-items: center; gap: 6px; font-size: 0.8rem;
    font-family: 'Noto Sans KR', sans-serif; transition: color 0.2s;
}
.lb-action-btn:hover { color: var(--paper); }
.lb-action-btn.liked { color: #e05e5e; }
.lb-action-btn svg { transition: transform 0.2s; }
.lb-action-btn:hover svg { transform: scale(1.15); }
.lb-delete-btn:hover { color: #e53935 !important; }
.lb-date {
    margin-left: auto; font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem; color: var(--muted);
}
.lb-mobile-toggle { display: none; }
.lb-summary {
    padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.lb-meta-section { }
.lb-close {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(26,23,20,0.7); border: 1px solid rgba(255,255,255,0.15);
    color: var(--paper); font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.lb-close:hover { background: var(--accent); }
.lb-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; background: rgba(26,23,20,0.6);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 50%;
    color: var(--paper); cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: background 0.2s; z-index: 10;
}
.lb-nav-btn:hover { background: rgba(196,106,62,0.5); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

/* Load More */
.load-more-wrap { display: flex; justify-content: center; padding: 8px 0 48px; }
.load-more-btn {
    font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
    letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
    background: none; border: 1px solid rgba(255,255,255,0.12);
    padding: 12px 32px; border-radius: 2px; cursor: pointer; transition: all 0.25s;
}
.load-more-btn:hover { color: var(--paper); border-color: var(--accent2); }


/* ════════════════════════════════════════════════════════════════
   26  Page: editor.html — Post Editor
   ════════════════════════════════════════════════════════════════ */
.editor-shell { flex: 1; display: flex; overflow: hidden; min-height: 0; }

/* Vertical toolbar */
.toolbar-col { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; background: var(--ink); border-right: 1px solid rgba(255,255,255,0.06); overflow-y: auto; flex-shrink: 0; width: 46px; }
.toolbar-col::-webkit-scrollbar { display: none; }
.tb-group  { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 100%; }
.tb-divider { width: 22px; height: 1px; background: rgba(255,255,255,0.08); margin: 6px 0; }
.tb-btn {
    width: 34px; height: 34px; border: none; background: none; border-radius: var(--r-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: rgba(245,240,232,0.35); font-size: 0.8rem; font-family: 'JetBrains Mono', monospace; font-weight: 500;
    transition: background var(--t), color var(--t); position: relative; flex-shrink: 0;
}
.tb-btn:hover  { background: rgba(255,255,255,0.08); color: rgba(245,240,232,0.9); }
.tb-btn.active { background: rgba(196,106,62,0.2); color: var(--accent2); }
.tb-btn::after { content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: rgba(26,23,20,0.95); border: 1px solid rgba(255,255,255,0.1); color: rgba(245,240,232,0.8); font-family: 'JetBrains Mono', monospace; font-size: 0.58rem; letter-spacing: 0.1em; white-space: nowrap; padding: 4px 9px; border-radius: var(--r-sm); pointer-events: none; opacity: 0; transition: opacity 0.15s; z-index: 100; }
.tb-btn:hover::after { opacity: 1; }

/* Center pane tabs */
.center-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.pane-tabs { display: flex; align-items: center; background: var(--cream); border-bottom: 1px solid var(--border); padding: 0 24px; height: 40px; flex-shrink: 0; }
.pane-tab  { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 0 16px; height: 100%; display: flex; align-items: center; cursor: pointer; border-bottom: 2px solid transparent; transition: color var(--t), border-color var(--t); }
.pane-tab:hover  { color: var(--ink); }
.pane-tab.active { color: var(--accent2); border-bottom-color: var(--accent2); }
.pane-tab-sep    { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.pane-body { flex: 1; overflow: hidden; position: relative; }

#mdEditor { width: 100%; height: 100%; resize: none; border: none; outline: none; background: var(--paper); font-family: 'JetBrains Mono', monospace; font-size: 0.88rem; line-height: 1.8; color: var(--ink); padding: 36px 48px; overflow-y: auto; tab-size: 2; }
#mdEditor::placeholder { color: var(--border); }
#mdEditor::-webkit-scrollbar { width: 4px; }
#mdEditor::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

#previewPane { display: none; width: 100%; height: 100%; overflow-y: auto; background: var(--paper); padding: 36px 48px; }

/* Editor right sidebar */
.right-sidebar { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--ink); border-left: 1px solid rgba(255,255,255,0.06); overflow: hidden; }
.sidebar-header { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.07); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.sidebar-title  { font-family: 'JetBrains Mono', monospace; font-size: 0.63rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(245,240,232,0.3); }
.sidebar-body   { flex: 1; overflow-y: auto; padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 20px; }
.sidebar-body::-webkit-scrollbar { width: 3px; }
.sidebar-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.sb-label  { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(245,240,232,0.25); margin-bottom: 2px; }
.sb-section { display: flex; flex-direction: column; gap: 8px; }
.stats-row  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.stat-chip  { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: var(--r-sm); padding: 8px 6px; text-align: center; }
.stat-value { font-family: 'JetBrains Mono', monospace; font-size: 1rem; color: var(--accent2); display: block; }
.stat-key   { font-family: 'JetBrains Mono', monospace; font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(245,240,232,0.2); margin-top: 2px; display: block; }

.cover-upload { border: 1px dashed rgba(255,255,255,0.12); border-radius: var(--r-sm); aspect-ratio: 16/7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: border-color var(--t), background var(--t); background: rgba(255,255,255,0.02); position: relative; overflow: hidden; }
.cover-upload:hover { border-color: var(--accent2); background: rgba(196,106,62,0.05); }
.cover-upload-icon { font-size: 1.4rem; opacity: 0.3; }
.cover-upload-text { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(245,240,232,0.2); }
.cover-preview { position: absolute; inset: 0; object-fit: cover; display: none; }

.form-footer { padding: 14px 22px; border-top: 1px solid rgba(255,255,255,0.07); display: flex; gap: 8px; flex-shrink: 0; }
.form-btn        { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; border: none; transition: all var(--t); }
.form-btn-clear  { background: rgba(255,255,255,0.05); color: rgba(245,240,232,0.35); border: 1px solid rgba(255,255,255,0.08); }
.form-btn-clear:hover { color: rgba(245,240,232,0.6); }
.form-btn-apply  { background: rgba(196,106,62,0.15); color: var(--accent2); border: 1px solid rgba(196,106,62,0.25); }
.form-btn-apply:hover { background: rgba(196,106,62,0.25); }
.form-btn-upload { background: var(--accent2); color: #fff; flex: 2; }
.form-btn-upload:hover    { background: var(--accent); }
.form-btn-upload:disabled { opacity: 0.3; cursor: not-allowed; }


/* ════════════════════════════════════════════════════════════════
   27  Page: photo-upload.html
   ════════════════════════════════════════════════════════════════ */
.drop-zone { border: 2px dashed var(--border); border-radius: var(--r-md); padding: 36px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; transition: border-color 0.25s, background 0.25s; background: var(--cream); position: relative; text-align: center; }
.drop-zone.drag-over { border-color: var(--accent2); background: rgba(196,106,62,0.06); }
.drop-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.fmt-chip  { font-family: 'JetBrains Mono', monospace; font-size: 0.58rem; letter-spacing: 0.1em; color: var(--muted); background: var(--paper); border: 1px solid var(--border); padding: 2px 7px; border-radius: 2px; }

.queue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.queue-item { position: relative; border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; cursor: pointer; transition: border-color var(--t); background: var(--cream); aspect-ratio: 1; }
.queue-item.selected { border-color: var(--accent2); }
.queue-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.queue-item-overlay { position: absolute; inset: 0; background: rgba(26,23,20,0); transition: background var(--t); display: flex; flex-direction: column; justify-content: flex-end; padding: 8px; }
.queue-item:hover .queue-item-overlay,
.queue-item.selected .queue-item-overlay { background: rgba(26,23,20,0.5); }

.queue-item-badge  { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 700; }
.badge-pending     { background: rgba(26,23,20,0.6); color: rgba(255,255,255,0.5); }
.badge-uploading   { background: var(--accent2); color: #fff; }
.badge-done        { background: #28c840; color: #fff; }
.badge-error       { background: #ff5f57; color: #fff; }
.badge-selected    { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent2); border: 2px solid #fff; display: none; align-items: center; justify-content: center; }
.queue-item.selected .badge-selected { display: flex; }

.upload-progress-bar  { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,0.15); }
.upload-progress-fill { height: 100%; background: var(--accent2); width: 0%; transition: width 0.3s; }

/* Upload overlay */
.upload-overlay { position: fixed; inset: 0; background: rgba(10,8,6,0.88); backdrop-filter: blur(8px); z-index: 500; display: none; align-items: center; justify-content: center; }
.upload-overlay.open { display: flex; }
.upload-modal { background: var(--ink); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--r-lg); width: 420px; max-width: 92vw; padding: 32px 28px; display: flex; flex-direction: column; gap: 20px; animation: popIn 0.25s cubic-bezier(.22,.68,0,1.2) forwards; }
.um-thumb  { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; background: rgba(255,255,255,0.05); }
.um-bar-wrap { height: 4px; background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden; }
.um-bar    { height: 100%; background: var(--accent2); border-radius: 2px; width: 0%; transition: width 0.4s; }
.um-overall-bar-wrap { height: 6px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.um-overall-bar { height: 100%; background: linear-gradient(to right, var(--accent), var(--accent2)); border-radius: 3px; width: 0%; transition: width 0.3s; }
.um-close-btn { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); color: rgba(245,240,232,0.5); padding: 10px; border-radius: var(--r-sm); cursor: pointer; transition: all var(--t); display: none; }
.um-close-btn.show { display: block; }
.um-close-btn:hover { color: var(--paper); border-color: rgba(255,255,255,0.3); }


/* ════════════════════════════════════════════════════════════════
   28  Responsive (Media Queries)
   ════════════════════════════════════════════════════════════════ */

/* ── Tablet ── */
@media (max-width: 900px) {
    nav { padding: 0 24px; }

    .post-layout { grid-template-columns: 1fr; padding: 40px 32px 60px; }
    .toc-sidebar { display: none; }

    .about-wrap { grid-template-columns: 1fr; padding: 40px 32px 80px; gap: 40px; }
    .sidebar    { position: static; }
    .profile-card { max-width: 320px; }
    .about-hero-content { padding: 0 32px 40px; }

    .right-sidebar { width: 280px; }
    .page-body { grid-template-columns: 1fr; }

    /* Photos page */
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid.masonry { column-count: 3; }
    .lb-inner {
        flex-direction: column; max-width: 96vw; max-height: 92vh;
        overflow-y: auto;
    }
    .lb-sidebar { width: 100%; border-left: none; border-top: 1px solid rgba(255,255,255,0.07); }
    .lb-img-wrap { min-height: 40vh; max-height: unset; width: 100%; flex-shrink: 0; }
    .lb-img-wrap.has-image { min-height: unset; }
    .lb-img-wrap img { width: 100%; height: auto; max-height: 65vh; object-fit: contain; }

    footer { padding: 32px 24px; }
}

/* ── Tablet / Medium screens ── */
@media (max-width: 860px) {
    .content-layout { grid-template-columns: 1fr; }
    .content-sidebar { position: static; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
    nav { padding: 0 16px; }
    .nav-links li a { padding: 6px 10px; font-size: 0.7rem; letter-spacing: 0.06em; }
    .nav-icon { display: none; }
    .nav-arrow { font-size: 0.5rem; }
    .nav-dropdown-menu { left: auto; right: 0; transform: none; min-width: 170px; }
    .nav-dropdown-menu li a { padding: 8px 16px; font-size: 0.72rem; }
    .nav-links li.nav-dropdown > a.nav-dropdown-toggle { padding: 6px 10px; font-size: 0.7rem; letter-spacing: 0.06em; }
    .nav-links li.nav-dropdown .nav-dropdown-menu { left: auto; right: 0; transform: none; min-width: 170px; }

    .container      { padding: 0 20px; }
    .container-wide { padding: 0 20px; }

    .post-hero-inner { padding: 0 24px; }
    .post-layout     { padding: 28px 20px 48px; }
    .post-item       { grid-template-columns: 1fr; }
    .post-read-more  { display: none; }
    .post-nav        { grid-template-columns: 1fr; }

    .about-wrap       { padding: 32px 20px 60px; }
    .about-hero-content { padding: 0 20px 32px; }
    .skill-row        { grid-template-columns: 1fr; gap: 6px; }
    .timeline-period  { margin-left: 0; }
    .timeline-header  { flex-direction: column; gap: 6px; }

    .comment-form-row { grid-template-columns: 1fr; }
    .author-card { flex-wrap: wrap; }
    .author-github { margin-left: 0; }

    .toolbar-col  { display: none; }
    #mdEditor     { padding: 20px; }
    .right-sidebar { display: none; }

    /* Photos page */
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 2px; }
    .gallery-grid.masonry { column-count: 2; column-gap: 3px; }
    .gallery-controls { flex-direction: column; align-items: flex-start; gap: 12px; padding: 0 16px; }
    .view-toggle { padding: 0; margin: 0; }

    /* ── Lightbox: 모바일 인스타그램 스타일 ── */
    .lb-inner {
        flex-direction: column; max-width: 96vw; max-height: 92vh;
        width: 96vw; height: auto; border-radius: 8px;
        overflow-y: auto; margin: auto;
    }
    .lb-img-wrap {
        width: 100%; min-height: 40vh; max-height: unset;
        flex-shrink: 0; position: relative;
    }
    .lb-img-wrap.has-image { min-height: unset; }
    .lb-img-wrap img {
        width: 100%; height: auto; max-height: 55vh;
        object-fit: contain; display: block;
    }
    .lb-sidebar {
        width: 100%; border-left: none; border-top: 1px solid rgba(255,255,255,0.07);
        flex-shrink: 0; overflow-y: visible;
    }
    /* 캡션/태그 영역: 모바일에서도 항상 보임 */
    .lb-summary {
        padding: 14px 16px 10px; border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .lb-summary .lb-caption-title { font-size: 1.1rem; margin-bottom: 6px; }
    .lb-summary .lb-caption-text { font-size: 0.78rem; margin-bottom: 10px; }
    .lb-summary .lb-tags { margin-bottom: 0; }

    /* 메타정보 접기/펼치기 */
    .lb-meta-section {
        max-height: 0; overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .lb-sidebar.expanded .lb-meta-section { max-height: 600px; }
    .lb-sidebar .lb-exif { margin-top: 0; }

    /* 모바일 사이드바 토글 버튼 */
    .lb-mobile-toggle {
        display: flex !important; align-items: center; justify-content: center;
        gap: 6px; width: 100%; padding: 8px 16px; cursor: pointer;
        background: none; border: none; border-bottom: 1px solid rgba(255,255,255,0.07);
        color: rgba(245,240,232,0.45);
        font-family: 'JetBrains Mono', monospace; font-size: 0.58rem;
        letter-spacing: 0.15em; text-transform: uppercase; transition: color 0.2s;
    }
    .lb-mobile-toggle:hover { color: rgba(245,240,232,0.7); }
    .lb-mobile-toggle .toggle-arrow { transition: transform 0.3s; font-size: 0.45rem; }
    .lb-sidebar.expanded .lb-mobile-toggle .toggle-arrow { transform: rotate(180deg); }

    .lb-author { padding: 12px 16px; }
    .lb-actions { padding: 8px 16px; }
    .lb-nav-btn { width: 32px; height: 32px; }
    .lb-close { top: 10px; right: 10px; width: 32px; height: 32px; font-size: 0.9rem; }
    .lb-prev { left: 6px; }
    .lb-next { right: 6px; }
}

/* ── Access Denied ── */
.access-denied-wrap {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 1; text-align: center; padding: 120px 20px 40px;
}
.access-denied-icon { font-size: 64px; margin-bottom: 24px; }
.access-denied-title { font-size: 1.5rem; font-weight: 700; color: #1a1714; margin-bottom: 14px; }
.access-denied-message { font-size: 1rem; color: #555; margin-bottom: 32px; line-height: 1.6; }
.access-denied-timer {
    display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem;
    color: #666; background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.12); border-radius: 20px; padding: 10px 24px;
}
.access-denied-timer .countdown { font-weight: 700; color: #8b3a2a; font-size: 1.1rem; min-width: 20px; }
.access-denied-link {
    margin-top: 20px; font-size: 0.9rem; color: #8b3a2a;
    text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.access-denied-link:hover { border-bottom-color: #8b3a2a; }

