:root {
  --ink: #142033;
  --muted: #5e6878;
  --navy: #132f4c;
  --blue: #1f6d8f;
  --blue-light: #e8f2f5;
  --line: #dbe2e8;
  --paper: #ffffff;
  --canvas: #eef2f5;
  --accent: #e87532;
  --heading-font: "Questrial", sans-serif;
  --nav-font: "Noto Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Manrope", Arial, sans-serif;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

.ats-document {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==============================================================
   CV TOP TOOLBAR & NAVBAR
   ============================================================== */
.cv-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(20, 32, 51, 0.08);
  box-shadow: 0 4px 20px rgba(19, 47, 76, 0.04);
}

.cv-toolbar-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toolbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toolbar-brand:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.toolbar-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.toolbar-brand .sitename {
  font-family: var(--heading-font), "Questrial", sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language Switcher - Match Main Website Signature Pill */
.cv-toolbar .lang-switch {
  display: inline-flex;
  align-items: center;
  height: 38px;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--accent), transparent 93%);
  border: 1.5px solid color-mix(in srgb, var(--accent), transparent 75%);
  border-radius: 50px;
  padding: 3px;
  gap: 3px;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.cv-toolbar .lang-switch:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--accent), transparent 80%);
}

.cv-toolbar .lang-btn {
  border: none;
  background: transparent;
  color: var(--navy);
  padding: 6px 14px;
  border-radius: 50px;
  font-family: var(--nav-font), sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.75;
}

.cv-toolbar .lang-btn:hover {
  opacity: 1;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 90%);
}

.cv-toolbar .lang-btn.active {
  opacity: 1;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent), #000 12%));
  color: #ffffff;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent), transparent 55%);
  transform: scale(1.02);
}

/* Smooth i18n transition */
.i18n-transitioning [data-i18n] {
  opacity: 0.4;
  transition: opacity 0.08s ease-in-out;
}

/* Action Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 50px;
  font-family: var(--nav-font), sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}

.button i {
  font-size: 14px;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s ease;
}

.button-secondary {
  color: var(--navy);
  background: color-mix(in srgb, var(--navy), transparent 93%);
  border: 1.5px solid color-mix(in srgb, var(--navy), transparent 75%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.button-secondary:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy), #0b1e32);
  border-color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(19, 47, 76, 0.25);
}

.button-secondary:hover i {
  transform: translateX(-3px);
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy), #0b1e32);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 3px 12px rgba(19, 47, 76, 0.25);
}

.button-primary:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #1f4268, #0f2742);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(19, 47, 76, 0.35);
}

.button-primary:hover i {
  transform: translateY(2px);
}

.cv-page {
  width: min(1120px, calc(100% - 40px));
  margin: 42px auto 70px;
  background: var(--paper);
  box-shadow: 0 22px 70px rgba(25, 43, 61, .12);
}

.cv-header {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 60px;
  padding: 62px 66px 54px;
  color: white;
  background: var(--navy);
}

.eyebrow {
  margin: 0 0 12px;
  color: #8dc5d7;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .2em;
}

.cv-header h1 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.7rem, 5vw, 4.25rem);
  line-height: .98;
  letter-spacing: -.04em;
}

.headline {
  margin: 22px 0 0;
  color: #dfeaf0;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.5;
}

.contact {
  align-self: center;
  padding-left: 30px;
  border-left: 1px solid rgba(255, 255, 255, .22);
  font-size: .82rem;
}

.contact p {
  margin: 0 0 7px;
}

.contact a {
  color: #eef7fa;
}

.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(240px, .85fr);
}

.cv-main {
  padding: 54px 58px 58px 66px;
}

.cv-sidebar {
  padding: 54px 40px;
  background: #f4f7f9;
  border-left: 1px solid var(--line);
}

.cv-section + .cv-section {
  margin-top: 44px;
}

.cv-section > h2,
.sidebar-section > h2 {
  margin: 0;
  color: var(--navy);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.cv-section > h2 {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}

.cv-section > h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.summary-section p {
  margin: 0;
  color: #344255;
  font-size: .94rem;
  line-height: 1.75;
}

.experience {
  position: relative;
  padding: 0 0 25px 20px;
  border-left: 1px solid #b8cbd5;
  break-inside: avoid;
}

.experience:last-child {
  padding-bottom: 0;
}

.experience::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px white;
}

.experience-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.experience h3,
.project h3,
.education h3 {
  margin: 0;
  color: var(--ink);
  font-size: .97rem;
  line-height: 1.35;
}

.company {
  margin: 3px 0 0;
  color: var(--blue);
  font-size: .81rem;
  font-weight: 700;
}

.date {
  flex: 0 0 auto;
  margin: 1px 0 0;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.experience > p,
.experience li,
.project p,
.sidebar-section p,
.sidebar-section li {
  color: #4a5666;
  font-size: .79rem;
}

.experience > p {
  margin: 0;
}

.experience ul {
  margin: 7px 0 0;
  padding-left: 17px;
}

.experience li + li {
  margin-top: 4px;
}

.projects-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 28px;
}

.projects-section > h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.project {
  padding-top: 14px;
  border-top: 2px solid var(--blue-light);
  break-inside: avoid;
}

.project-type {
  margin: 4px 0 7px !important;
  color: var(--blue) !important;
  font-size: .66rem !important;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.project p:last-child {
  margin: 0;
}

.sidebar-section + .sidebar-section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.sidebar-section > h2 {
  margin-bottom: 15px;
}

.keyword-list,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.keyword-list li {
  padding: 5px 8px;
  color: #25465d;
  background: #e4eff3;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 700;
}

.plain-list li {
  position: relative;
  padding: 5px 0 5px 14px;
}

.plain-list li::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.education .degree {
  margin: 5px 0 2px;
  color: var(--blue);
  font-weight: 700;
}

.education p {
  margin: 3px 0;
}

.cv-footer {
  display: flex;
  justify-content: space-between;
  padding: 18px 66px;
  color: #657384;
  background: #eef3f6;
  border-top: 1px solid var(--line);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .04em;
}

@media (max-width: 780px) {
  .cv-toolbar-container {
    padding: 10px 14px;
    gap: 8px;
  }

  .toolbar-brand {
    gap: 7px;
  }

  .toolbar-brand img {
    width: 28px;
    height: 28px;
  }

  .toolbar-brand .sitename {
    font-size: 1.15rem;
  }

  .toolbar-actions {
    gap: 6px;
  }

  .cv-toolbar .lang-switch {
    height: 34px;
    padding: 2px;
    gap: 2px;
  }

  .cv-toolbar .lang-btn {
    padding: 4px 9px;
    font-size: 12px;
    min-height: 26px;
  }

  .button {
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 12.5px;
    gap: 5px;
  }

  .button-secondary span {
    display: none;
  }

  .button-secondary {
    padding: 0 10px;
    min-width: 34px;
  }

  .button-secondary i {
    font-size: 15px;
    margin: 0;
  }

  .button-primary {
    padding: 0 12px;
    font-size: 12px;
  }

  .cv-page {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .cv-header,
  .cv-layout {
    grid-template-columns: 1fr;
  }

  .cv-header {
    gap: 34px;
    padding: 48px 26px 40px;
  }

  .contact {
    padding: 0;
    border: 0;
  }

  .cv-main,
  .cv-sidebar {
    padding: 40px 26px;
  }

  .cv-sidebar {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .experience-heading,
  .cv-footer {
    display: block;
  }

  .experience-heading .date {
    margin-top: 4px;
  }

  .projects-section {
    grid-template-columns: 1fr;
  }

  .cv-footer span {
    display: block;
  }
}

@page {
  size: A4;
  margin: 12mm 14mm 17mm;

  @bottom-left {
    content: "Mustafa Arslan | mustafaarslan.net.tr";
    color: #68798a;
    font-family: Arial, sans-serif;
    font-size: 8pt;
  }

  @bottom-right {
    content: "Sayfa " counter(page) " / " counter(pages);
    color: #68798a;
    font-family: Arial, sans-serif;
    font-size: 8pt;
  }
}

@media print {
  html {
    font-size: 13px;
  }

  body {
    background: white;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .cv-toolbar {
    display: none !important;
  }

  .cv-page {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .cv-header {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 8mm;
    padding: 8mm 9mm 7mm;
  }

  .contact {
    padding-left: 6mm;
    border-left: 1px solid rgba(255, 255, 255, .22);
  }

  .cv-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.15fr) minmax(51mm, .85fr);
  }

  .cv-main {
    padding: 7mm 6mm 7mm 9mm;
  }

  .cv-sidebar {
    padding: 7mm 6mm;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .cv-footer {
    display: flex;
    padding: 3mm 9mm;
  }

  .experience-heading {
    display: flex;
  }

  .projects-section {
    grid-template-columns: 1fr 1fr;
    break-before: page;
  }

  .sidebar-section {
    break-inside: avoid;
  }

  .cv-section + .cv-section {
    margin-top: 5mm;
  }

  .experience {
    padding-bottom: 3mm;
  }

  .sidebar-section + .sidebar-section {
    margin-top: 4mm;
    padding-top: 4mm;
  }

  .summary-section p {
    line-height: 1.62;
  }

  .projects-section {
    gap: 7mm 6mm;
  }

  .project {
    padding: 4mm 0 3mm;
  }

  .button,
  a {
    box-shadow: none !important;
  }

  .cv-page {
    display: none !important;
  }

  .ats-document {
    display: block;
    color: #1a2636;
    background: #ffffff;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 10pt;
    line-height: 1.4;
  }

  .ats-header {
    padding: 0 0 5mm;
    border-bottom: 2px solid #286f91;
  }

  .ats-header h1 {
    margin: 0;
    color: #153654;
    font-size: 28pt;
    line-height: 1.1;
  }

  .ats-role {
    margin: 1.5mm 0 2mm;
    color: #33495f;
    font-size: 11.5pt;
    font-weight: 700;
  }

  .ats-contact {
    display: block;
  }

  .ats-contact p {
    display: inline;
    margin: 0;
    color: #3d4d5e;
    font-size: 8.5pt;
  }

  .ats-contact p:not(:last-child)::after {
    content: " | ";
    color: #8a99a6;
  }

  .ats-section {
    margin-top: 4.5mm;
  }

  .ats-section h2 {
    margin: 0 0 2.5mm;
    padding: 1.8mm 2.5mm;
    color: #153654;
    background: #eef3f6;
    border-left: 3px solid #286f91;
    font-size: 11.5pt;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .ats-section > p {
    margin: 0;
  }

  .ats-skill-list,
  .ats-entry ul {
    margin: 0;
    padding-left: 5mm;
  }

  .ats-skill-list {
    columns: 1;
  }

  .ats-skill-list li,
  .ats-entry li {
    margin: 0 0 1mm;
    padding-left: 1mm;
  }

  .ats-entry {
    margin-bottom: 3mm;
    break-inside: avoid;
  }

  .ats-entry h3 {
    margin: 0;
    color: #17263a;
    font-size: 11pt;
    font-weight: 700;
    line-height: 1.3;
  }

  .ats-entry-meta {
    margin: .6mm 0 1.2mm;
    color: #3f5368;
    font-size: 9pt;
  }

  .ats-entry-meta strong {
    color: #216b8b;
  }

  .ats-page-break {
    break-before: page;
  }

}
