/* =========================================================
   Alik Vodyanov — Portfolio
   Refined Studio · dark + gold
   ========================================================= */

:root {
  --accent: #f5c451;
  --accent-2: #c79a34;
  --accent-rgb: 245, 196, 81;

  --bg: #0f0f12;
  --backdrop: #16161a;
  --sidebar: linear-gradient(180deg, #161619, #111114);
  --card: #161619;
  --border: #26262b;
  --chip: #17171b;
  --chip-border: #2c2c31;

  --hi: #f5f5f7;
  --mid: #a1a1a6;
  --low: #6b6b70;
  --text: #d4d4d8;

  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--backdrop);
  font-family: var(--sans);
  color: var(--text);
  min-height: 100vh;
  padding: 40px 24px 64px;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--accent); }
a:hover { color: var(--accent-2); }
li { list-style: none; }
::selection { background: var(--accent); color: #131315; }

/* ---------- App shell ---------- */
.frame {
  width: 1180px;
  max-width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
}
.grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 900px;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 44px 34px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 40px;
  align-self: flex-start;
}
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.avatar-wrap { position: relative; }
.avatar-wrap::before {
  content: ""; position: absolute; inset: -6px; border-radius: 32px;
  background: linear-gradient(140deg, var(--accent), transparent 60%); opacity: 0.55;
}
.avatar {
  position: relative; width: 130px; height: 130px; border-radius: 28px;
  object-fit: cover; border: 1px solid var(--chip-border);
}
.name { color: var(--hi); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.role {
  margin-top: 10px; display: inline-block; font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1); border: 1px solid rgba(var(--accent-rgb), 0.25);
  padding: 5px 12px; border-radius: 7px;
}
.divider { height: 1px; background: var(--border); }

.contacts { display: flex; flex-direction: column; gap: 20px; }
.contact { display: flex; align-items: center; gap: 14px; }
.contact .ic {
  width: 40px; height: 40px; border-radius: 11px; background: var(--chip);
  border: 1px solid var(--chip-border); display: flex; align-items: center;
  justify-content: center; color: var(--accent); flex: none;
}
.contact .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--low); }
.contact .val { color: var(--text); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.contact .val:hover { color: var(--accent); }

.cta {
  display: flex; align-items: center; justify-content: center; gap: 9px; padding: 14px;
  border-radius: 13px; background: var(--accent); color: #141414; font-weight: 600; font-size: 14px;
  transition: filter .2s, transform .2s;
}
.cta:hover { color: #141414; filter: brightness(1.05); transform: translateY(-1px); }

/* ---------- Content ---------- */
.content { padding: 52px 48px; display: flex; flex-direction: column; min-width: 0; }

.nav {
  display: flex; gap: 8px; align-self: flex-end; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; padding: 5px; margin-bottom: 44px;
}
.nav a {
  padding: 8px 18px; border-radius: 8px; color: var(--mid); font-size: 13px; font-weight: 500;
  transition: background-color .2s, color .2s;
}
.nav a:hover { color: var(--hi); }
.nav a[aria-current="page"] { background: var(--accent); color: #141414; }

.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.h2 { color: var(--hi); font-size: 34px; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; max-width: 640px; }
.lead { color: var(--mid); font-size: 15px; line-height: 1.75; margin-top: 20px; max-width: 640px; font-weight: 300; }

.section { }
.section + .section { margin-top: 44px; }
.h3 { color: var(--hi); font-size: 15px; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.h3::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; flex: none; }
.h3-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.h3-row .h3 { margin-bottom: 0; }
.link-mono { font-family: var(--mono); font-size: 12px; color: var(--low); transition: color .2s; }
.link-mono:hover { color: var(--accent); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-size: 13px; color: var(--text); background: var(--chip); border: 1px solid var(--chip-border);
  padding: 8px 15px; border-radius: 9px; transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* focus cards */
.focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.focus {
  background: var(--card); border: 1px solid var(--border); border-radius: 15px; padding: 22px;
  transition: border-color .2s, transform .2s;
}
.focus:hover { border-color: var(--accent); transform: translateY(-3px); }
.focus .ic {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.25); display: flex; align-items: center;
  justify-content: center; color: var(--accent); margin-bottom: 14px;
}
.focus .t { color: var(--hi); font-size: 15px; font-weight: 500; }
.focus p { color: var(--mid); font-size: 13px; line-height: 1.6; margin-top: 6px; }

/* github */
.gh-card { background: var(--card); border: 1px solid var(--border); border-radius: 15px; padding: 22px; }
.gh-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px); gap: 3px; width: max-content; }
.gh-cell { width: 11px; height: 11px; border-radius: 2px; }
.gh-scroll { overflow-x: auto; padding-bottom: 4px; }
.gh-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 16px; font-family: var(--mono); font-size: 11px; color: var(--mid); }
.gh-legend .sw { display: flex; align-items: center; gap: 4px; }
.gh-legend i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.gh-loading { color: var(--mid); font-size: 13px; text-align: center; padding: 16px 0; }

/* selected-work list (About) */
.worklist { display: flex; flex-direction: column; }
.workrow {
  display: flex; align-items: baseline; gap: 18px; padding: 16px 0; border-top: 1px solid var(--border);
  transition: opacity .2s;
}
.worklist .workrow:last-child { border-bottom: 1px solid var(--border); }
.workrow:hover .wr-title { color: var(--accent); }
.wr-year { font-family: var(--mono); font-size: 12px; color: var(--low); width: 70px; flex: none; }
.wr-body { flex: 1; }
.wr-title { color: var(--text); font-size: 15px; font-weight: 500; transition: color .2s; }
.wr-sub { color: var(--mid); font-size: 12px; margin-top: 3px; }
.wr-venue { font-family: var(--mono); font-size: 11px; color: var(--accent); flex: none; }

/* work cards (Work page) */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; }
.work {
  display: block; background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px; color: inherit; transition: border-color .2s, transform .2s;
}
.work:hover { border-color: var(--accent); transform: translateY(-3px); color: inherit; }
.work .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); background: rgba(var(--accent-rgb), 0.1); border: 1px solid rgba(var(--accent-rgb), 0.22);
  padding: 4px 10px; border-radius: 20px;
}
.work .venue { font-family: var(--mono); font-size: 12px; color: var(--low); }
.work .wt { color: var(--hi); font-size: 17px; font-weight: 600; line-height: 1.35; transition: color .2s; }
.work:hover .wt { color: var(--accent); }
.work p { color: var(--mid); font-size: 13px; line-height: 1.65; margin-top: 10px; font-weight: 300; }
.work .more { display: inline-flex; align-items: center; gap: 5px; margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--low); }

/* timeline (Experience) */
.tl-group + .tl-group { margin-top: 48px; }
.tl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.tl-head .ic {
  width: 38px; height: 38px; border-radius: 11px; background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.25); display: flex; align-items: center;
  justify-content: center; color: var(--accent); flex: none;
}
.tl-head h3 { color: var(--hi); font-size: 19px; font-weight: 600; }
.tl { padding-left: 6px; }
.tl-item { position: relative; padding-left: 28px; padding-bottom: 30px; border-left: 1px solid var(--border); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -4.5px; top: 5px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.tl-item h4 { color: var(--hi); font-size: 15px; font-weight: 600; }
.tl-item .org { color: var(--mid); font-size: 12px; margin-top: 3px; }
.tl-item .date { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: 4px; }
.tl-item p { color: var(--mid); font-size: 13px; line-height: 1.6; margin-top: 10px; font-weight: 300; }

/* ---------- Splash / intro ---------- */
.splash {
  position: fixed; inset: 0; z-index: 1000; background: #0e0e11;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 8vw; will-change: opacity, transform;
}
html.splash-seen .splash { display: none !important; }
@media (prefers-reduced-motion: reduce) { .splash { display: none !important; } }
body.splash-lock { overflow: hidden; }
.splash.hide { opacity: 0; transform: translateY(-3%); pointer-events: none; transition: opacity .6s ease, transform .6s ease; }

.sp-eye {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px; opacity: 0;
  animation: spEye .6s ease .1s forwards;
}
.sp-rule {
  height: 2px; width: min(360px, 60vw); background: var(--accent); transform: scaleX(0);
  transform-origin: left; margin-bottom: 26px; animation: spLine .7s cubic-bezier(.7,0,.3,1) .2s forwards;
}
.sp-mask { overflow: hidden; }
.sp-name {
  font-family: var(--sans); font-weight: 600; font-size: clamp(44px, 9vw, 88px); line-height: 1.02;
  letter-spacing: -0.03em; color: var(--hi); transform: translateY(115%);
  animation: spRise .85s cubic-bezier(.2,.8,.2,1) .35s forwards;
}
.sp-role {
  font-family: var(--mono); font-size: clamp(13px, 1.6vw, 16px); letter-spacing: 0.06em;
  color: var(--mid); margin-top: 20px; transform: translateY(120%);
  animation: spRise .85s cubic-bezier(.2,.8,.2,1) .55s forwards;
}
.sp-skip {
  position: absolute; right: 28px; bottom: 24px; background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--low); opacity: 0; animation: spEye .5s ease 1.4s forwards; transition: color .2s;
}
.sp-skip:hover { color: var(--accent); }
@keyframes spEye { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes spRise { from { transform: translateY(115%); } to { transform: translateY(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  body { padding: 20px 14px 40px; }
  .grid { grid-template-columns: 1fr; }
  .sidebar { position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .content { padding: 36px 28px; }
  .nav { align-self: stretch; justify-content: center; }
  .focus-grid, .work-grid { grid-template-columns: 1fr; }
  .h2 { font-size: 28px; }
}
@media (max-width: 560px) {
  .content { padding: 28px 18px; }
  .nav a { padding: 8px 12px; font-size: 12px; }
  .work .top { flex-direction: column; align-items: flex-start; gap: 8px; }
}
