/* Yevhenii Telychko — portfolio site styles
   One Dark / code-editor theme rebuilt from the design system.
   Palette, type and spacing tokens extracted verbatim from the source. */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&display=swap');

:root {
  /* palette */
  --bg: #282C33;
  --bg-deep: #1F2227;
  --white: #FFFFFF;
  --muted: #ABB2BF;
  --border: #4B5362;
  --accent: #C778DD;
  --accent-wash: rgba(199, 120, 221, 0.2);
  --muted-wash: rgba(171, 178, 191, 0.2);
  --font-mono: "Fira Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* Horizontal clipping lives on <html> (the page scroll root), NOT on <body>.
   overflow-x:hidden on <body> makes the body its own scroll container, which
   breaks `position: sticky` on the header (it scrolls away on mobile). */
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.4;
}

a { color: var(--muted); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: rgba(199, 120, 221, 0.35); }
img { max-width: 100%; }

.hash { color: var(--accent); }

/* ---- layout ---- */
.container { max-width: 1024px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { display: flex; flex-direction: column; gap: 28px; padding-top: 56px; }
.section-head { display: flex; flex-direction: row; gap: 16px; align-items: center; }
.section-title { font-weight: 500; font-size: 32px; line-height: 1; white-space: nowrap; }
.rule { height: 1px; flex: 1 1 0; background: var(--accent); }
.muted { color: var(--muted); }
.lead { margin: 0; font-size: 16px; line-height: 26px; color: var(--muted); }

/* ---- social rail ---- */
.rail {
  position: fixed; left: 17px; top: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.rail-line { width: 1px; height: 191px; background: var(--muted); }
.rail a { color: var(--muted); display: flex; }
.rail a:hover { color: var(--accent); }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 60; background: var(--bg);
}
.site-header .inner {
  max-width: 1024px; margin: 0 auto; padding: 16px 24px;
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.brand { display: flex; flex-direction: row; align-items: center; gap: 9px; color: var(--white); }
.brand:hover { color: var(--white); }
.brand .wordmark { font-weight: 700; font-size: 16px; color: var(--white); white-space: nowrap; }
.nav { display: flex; flex-direction: row; align-items: center; gap: 24px; flex-wrap: wrap; }
.nav-link { font-size: 16px; color: var(--muted); }
.nav-link.is-active { color: var(--white); }
.nav-link:hover { color: var(--white); }

.lang-switcher { position: relative; }
.lang-toggle {
  display: flex; flex-direction: row; align-items: center; gap: 5px; cursor: pointer;
  color: var(--white); user-select: none; background: none; border: 0; padding: 0;
  font-family: inherit; font-weight: 600; font-size: 16px;
}
.lang-toggle .chev { font-size: 11px; color: var(--muted); display: inline-block; transition: transform .2s ease; }
.lang-switcher.open .lang-toggle .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; left: -8px; top: 26px; z-index: 50; background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--muted); display: flex; flex-direction: column; gap: 8px; padding: 8px;
}
.lang-menu[hidden] { display: none; }
.lang-opt { font-size: 16px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.lang-opt.is-active { color: var(--white); }
.lang-opt:hover { color: var(--white); }

/* burger (mobile only) */
.burger { display: none; background: none; border: 0; padding: 6px; margin: -6px; cursor: pointer; color: var(--white); align-items: center; justify-content: center; }
.burger svg { display: block; }
.burger .ic-close { display: none; }
.site-header.nav-open .burger .ic-menu { display: none; }
.site-header.nav-open .burger .ic-close { display: block; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--muted); margin-top: 24px; }
.site-footer .inner {
  max-width: 1024px; margin: 0 auto; padding: 32px 24px 16px;
  display: flex; flex-direction: row; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-id { display: flex; flex-direction: row; align-items: center; gap: 9px; flex-wrap: wrap; color: var(--white); }
.footer-id .wordmark { font-weight: 700; font-size: 16px; color: var(--white); white-space: nowrap; }
.footer-role { font-size: 14px; color: var(--muted); margin-left: 12px; white-space: nowrap; }
.footer-email { font-size: 14px; color: var(--accent); margin-left: 12px; white-space: nowrap; }
.footer-email:hover { color: var(--white); }
.footer-social { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; }
.footer-social a { color: var(--white); }
.footer-social a:hover { color: var(--accent); }
.copyright { max-width: 1024px; margin: 0 auto; padding: 0 24px 24px; text-align: center; font-size: 14px; color: var(--muted); }
.copyright a { color: var(--muted); text-decoration: underline; }
.copyright a:hover { color: var(--accent); }

/* ---- buttons ---- */
.btn {
  display: inline-block; padding: 8px 16px; font-weight: 500; font-size: 16px;
  border-radius: 5px; cursor: pointer; white-space: nowrap; transition: background-color .2s ease;
}
.btn-primary { box-shadow: inset 0 0 0 1px var(--accent); color: var(--white); }
.btn-primary:hover { background-color: var(--accent-wash); color: var(--white); }
.btn-secondary { box-shadow: inset 0 0 0 1px var(--muted); color: var(--muted); }
.btn-secondary:hover { background-color: var(--muted-wash); color: var(--muted); }

/* ---- cards ---- */
.card {
  box-shadow: inset 0 0 0 1px var(--muted); display: flex; flex-direction: column;
  transition: box-shadow .2s ease;
}
.card:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.card-dim { box-shadow: inset 0 0 0 1px var(--border); }
.card-dim:hover { box-shadow: inset 0 0 0 1px var(--muted); }

.grid { display: grid; gap: 16px; }
.grid-300 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-260 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.grid-240 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.chip {
  font-size: 12px; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent);
  padding: 2px 8px; white-space: nowrap;
}
.tag { font-size: 14px; color: var(--muted); white-space: nowrap; }
.pill { box-shadow: inset 0 0 0 1px var(--muted); padding: 8px 16px; font-size: 15px; color: var(--white); white-space: nowrap; }

/* project card internals */
.pcard-head { display: flex; flex-direction: row; gap: 8px; padding: 8px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--muted); }
.pcard-body { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1 1 auto; }
.pcard-title { font-weight: 500; font-size: 22px; line-height: 1.2; color: var(--white); }
.pcard-desc { font-size: 15px; line-height: 1.4; color: var(--muted); }
.pcard-metric { font-weight: 500; font-size: 14px; line-height: 1.4; color: var(--accent); margin-top: auto; }
.pcard-actions { display: flex; flex-direction: row; align-items: center; gap: 16px; margin-top: 4px; flex-wrap: wrap; }
.pcard-status { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* filter chips */
.filter-row { display: flex; flex-direction: row; gap: 10px; flex-wrap: wrap; }
.filter-chip {
  box-shadow: inset 0 0 0 1px var(--muted); background-color: transparent; padding: 8px 16px;
  font-size: 14px; color: var(--muted); cursor: pointer; border-radius: 5px; white-space: nowrap;
}
.filter-chip:hover { color: var(--white); }
.filter-chip.is-active { box-shadow: inset 0 0 0 1px var(--accent); background-color: rgba(199,120,221,0.15); color: var(--white); }

/* experience */
.exp-card { box-shadow: inset 0 0 0 1px var(--muted); padding: 24px; display: flex; flex-direction: column; gap: 14px; transition: box-shadow .2s ease; }
.exp-card:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.exp-top { display: flex; flex-direction: row; gap: 16px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.exp-role-wrap { display: flex; flex-direction: row; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.exp-role { font-weight: 500; font-size: 22px; color: var(--white); }
.exp-company { font-size: 16px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.exp-company:hover { color: var(--white); }
.exp-dates { font-size: 14px; color: var(--muted); }
.exp-bullets { display: flex; flex-direction: column; gap: 8px; }
.bullet { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; }
.bullet .arrow { font-size: 14px; color: var(--accent); flex-shrink: 0; line-height: 24px; }
.bullet span:last-child { font-size: 15px; line-height: 24px; color: var(--muted); }

/* read-more link */
.readmore { font-size: 15px; color: var(--muted); }
.readmore:hover { color: var(--accent); }

/* ---- reveal animation ---- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---- responsive ---- */
@media (max-width: 960px) { .rail { display: none !important; } }

@media (max-width: 760px) {
  .hero-visual { display: none !important; }

  .site-header .inner { position: relative; }
  .burger { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 20px;
    background: var(--bg); padding: 20px 24px 24px;
    border-bottom: 1px solid var(--muted);
  }
  .site-header.nav-open .nav { display: flex; }
  .nav-link { font-size: 18px; }
  .lang-switcher { align-self: stretch; }
  .lang-menu { position: static; box-shadow: none; padding: 12px 0 0; flex-direction: row; gap: 20px; }
  .lang-toggle .chev { display: none; }
}
