/* =========================================================
   Medvedev — personal site
   Style: print/zine minimalism — white paper, black type,
   one electric-blue accent for links, dashed rules.
   Layout: persistent left sidebar (name + nav + contact),
   content pane on the right — same shell on every page.
   Type: IBM Plex Mono throughout.
   ========================================================= */

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

:root {
    --paper: #ffffff;
    --ink: #0a0a0a;
    --ink-soft: #6b6b6b;
    --blue: #1a1aef;
    --line: #0a0a0a;
    --mono: "IBM Plex Mono", "Courier New", monospace;
    --sidebar-w: 232px;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--ink); }
::selection { background: var(--blue); color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Two-column shell ---------- */

.layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
}

/* ---------- Sidebar (persistent) ---------- */

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 40px 24px;
    border-right: 1px dashed var(--line);
    display: flex;
    flex-direction: column;
}

.sidebar-name {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    color: var(--ink);
    margin-bottom: 4px;
}

.sidebar-tag {
    font-size: 10px;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 26px;
}

.sidebar-nav {
    list-style: none;
    display: grid;
    gap: 6px;
    margin-bottom: auto;
}

.sidebar-nav a {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sidebar-nav a .arrow { font-size: 11px; }

.sidebar-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

.sidebar-nav a.is-active {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sidebar-contact {
    display: grid;
    gap: 2px;
    font-size: 11px;
    padding-top: 26px;
    margin-top: 26px;
    border-top: 1px dashed var(--line);
}

.sidebar-contact a { color: var(--ink); text-decoration: none; }
.sidebar-contact a:hover { color: var(--blue); }

/* ---------- Content pane ---------- */

.content-pane {
    padding: 40px 40px 64px;
    min-width: 0;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    margin-bottom: 4px;
}

.section-label::after { content: "—"; display: block; margin-top: 2px; color: var(--ink-soft); }

h1.page-title {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    letter-spacing: -0.005em;
    line-height: 1.1;
    margin: 6px 0 18px;
}

.lede { max-width: 56ch; font-size: 14.5px; color: var(--ink); line-height: 1.75; }
.lede + .lede { margin-top: 12px; }

.text-block { max-width: 58ch; }
.text-block p { margin-bottom: 14px; }
.text-block p:last-child { margin-bottom: 0; }
.text-block a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.quick-links {
    list-style: none;
    display: grid;
    gap: 2px;
    max-width: 420px;
    margin-top: 8px;
}

.quick-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 2px;
    border-bottom: 1px dashed var(--line);
    text-decoration: none;
    color: var(--ink);
    font-size: 13.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.quick-links a:hover { color: var(--blue); }
.quick-links a .arrow { color: var(--ink-soft); }
.quick-links a:hover .arrow { color: var(--blue); }

/* ---------- Portfolio: receipt-style item rows ---------- */

.specimen-list { display: grid; }

.specimen-row {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    gap: 18px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px dashed var(--line);
}

.specimen-row:last-child { border-bottom: 1px dashed var(--line); }

.specimen-thumb {
    aspect-ratio: 4 / 3;
    background: var(--paper);
    border: 1px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    overflow: hidden;
}

.specimen-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.specimen-body { min-width: 0; }

.specimen-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }

.specimen-meta {
    font-size: 10.5px;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.specimen-desc { font-size: 13px; color: var(--ink); line-height: 1.6; }

.specimen-side { text-align: right; white-space: nowrap; }

.specimen-status {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    margin-bottom: 8px;
}

.specimen-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--blue);
}

.specimen-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.specimen-link svg { width: 10px; height: 10px; }

.specimen-empty {
    padding: 28px 0;
    border-top: 1px dashed var(--line);
    color: var(--ink-soft);
    font-size: 13px;
}

@media (max-width: 760px) {
    .specimen-row { grid-template-columns: 72px 1fr; }
    .specimen-side { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; gap: 14px; margin-top: 4px; }
    .specimen-status { margin-bottom: 0; }
}

/* ---------- Blog: logbook list ---------- */

.log-list { max-width: 58ch; }

.log-entry { padding: 18px 0; border-top: 1px dashed var(--line); }
.log-entry:last-child { border-bottom: 1px dashed var(--line); }

.log-date {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    margin-bottom: 8px;
}

.log-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.log-text { font-size: 14px; color: var(--ink); line-height: 1.7; }

/* ---------- Contact ---------- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    max-width: 640px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}

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

.social-stack { display: grid; gap: 2px; }

.social-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
    text-decoration: none;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.social-btn:hover { color: var(--blue); }
.social-btn .arrow { color: var(--ink-soft); font-size: 13px; }
.social-btn:hover .arrow { color: var(--blue); }

.contact-form { display: grid; gap: 12px; }

.form-field { display: grid; gap: 6px; }

.form-field label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
}

.form-field input,
.form-field textarea {
    font-family: var(--mono);
    font-size: 13.5px;
    padding: 9px 10px;
    background: var(--paper);
    border: 1px solid var(--ink);
    color: var(--ink);
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
    border-color: var(--blue);
}

.submit-btn {
    justify-self: start;
    margin-top: 4px;
    padding: 10px 22px;
    background: var(--ink);
    color: var(--paper);
    border: 0;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}

.submit-btn:hover { background: var(--blue); }
.submit-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Responsive: sidebar stacks on top ---------- */

@media (max-width: 760px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px dashed var(--line);
        padding: 24px 20px;
    }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; gap: 14px 18px; margin-bottom: 18px; }
    .sidebar-contact { flex-direction: row; gap: 16px; padding-top: 16px; margin-top: 0; }
    .content-pane { padding: 28px 20px 48px; }
}

/* ---------- Movies: fixed-size poster grid ---------- */

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 22px 18px;
    margin-top: 8px;
}

.movie-card { min-width: 0; }

.movie-poster {
    aspect-ratio: 2 / 3;
    background: var(--paper);
    border: 1px solid var(--ink);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    font-size: 10px;
    text-align: center;
    padding: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.movie-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.movie-title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 8px;
}

.movie-rating {
    font-size: 11px;
    color: var(--blue);
    font-weight: 600;
    margin-top: 2px;
}
