/* ---------------------------------------------------------------------------
   Andrii Kulyzhskyi — personal landing site
   Monochrome, system-sans, centered narrow column. No accent color.
   --------------------------------------------------------------------------- */

:root {
  --bg: #ffffff;
  --text-primary: #000000;
  --text-secondary: #5c5c66;
  --text-tertiary: #8a8a93;
  --text-strong: #27272a;
  --card-border: rgba(0, 0, 0, 0.08);
  --chip-bg: #f4f4f5;
  --chip-border: rgba(0, 0, 0, 0.04);
  --btn-hover: #f4f4f5;
  --btn-active: #e4e4e7;

  --column-width: 608px;
  --gutter: 24px;
}

:root[data-theme="dark"] {
  --bg: #0a0a0b;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-strong: #e4e4e7;
  --card-border: rgba(255, 255, 255, 0.10);
  --chip-bg: #18181b;
  --chip-border: rgba(255, 255, 255, 0.06);
  --btn-hover: #1c1c1f;
  --btn-active: #27272a;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.4px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.column {
  max-width: var(--column-width);
  margin: 0 auto;
  padding: 96px var(--gutter) 64px;
}

/* ---- Header ---- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.name {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

.role {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: 400;
  color: var(--text-secondary);
}

.site-nav {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
  padding-top: 2px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-strong);
  text-decoration: none;
}

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

/* ---- Sections ---- */
.intro {
  margin-top: 40px;
}

.intro p {
  margin: 0;
  max-width: 100%;
}

.block {
  margin-top: 88px;
}

.section-title {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ---- Cards ---- */
.cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: border-color 0.2s ease;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

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

.item-title {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: 400;
  color: var(--text-primary);
}

.item-org {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 22px;
  color: var(--text-secondary);
}

.item-date {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-secondary);
  white-space: nowrap;
  text-align: right;
}

.item-desc {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--text-tertiary);
}

/* ---- Chips ---- */
.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  font-size: 15px;
  line-height: 20px;
}

.chip-label {
  color: var(--text-primary);
  font-weight: 400;
}

.chip-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ---- Connect ---- */
.connect-line {
  margin: 0 0 20px;
}

.email-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.social-chips a.chip-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.social-chips a.chip-link:hover {
  background: var(--btn-active);
}

.arrow {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ---- Footer ---- */
.site-footer {
  margin-top: 96px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.footer-text p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-tertiary);
}

.footer-role {
  margin-top: 2px !important;
}

.theme-switcher {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.theme-btn:hover {
  background: var(--btn-hover);
  color: var(--text-secondary);
}

.theme-btn[aria-pressed="true"] {
  background: var(--btn-active);
  color: var(--text-primary);
}

/* ---- Per-letter reveal animation ---- */
.reveal-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  animation: letterReveal 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

/* preserve spaces collapsed by inline-block */
.reveal-letter.is-space {
  width: 0.28em;
}

@keyframes letterReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-letter {
    opacity: 1;
    transform: none;
    animation: none;
  }
  body {
    transition: none;
  }
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .column {
    padding: 56px 20px 48px;
  }

  .site-header {
    flex-direction: column;
    gap: 16px;
  }

  .site-nav {
    padding-top: 0;
  }

  .block {
    margin-top: 64px;
  }

  .card {
    padding: 18px 18px;
  }

  .site-footer {
    margin-top: 72px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}
