/* Tatiana Rogozina — portfolio
   Strict Scandinavian layout, italic serif headings (Instrument Serif), Inter for text.
   Fonts are self-hosted (no requests to Google). */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #fbfaf7;
  --text: #161616;
  --muted: #6e6b65;
  --line: #e2dfd8;
  --soft: #efece6;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(20px, 4.5vw, 64px);
  --max: 1320px;
  --text-max: 64ch;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Background image: barely visible, fixed behind all content.
   Change --bg-image-opacity to make it stronger or weaker. */
:root { --bg-image-opacity: .10; }
body { position: relative; isolation: isolate; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../img/background.jpg") center / cover no-repeat;
  opacity: var(--bg-image-opacity);
  filter: saturate(.9);
  pointer-events: none;
}
@media print { body::before { display: none; } }

img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line);
  transition: text-decoration-color .15s ease;
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
a.ext::after { content: "\2009\2197"; font-size: .85em; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: var(--bg); padding: 8px 14px; z-index: 10;
}
.skip:focus { left: var(--gutter); top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Header ---------- */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-note { margin-left: 16px; vertical-align: 4px; }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 30px;
}
.site-nav a {
  font-size: 14px;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--text); }

/* ---------- Page heads ---------- */
.page-head {
  padding: clamp(56px, 9vw, 128px) 0 clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(54px, 8vw, 112px);
  line-height: .95;
  letter-spacing: -0.02em;
}
.page-head .lead { margin-top: 24px; max-width: 46ch; color: var(--muted); font-size: 17px; }

/* ---------- Home ---------- */
.home { padding-top: clamp(72px, 12vw, 190px); padding-bottom: clamp(48px, 7vw, 104px); }
.home-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(64px, 12.5vw, 188px);
  line-height: .9;
  letter-spacing: -0.025em;
}
.home-role {
  margin: clamp(14px, 1.8vw, 26px) 0 0;
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-meta {
  margin-top: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 980px;
}
.hero-meta p { margin: 8px 0 0; font-size: 15px; }

.home-index { padding-bottom: clamp(64px, 9vw, 128px); }
.home-index a {
  display: grid;
  grid-template-columns: 56px minmax(0, 6fr) minmax(0, 5fr) 24px;
  align-items: baseline;
  gap: 20px;
  padding: clamp(18px, 2.2vw, 28px) 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.home-index a:last-child { border-bottom: 1px solid var(--line); }
.home-index .n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.home-index .t {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.05;
}
.home-index .d { font-size: 15px; color: var(--muted); }
.home-index .arr { text-align: right; transition: transform .2s ease; }
.home-index a:hover .arr { transform: translateX(4px); }
.home-index a:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; }

/* image placeholder until real images arrive */
.ph {
  position: relative;
  background: var(--soft);
  overflow: hidden;
}
.ph::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top right, transparent calc(50% - .5px), var(--line) 50%, transparent calc(50% + .5px)),
    linear-gradient(to top left, transparent calc(50% - .5px), var(--line) 50%, transparent calc(50% + .5px));
  opacity: .7;
}
.ph span {
  position: absolute; left: 16px; bottom: 14px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Text pages ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(40px, 6vw, 88px) 0;
}
.split + .split { border-top: 1px solid var(--line); }
.split aside { position: relative; }
.prose { max-width: var(--text-max); font-size: 17px; }
.prose .intro {
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.25;
  margin-bottom: 1.2em;
}
.prose .intro em { font-style: italic; }
.portrait { width: 100%; max-width: 360px; height: auto; }

.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts .label { display: block; margin-bottom: 2px; }

/* ---------- CV (experience & education) ---------- */
.cv-section { padding: clamp(40px, 6vw, 80px) 0; }
.cv-section + .cv-section { border-top: 1px solid var(--line); }
.cv-section > h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.cv-row {
  display: grid;
  grid-template-columns: minmax(150px, 3fr) minmax(0, 9fr);
  gap: 8px clamp(20px, 4vw, 56px);
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.cv-row:last-child { border-bottom: 1px solid var(--line); }
.cv-date { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.cv-role { font-size: 18px; font-weight: 550; line-height: 1.35; }
.cv-org { margin-top: 2px; color: var(--muted); font-size: 15px; }
.cv-org a { color: var(--text); }
.cv-body { max-width: var(--text-max); }
.cv-body p { margin: 10px 0 0; font-size: 15px; }
.cv-body ul { margin: 12px 0 0; padding: 0; list-style: none; }
.cv-body li { position: relative; padding-left: 20px; font-size: 15px; margin: 5px 0; }
.cv-body li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.cv-body em { font-style: italic; }

/* ---------- Software ---------- */
.skills-legend { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; font-size: 13px; color: var(--muted); }
.skills-legend span { display: inline-flex; align-items: center; gap: 10px; }
.skill-group { padding: clamp(36px, 5vw, 64px) 0; }
.skill-group + .skill-group { border-top: 1px solid var(--line); }
.skill-group-inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(20px, 4vw, 64px);
}
.skill-group h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.05;
}
.skill-list { list-style: none; margin: 0; padding: 0; }
.skill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 110px;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 17px;
}
.skill:last-child { border-bottom: 1px solid var(--line); }
.skill .lvl-word { font-size: 13px; color: var(--muted); text-align: right; }
.lvl { display: inline-flex; gap: 5px; }
.lvl i { width: 26px; height: 4px; background: var(--line); display: block; }
.lvl[data-level="1"] i:nth-child(-n+1),
.lvl[data-level="2"] i:nth-child(-n+2),
.lvl[data-level="3"] i:nth-child(-n+3) { background: var(--text); }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { border: 1px solid var(--line); padding: 7px 14px; font-size: 14px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 120px);
}
.channels { list-style: none; margin: 32px 0 0; padding: 0; }
.channels li { padding: 14px 0; border-top: 1px solid var(--line); }
.channels li:last-child { border-bottom: 1px solid var(--line); }
.channels .label { display: block; margin-bottom: 2px; }
.channels a, .channels span.v { font-size: 18px; }

.form { display: grid; gap: 28px; }
.field label { display: block; }
.label-note { text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  width: 100%;
  margin-top: 6px;
  border: 0;
  border-bottom: 1px solid var(--text);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  padding: 10px 0;
}
.field textarea { resize: vertical; min-height: 160px; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-width: 2px; padding-bottom: 9px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--text); }
.hp { position: absolute !important; left: -9999px !important; }
.btn {
  justify-self: start;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 15px 34px;
  border-radius: 0;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: transparent; color: var(--text); }
.btn[disabled] { opacity: .5; cursor: progress; }
.form-status { min-height: 1.6em; font-size: 15px; }
.form-status.ok { color: #1f5f3a; }
.form-status.err { color: #8a2a1d; }

/* ---------- Legal pages ---------- */
.legal { padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 120px); }
.legal h2 { font-family: var(--serif); font-style: italic; font-size: 30px; margin: 40px 0 10px; }
.legal p, .legal li { max-width: var(--text-max); font-size: 16px; }
.todo { background: #fff3b0; padding: 0 4px; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  /* divider limited to the content width, like the other lines */
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  font-size: 13px; color: var(--muted);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .split, .skill-group-inner, .contact-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 260px; }
}
@media (max-width: 720px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 20px; padding-bottom: 18px; }
  .brand { font-size: 28px; }
  .brand-note { display: none; }
  .site-nav ul { gap: 4px 18px; }
  .site-nav a { font-size: 14px; }
  .home-index a { grid-template-columns: 32px minmax(0, 1fr) 20px; gap: 4px 12px; }
  .home-index .d { grid-column: 2; grid-row: 2; }
  .home-index .arr { grid-column: 3; grid-row: 1; }
  .hero-meta { grid-template-columns: 1fr; gap: 16px; }
  .cv-row { grid-template-columns: 1fr; gap: 4px; }
  .skill { grid-template-columns: minmax(0, 1fr) auto 70px; gap: 12px; font-size: 16px; }
  .skill .lvl i { width: 18px; }
  .row-2 { grid-template-columns: 1fr; }
  .btn { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
