/* Shared styles for smalianchuk.com. Replaces the old CoffeeCup template CSS (vanillacss / wireframe-theme / main.css). */

:root {
  --navy: #13274a;
  --navy-2: #1d3a6b;
  --cream: #fafaf3;
  --card: #fffffb;
  --ink: #13274a;
  --muted: #5f6b84;
  --line: #e2e4ea;
  --accent: #2f8f7b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(19, 39, 74, .06), 0 6px 20px rgba(19, 39, 74, .07);
  --bar-h: 60px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--navy); color: #fff; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px 0 14px;
  background: var(--navy); color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 4px 16px rgba(0, 0, 0, .12);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; margin-right: auto; min-width: 0; }
.brand img { height: 36px; width: auto; }
.brand span { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }

.links { display: flex; align-items: center; gap: 4px; }
.links a {
  text-decoration: none; color: rgba(255, 255, 255, .82);
  font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
  transition: background-color .15s, color .15s;
}
.links a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.links a[aria-current="page"] { color: var(--navy); background: #fff; }

.menu-btn {
  display: none;
  width: 44px; height: 44px; margin-right: -6px;
  border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn:hover { background: rgba(255, 255, 255, .1); }
.menu-btn svg { width: 26px; height: 26px; }
.menu-btn .close { display: none; }

@media (max-width: 920px) {
  .menu-btn { display: inline-flex; }
  .links {
    position: absolute; top: var(--bar-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px 12px 14px;
    background: var(--navy);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
    display: none;
  }
  .links a { font-size: 18px; padding: 13px 14px; border-radius: 10px; }
  .topbar.open .links { display: flex; }
  .topbar.open .menu-btn .open { display: none; }
  .topbar.open .menu-btn .close { display: block; }
}

/* ---------- page layout ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(2.3rem, 9vw, 3.6rem); }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 18px; }
main { flex: 1 0 auto; width: 100%; padding-bottom: 56px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.empty { padding: 36px 24px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--ink); font-size: 26px; margin-bottom: 8px; }
.empty p { margin: 0 auto; max-width: 34em; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 22px; padding-bottom: 28px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- home ---------- */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 22, 44, 0) 50%, rgba(10, 22, 44, .78) 100%); pointer-events: none; }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 16px 16px; }
.hero h1 { font-size: clamp(2.3rem, 10.5vw, 6.5rem); letter-spacing: .01em; text-shadow: 0 2px 18px rgba(0, 0, 0, .4); }
.hero p { margin: 2px 0 0; font-size: clamp(.95rem, 3.4vw, 1.3rem); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
@media (min-width: 921px) {
  .hero img { aspect-ratio: auto; height: min(72vh, 680px); object-position: 50% 35%; }
  .hero-text { max-width: 1040px; margin: 0 auto; padding-bottom: 40px; }
}

.section-title { font-size: 26px; margin: 36px 0 16px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.tile {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 16px 16px;
  text-decoration: none; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.tile:hover { transform: translateY(-2px); border-color: #c9cfdb; box-shadow: 0 2px 4px rgba(19, 39, 74, .08), 0 12px 28px rgba(19, 39, 74, .12); }
.tile:active { transform: translateY(0); }
.tile .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #e8edf6; color: var(--navy); }
.tile .icon svg { width: 24px; height: 24px; }
.tile h3 { font-size: 20px; }
.tile p { margin: -4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.tile .status { margin-top: auto; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #b8bfcc; flex: none; }
.tile .status.busy::before { background: #2b7de0; }
.tile .status.idle::before { background: var(--accent); }
.tile .status.err::before { background: #c24a4a; }
@media (max-width: 380px) { .tile p { display: none; } }

@media (prefers-reduced-motion: reduce) { .tile, .links a { transition: none; } .tile:hover { transform: none; } }

/* ---------- photos ---------- */
.photo-feature { overflow: hidden; }
.photo-feature img { width: 100%; }
.photo-feature figcaption { padding: 14px 18px; color: var(--muted); font-size: 15px; }

/* ---------- app frame ---------- */
body.app-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.app-page .topbar { position: relative; flex: none; }
.app-frame { flex: 1; width: 100%; border: 0; background: #fff; display: block; }
