/* Viktoria Guncheva — a quiet, bilingual professional profile. */
:root {
  color-scheme: light;
  --ivory: #f4f0e6;
  --brown: #45302a;
  --background: var(--ivory);
  --foreground: var(--brown);
  --ink: var(--foreground);
  --ink-muted: #78675d;
  --line: rgba(69, 48, 42, 0.2);
  --header-background: rgba(244, 240, 230, 0.96);
  --surface: #e9e1d3;
  --tap-highlight: rgba(69, 48, 42, 0.12);
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: clamp(1.5rem, 4.5vw, 4rem);
  --maxw: 1440px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --background: var(--brown);
  --foreground: var(--ivory);
  --ink-muted: #c5b9ac;
  --line: rgba(244, 240, 230, 0.24);
  --header-background: rgba(69, 48, 42, 0.96);
  --surface: #523b33;
  --tap-highlight: rgba(244, 240, 230, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
  scrollbar-color: var(--foreground) var(--background);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.3em;
}

button {
  color: inherit;
  font: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: var(--tap-highlight);
}

::selection {
  background: var(--foreground);
  color: var(--background);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: var(--pad);
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--foreground);
  color: var(--background);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  color: var(--ink-muted);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.icon {
  display: block;
  flex: none;
  width: 1.0625rem;
  height: 1.0625rem;
}

/* Alpha masks let the same marks follow either foreground color. */
.monogram {
  display: block;
  flex: none;
  aspect-ratio: 1354 / 1161;
  background-color: currentColor;
  -webkit-mask: url("../img/vg-monogram.png") center / contain no-repeat;
  mask: url("../img/vg-monogram.png") center / contain no-repeat;
}

.organization-logo {
  display: block;
  width: 7.5rem;
  height: 3rem;
  color: var(--foreground);
}

.organization-logo[style*="--logo"] {
  background-color: currentColor;
  -webkit-mask: var(--logo) left center / contain no-repeat;
  mask: var(--logo) left center / contain no-repeat;
}

/* Understated navigation, with full language names and a theme switch. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-background);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 6rem;
  padding-block: 0.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.wordmark__logo {
  width: 6rem;
}

.nav {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
  margin-left: auto;
}

.nav-links {
  display: flex;
  flex: none;
  align-items: center;
  gap: clamp(1rem, 1.75vw, 1.75rem);
}

.nav-links > a {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  color: var(--ink-muted);
  transition: color 180ms ease;
}

.nav-links > a,
.lang button,
.nav-toggle {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Reserve each translated label's space so the header never shifts. */
.nav-links > a:nth-child(1) {
  width: 5.5rem;
}

.nav-links > a:nth-child(2) {
  width: 7.5rem;
}

.nav-links > a:nth-child(3) {
  width: 8.5rem;
}

.nav-links > a:nth-child(4) {
  width: 6rem;
}

.nav-links > a:hover,
.nav-links > a[aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.5rem;
}

.lang,
.nav-toggle,
.theme-toggle {
  display: none;
}

.js .lang {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 0 0 6.5rem;
  width: 6.5rem;
}

.lang button {
  width: 100%;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  text-align: center;
}

.lang button:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.45em;
  text-decoration-thickness: 1px;
}

.js .theme-toggle {
  display: inline-flex;
}

.theme-toggle,
.nav-toggle {
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 0;
  background: transparent;
}

.theme-toggle {
  width: 2.75rem;
}

.theme-toggle:hover {
  color: var(--ink-muted);
}

.theme-icon {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

.organization-logo--iso {
  height: 3.75rem;
}

.theme-icon--sun,
html[data-theme="dark"] .theme-icon--moon {
  display: none;
}

html[data-theme="dark"] .theme-icon--sun {
  display: block;
}

.nav-toggle {
  width: 2.75rem;
}

.nav-toggle svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

/* Portrait and introduction, without ornament. */
.hero {
  padding-block: clamp(2.75rem, 5.5vw, 5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 7.5rem);
  align-items: center;
}

.hero__figure {
  width: 100%;
  max-width: 400px;
  justify-self: center;
}

.hero__figure img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface);
}

.hero__copy {
  max-width: 35rem;
}

.hero__name {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.23em;
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 3.8vw, 3.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.hero__name > span {
  display: block;
}

.hero__copy > p {
  max-width: 52ch;
  margin-top: 1.125rem;
  color: var(--ink-muted);
  line-height: 1.9;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 500;
}

.text-link:hover {
  text-decoration: underline;
}

/* Consistent organization and qualification rows. */
.section {
  position: relative;
  padding-block: clamp(2.75rem, 4.5vw, 4.25rem);
  scroll-margin-top: 0.75rem;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: var(--line);
}

.section-heading {
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.experience-item,
.education-item,
.certification {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.experience-item:first-child,
.education-item:first-child,
.certification:first-child {
  padding-top: 0;
}

.experience-item:last-child,
.education-item:last-child,
.certification:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.experience-company,
.certification__body h3,
.education__body h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.45;
}

.role__title,
.certification__issuer,
.education__body p {
  margin-top: 0.375rem;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.8;
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skills-list li {
  font-size: 0.875rem;
  line-height: 1.8;
}

.additional-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  margin-top: 2.5rem;
}

.additional-grid > div {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.additional-grid h3 {
  margin-top: 0.625rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.5;
}

.additional-grid p:not(.eyebrow) {
  max-width: 58ch;
  margin-top: 0.375rem;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.contact {
  padding-block: clamp(2.75rem, 4.5vw, 4.25rem);
  scroll-margin-top: 0.75rem;
}

.contact > .shell {
  position: relative;
}

.contact > .shell::before {
  content: "";
  position: absolute;
  top: calc(clamp(2.75rem, 4.5vw, 4.25rem) * -1);
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: var(--line);
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 2.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.5;
}

.contact__email:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.contact__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin-top: 0.75rem;
}

.contact__socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-size: 0.75rem;
}

.contact__socials a:hover {
  text-decoration: underline;
}

/* A centered signature, inspired by the original site's large serif footer. */
.site-footer {
  --footer-muted: #c5b9ac;
  --footer-line: rgba(244, 240, 230, 0.24);
  padding-block: clamp(2rem, 4vw, 3.5rem) 2rem;
  background: var(--foreground);
  color: var(--background);
  text-align: center;
}

html[data-theme="dark"] .site-footer {
  --footer-muted: #78675d;
  --footer-line: rgba(69, 48, 42, 0.2);
}

.site-footer::selection,
.site-footer ::selection {
  background: var(--background);
  color: var(--foreground);
}

.site-footer__brand {
  display: inline-block;
  min-width: 2.75rem;
  min-height: 2.75rem;
  vertical-align: top;
}

.site-footer__logo {
  width: clamp(5.5rem, 10vw, 8rem);
  margin-inline: auto;
  margin-bottom: 0.75rem;
}

.site-footer__display {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 7vw, 6.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-footer__bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--footer-line);
  color: var(--footer-muted);
  font-size: 0.75rem;
  line-height: 1.8;
  text-align: left;
}

.site-footer__location,
.site-footer__copyright {
  margin: 0;
  font-size: inherit;
}

@media (max-width: 1000px) {
  html {
    scroll-padding-top: 6rem;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 0 1rem;
    min-height: 5rem;
    padding-block: 0.5rem;
  }

  .wordmark__logo {
    width: 5rem;
  }

  .js .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav {
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0;
    padding-block: 0.75rem 1rem;
    border-top: 1px solid var(--line);
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem 0.5rem;
    width: min(100%, 24rem);
  }

  .nav-links > a:nth-child(n) {
    width: 100%;
  }

  .header-actions {
    justify-content: center;
    margin-left: 0;
  }

  .js .nav {
    display: none;
  }

  .js .nav[data-open="true"] {
    display: flex;
  }

  .hero__grid {
    gap: 3rem;
  }

  .hero__name {
    font-size: 2.5rem;
  }

  .experience-item,
  .education-item,
  .certification {
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 2rem;
  }

  .additional-grid,
  .contact__grid {
    gap: 2rem;
  }
}

@media (max-width: 800px) {
  .hero__grid {
    gap: 2rem;
  }

  .hero__name {
    font-size: 2.125rem;
  }

  .hero__copy > p {
    font-size: 0.8125rem;
  }

  .skills-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-block: 2rem 2.75rem;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .hero__figure {
    max-width: 400px;
    justify-self: start;
  }

  .hero__copy {
    max-width: none;
  }

  .hero__name {
    font-size: clamp(2rem, 7.4vw, 2.75rem);
  }

  .hero__copy > p {
    font-size: 0.875rem;
  }

  .section-heading {
    margin-bottom: 1.5rem;
  }

  .organization-logo {
    width: 5.25rem;
    height: 2.625rem;
  }

  .experience-item,
  .education-item,
  .certification {
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: 1.5rem;
    padding-block: 1.375rem;
  }

  .experience-company,
  .certification__body h3,
  .education__body h3 {
    font-size: 1.125rem;
  }

  .additional-grid,
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  .skills-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .additional-grid {
    margin-top: 2rem;
  }

  .contact__email {
    font-size: clamp(1.125rem, 5.6vw, 1.5rem);
    gap: 0.625rem;
  }
}

@media (max-width: 450px) {
  .header-inner {
    gap: 0 0.5rem;
  }

  .experience-item,
  .education-item,
  .certification {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.875rem;
  }

  .organization-logo {
    width: 6rem;
    height: 2.375rem;
  }

  .organization-logo--empty {
    display: none;
  }

  html {
    scroll-padding-top: 6rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@page {
  margin: 16mm;
}

@media print {
  :root,
  html[data-theme="dark"] {
    color-scheme: light;
    --background: #fff;
    --foreground: var(--brown);
    --ink: var(--brown);
    --ink-muted: #65574f;
    --line: #c9c2b8;
    --surface: #e9e1d3;
    --pad: 0;
  }

  html {
    font-size: 11px;
    scroll-behavior: auto;
  }

  body {
    background: var(--background);
    color: var(--foreground);
    font-size: 10pt;
    line-height: 1.55;
  }

  .site-header,
  .skip-link,
  .site-footer,
  .contact__socials,
  .contact .icon {
    display: none !important;
  }

  .shell {
    max-width: none;
    padding-inline: 0;
  }

  .hero {
    padding-block: 0 2rem;
  }

  .hero__grid {
    grid-template-columns: 135px minmax(0, 1fr);
    gap: 2.5rem;
  }

  .hero__figure {
    width: 135px;
  }

  .hero__name {
    font-size: 27pt;
  }

  .hero__copy > p {
    max-width: none;
    font-size: 9pt;
  }

  .hero__copy > p {
    margin-top: 0.625rem;
  }

  .section,
  .contact {
    padding-block: 1.75rem;
  }

  .section-heading {
    margin-bottom: 1.25rem;
    break-after: avoid;
  }

  .section-title,
  .contact__title {
    font-size: 20pt;
  }

  .experience-item,
  .education-item,
  .certification {
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 2rem;
    padding-block: 1rem;
    break-inside: avoid;
  }

  .organization-logo {
    width: 6rem;
    height: 2.5rem;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .organization-logo--empty {
    display: block;
  }

  .experience-company,
  .certification__body h3,
  .education__body h3 {
    font-size: 12pt;
  }

  .skills-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 2rem;
  }

  .additional-grid,
  .contact__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
  }

  .additional-grid,
  .contact {
    break-inside: avoid;
  }

  .contact > .shell::before {
    top: -1.75rem;
  }

  .contact__email {
    font-size: 13pt;
  }
}
