/* ===========================================================
   Yuliia Tkachenko — Atlassian Administrator, online CV/portfolio
   No external fonts/CDNs are loaded (privacy-by-design / GDPR).
   =========================================================== */

:root {
  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;

  --accent: #0C66E4;
  --accent-dark: #0052CC;
  --accent-soft: #E9F2FF;
  --success: #1F845A;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --max-width: 1160px;

  /* Light theme */
  --bg: #FAFBFC;
  --bg-elevated: #FFFFFF;
  --bg-muted: #F1F3F6;
  --text: #16181D;
  --text-muted: #565A63;
  --border: #E4E7EC;
  --shadow: 0 1px 2px rgba(23, 26, 33, 0.04), 0 8px 24px rgba(23, 26, 33, 0.06);
}

:root[data-theme="dark"] {
  --bg: #0E1116;
  --bg-elevated: #171B22;
  --bg-muted: #1C212A;
  --text: #EAEDF2;
  --text-muted: #9AA3B2;
  --border: #262C36;
  --accent: #4C9AFF;
  --accent-dark: #2684FF;
  --accent-soft: #16233B;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1116;
    --bg-elevated: #171B22;
    --bg-muted: #1C212A;
    --text: #EAEDF2;
    --text-muted: #9AA3B2;
    --border: #262C36;
    --accent: #4C9AFF;
    --accent-dark: #2684FF;
    --accent-soft: #16233B;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }
@media (max-width: 768px) {
  section { padding: 64px 0; }
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.01em; }
p { line-height: 1.65; color: var(--text-muted); margin: 0; }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { margin-top: 12px; font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 6px 18px rgba(12, 102, 228, 0.3); }
.btn-secondary { background: var(--bg-elevated); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, #6E5DC6 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0; padding: 0;
  flex-wrap: nowrap;
  min-width: 0;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }

.nav-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  color: var(--text);
}
.icon-btn svg { width: 18px; height: 18px; }

.lang-switch { position: relative; }
.lang-current {
  display: flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  color: var(--text);
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  min-width: 140px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.lang-menu.open { display: flex; }
.lang-menu button {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.lang-menu button:hover { background: var(--bg-muted); }
.lang-menu button[aria-current="true"] { color: var(--accent); font-weight: 700; }

.nav-cta { display: none; white-space: nowrap; }
@media (min-width: 1200px) { .nav-cta { display: inline-flex; } }

.menu-toggle { display: none; }
@media (max-width: 1199px) {
  .nav-links, .nav-cta-desktop { display: none; }
  .menu-toggle { display: flex; }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding: 16px 0 24px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

/* ---------- Hero ---------- */
.hero { padding: 88px 0 80px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 600;
}

.hero-name-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.hero-name-row .hero-name { margin-bottom: 0; }
.badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.hero-name {
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 18px;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
@media (max-width: 520px) { .hero-stats { grid-template-columns: 1fr; gap: 16px; } }
.hero-stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
}
.hero-stat-label { font-size: 13.5px; margin-top: 2px; max-width: 260px; }

.hero-visual {
  position: relative;
  align-self: stretch;
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
  background: transparent;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  /* soft fade at the crop edges so the cut-out doesn't look harsh */
  -webkit-mask-image: radial-gradient(ellipse 88% 90% at 50% 42%, #000 62%, transparent 99%);
  mask-image: radial-gradient(ellipse 88% 90% at 50% 42%, #000 62%, transparent 99%);
}
@media (max-width: 900px) {
  .hero-visual { aspect-ratio: 1; max-width: 400px; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid h2 { margin-bottom: 20px; }
.about-grid p + p { margin-top: 16px; }

.fact-list { display: flex; flex-direction: column; gap: 20px; }
/* on desktop, align the first card with the section heading (below the eyebrow) */
@media (min-width: 861px) { .about-grid .fact-list { padding-top: 33px; } }
.fact-item {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}
.fact-label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 6px;
}
.fact-value { font-size: 15px; color: var(--text); font-weight: 500; }

/* ---------- Experience timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  position: relative;
  padding: 0 0 40px 32px;
  border-left: 2px solid var(--border);
}
.timeline-item:last-child { padding-bottom: 4px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px; top: 2px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.timeline-period {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.timeline-role { font-size: 19px; margin-top: 6px; overflow-wrap: break-word; hyphens: auto; }
.timeline-org { font-size: 14.5px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }
.timeline-list { margin: 14px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.timeline-list li { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }
.timeline-list li::marker { color: var(--accent); }

/* ---------- Skills ---------- */
.skills-groups { display: flex; flex-direction: column; gap: 28px; }
.skill-group-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.skill-note {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 14px;
  margin-top: 8px;
}

/* ---------- Services ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1024px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.service-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.service-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 16.5px; margin-bottom: 8px; overflow-wrap: break-word; hyphens: auto; }
.service-card p { font-size: 14.5px; }

/* ---------- Case studies ---------- */
.case-list-wrap { position: relative; }
.case-list-wrap.collapsed { overflow: hidden; transition: max-height 0.3s ease; }
.case-list { display: flex; flex-direction: column; gap: 18px; }
.case-card--teaser {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}
.case-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent 0%, var(--section-bg, var(--bg)) 78%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.case-list-wrap.collapsed .case-fade { opacity: 1; }
.case-show-more {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: none;
  white-space: nowrap;
}
.case-list-wrap.collapsed .case-show-more { display: inline-flex; }
.case-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}
@media (max-width: 760px) { .case-card { grid-template-columns: 1fr; gap: 12px; } }
.case-tag {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.case-card h3 {
  font-size: 19px;
  margin-top: 8px;
  overflow-wrap: break-word;
  hyphens: auto;
}
.case-body { display: flex; flex-direction: column; gap: 8px; }
.case-body p { font-size: 14.5px; }
.case-body strong { color: var(--text); }

/* ---------- Education & Languages ---------- */
.edu-lang-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}
@media (max-width: 860px) { .edu-lang-grid { grid-template-columns: 1fr; } }
.edu-item {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  margin-bottom: 14px;
}
.edu-degree { font-size: 15.5px; font-weight: 700; color: var(--text); }
.edu-school { font-size: 13.5px; margin-top: 4px; }
.edu-years { font-size: 12.5px; color: var(--accent); font-weight: 700; margin-top: 4px; }
.edu-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.edu-download svg { width: 15px; height: 15px; }
.edu-download:hover { color: var(--accent-dark); text-decoration: underline; }

.lang-list { display: flex; flex-direction: column; gap: 10px; }
.lang-row {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}
.lang-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lang-row--stacked .edu-download { margin-top: 10px; }
.lang-name { font-size: 14.5px; font-weight: 700; }
.lang-level { font-size: 13px; color: var(--text-muted); text-align: right; max-width: 60%; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field label.req::after { content: " *"; color: #D92929; font-weight: 700; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-note { font-size: 12.5px; margin-top: 12px; }

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-label a { color: var(--accent); font-weight: 600; }
.consent-label a:hover { text-decoration: underline; }

.contact-direct {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  background: var(--bg-elevated);
  height: fit-content;
}
.contact-direct h3 { font-size: 15px; margin-bottom: 18px; }
.contact-link-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  font-weight: 600;
}
.contact-link .icon-circle {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-link .icon-circle svg { width: 16px; height: 16px; }
.availability-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
}
.availability-note::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-tagline { font-size: 13.5px; margin-top: 4px; }
.footer-links { display: flex; gap: 20px; list-style: none; padding: 0; margin: 0; }
.footer-links a { font-size: 13.5px; font-weight: 600; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* ---------- Legal pages ---------- */
.legal-page { padding: 64px 0 96px; }
.legal-page .container { max-width: 760px; }
.legal-page h1 { font-size: 30px; margin-bottom: 8px; }
.legal-page .back-link { display: inline-flex; margin-bottom: 24px; font-size: 14px; font-weight: 600; color: var(--accent); }
.legal-page h2 { font-size: 21px; margin: 40px 0 12px; }
.legal-page h3 { font-size: 16.5px; margin: 26px 0 8px; }
.legal-page p, .legal-page li { color: var(--text-muted); font-size: 15px; margin-bottom: 8px; }
.legal-page ul { padding-left: 20px; margin: 8px 0; }
.legal-page .legal-updated { font-size: 13px; margin-bottom: 24px; }
/* Art. 21 GDPR requires the right to object to be highlighted separately */
.legal-page .legal-emphasis { font-weight: 600; color: var(--text); }
.legal-placeholder {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
