:root {
  --ink: #14213d;
  --navy: #0a1630;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --paper: #ffffff;
  --ground: #edf2f7;
  --muted: #526177;
  --line: #d7deea;
  --soft-blue: #eaf1ff;
  --warm: #f6c85f;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ground); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: linear-gradient(135deg, #f5f7fb, #e9eef6); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; flex: 0 0 auto; }

.skip-link { position: fixed; z-index: 10; inset-block-start: .75rem; inset-inline-start: .75rem; padding: .7rem 1rem; color: #fff; background: var(--navy); border-radius: .5rem; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; }

.site-controls { width: min(100% - 2rem, 1080px); margin: 0 auto; padding: 1.25rem 0; }
.controls-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark, .control-actions, .language-switch, .print-button, .contact-item { display: inline-flex; align-items: center; }
.wordmark { gap: .6rem; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.wordmark-mark { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; color: #fff; background: var(--navy); border-radius: .45rem; font-size: .66rem; letter-spacing: .04em; }
.control-actions { gap: .65rem; }
.language-switch { padding: .2rem; background: #dfe6f1; border-radius: .6rem; }
.language-button, .print-button, .filter-button { min-height: 44px; border: 0; cursor: pointer; touch-action: manipulation; transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.language-button { padding: .45rem .75rem; color: var(--muted); background: transparent; border-radius: .42rem; font-size: .84rem; font-weight: 750; }
.language-button[aria-pressed="true"] { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(15, 35, 70, .14); }
.print-button { gap: .45rem; padding: .55rem .9rem; color: #fff; background: var(--blue); border-radius: .55rem; font-weight: 750; box-shadow: 0 .5rem 1.2rem rgba(37, 99, 235, .2); }
.print-button:hover { background: var(--blue-deep); transform: translateY(-1px); }

main { padding: .25rem 1rem 2.5rem; }
.cv-sheet { width: min(100%, 960px); margin: 0 auto; overflow: hidden; background: var(--paper); box-shadow: 0 1.1rem 3.8rem rgba(20, 33, 61, .12); }
.cv-header { display: flex; justify-content: space-between; gap: 2rem; padding: clamp(2rem, 6vw, 4rem); color: #fff; background: var(--navy); }
.identity { max-width: 40rem; }
.eyebrow { margin: 0 0 .7rem; color: #a9c1ff; font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .25rem; font-family: var(--serif); font-size: clamp(2.65rem, 6vw, 4.7rem); line-height: .95; letter-spacing: -.06em; }
.role { margin-bottom: 1rem; color: #f6c85f; font-size: 1.04rem; font-weight: 750; }
.profile-summary { max-width: 47ch; margin-bottom: 0; color: #d6e0f4; font-size: 1rem; }
.contact-list { display: grid; align-content: end; gap: .65rem; min-width: max-content; margin: 0; font-style: normal; }
.contact-item { gap: .45rem; color: #e4ebf8; font-size: .88rem; overflow-wrap: anywhere; }
.contact-email { text-decoration: none; }
.contact-email:hover { color: #fff; text-decoration: underline; }
.contact-email span { direction: ltr; unicode-bidi: plaintext; }

.content-grid { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.5fr); }
.sidebar { padding: clamp(1.7rem, 4vw, 3rem); background: #f3f6fb; }
.main-column { padding: clamp(1.7rem, 4vw, 3rem); }
.cv-section + .cv-section { margin-top: 2.5rem; }
.section-heading { display: flex; align-items: baseline; gap: .65rem; margin-bottom: 1.1rem; }
.section-index { color: var(--blue); font-size: .72rem; font-weight: 850; letter-spacing: .08em; }
h2 { margin-bottom: 0; font-size: 1.15rem; line-height: 1.1; letter-spacing: -.025em; }
h3 { margin-bottom: .2rem; font-size: .98rem; line-height: 1.25; }
.stack-list { display: grid; gap: 1.45rem; }
.education-entry .entry-period, .experience-entry .entry-period, .project-category { color: var(--blue); font-size: .73rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.education-entry .entry-place { margin-bottom: .28rem; color: var(--muted); font-size: .88rem; }
.education-entry .entry-detail { margin-bottom: 0; color: var(--muted); font-size: .82rem; }
.skill-list { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; list-style: none; }
.skill-list li { padding: .38rem .6rem; color: #263859; border: 1px solid #cbd6e8; border-radius: 99px; background: #fff; font-size: .8rem; font-weight: 700; }
.experience-list { display: grid; gap: 1.5rem; }
.experience-entry { padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.experience-entry:last-child { padding-bottom: 0; border: 0; }
.experience-heading { display: flex; justify-content: space-between; gap: 1rem; }
.experience-heading > div p { margin-bottom: 0; color: var(--muted); font-size: .88rem; }
.experience-entry ul { display: grid; gap: .35rem; padding-inline-start: 1.1rem; margin: .7rem 0 0; color: #40516a; font-size: .88rem; }
.experience-entry li::marker { color: var(--blue); }
.projects-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.project-filters { display: flex; flex-wrap: wrap; justify-content: end; gap: .35rem; }
.filter-button { min-height: 34px; padding: .25rem .5rem; color: var(--muted); background: transparent; border-bottom: 2px solid transparent; font-size: .75rem; font-weight: 800; }
.filter-button:hover { color: var(--ink); }
.filter-button.is-active { color: var(--blue); border-color: var(--blue); }
.project-status { margin: -.65rem 0 .8rem; color: var(--muted); font-size: .76rem; }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.project-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.project-visual { position: relative; height: 75px; overflow: hidden; color: #fff; background: var(--navy); }
.project-visual span { position: absolute; inset: .5rem auto auto .6rem; font-size: .65rem; font-weight: 850; letter-spacing: .08em; }
.project-visual i, .project-visual b { position: absolute; display: block; }
.visual-signal { background: #18478f; }
.visual-signal i { inset: 22px 16px -12px auto; width: 68px; background: #f6c85f; transform: rotate(-29deg); }
.visual-signal b { inset: 22px auto auto 23px; width: 25px; height: 25px; border: 5px solid #9de0d0; border-radius: 50%; }
.visual-atlas { background: #2563eb; }
.visual-atlas i { inset: 15px 23px auto auto; width: 54px; height: 54px; border: 1px solid rgba(255,255,255,.7); transform: rotate(45deg); }
.visual-atlas b { inset: auto 15px 10px auto; width: 46px; height: 8px; background: #f6c85f; }
.visual-path { background: #7c3b75; }
.visual-path i { inset: -13px -3px auto auto; width: 80px; height: 80px; border: 15px solid #f6c85f; border-radius: 50%; }
.visual-path b { inset: auto 0 13px 22px; width: 70px; height: 2px; background: #e0aff8; transform: rotate(-22deg); }
.project-copy { padding: .75rem; }
.project-category { margin-bottom: .3rem; font-size: .64rem; }
.project-copy h3 { font-size: .91rem; }
.project-summary { min-height: 4.3em; margin-bottom: .6rem; color: var(--muted); font-size: .76rem; }
.technology-list { display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin: 0; list-style: none; }
.technology-list li { padding: .18rem .34rem; color: #415371; background: var(--soft-blue); font-size: .65rem; font-weight: 700; }
.cv-footer { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem clamp(1.7rem, 4vw, 3rem); color: var(--muted); border-top: 1px solid var(--line); font-size: .74rem; }
.availability { color: var(--blue); font-weight: 750; }
.print-only { display: none; }

html[dir="rtl"] .contact-email span { direction: ltr; unicode-bidi: plaintext; }
html[dir="rtl"] .eyebrow, html[dir="rtl"] .education-entry .entry-period, html[dir="rtl"] .experience-entry .entry-period, html[dir="rtl"] .project-category { letter-spacing: 0; text-transform: none; }

@media (max-width: 720px) {
  .site-controls { width: min(100% - 1.2rem, 1080px); padding: .75rem 0; }
  .wordmark > span:last-child { display: none; }
  .control-actions { gap: .4rem; }
  .language-button { padding-inline: .55rem; }
  .print-button { padding-inline: .65rem; }
  .print-button span { font-size: .8rem; }
  main { padding-inline: .6rem; }
  .cv-header { flex-direction: column; gap: 1.7rem; }
  .contact-list { align-content: start; min-width: 0; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { padding-bottom: 2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { display: grid; grid-template-columns: 110px 1fr; }
  .project-visual { height: auto; min-height: 116px; }
  .project-summary { min-height: 0; }
  .cv-footer { flex-direction: column; }
}

@media (max-width: 430px) {
  .controls-inner { align-items: stretch; }
  .print-button { flex: 1; justify-content: center; }
  .projects-heading-row { align-items: start; flex-direction: column; }
  .project-filters { justify-content: start; }
  h1 { font-size: clamp(2.45rem, 14vw, 3.3rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  @page { size: A4 portrait; margin: 8mm; }
  :root { background: #fff; }
  body { min-width: 0; background: #fff; font-size: 9.5pt; line-height: 1.32; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print { display: none !important; }
  .print-only { display: block; margin: 0 0 3mm; color: #40516a; font-size: 8pt; text-align: center; }
  main { padding: 0; }
  .cv-sheet { width: 100%; margin: 0; box-shadow: none; }
  .cv-header { gap: 9mm; padding: 8mm 9mm; }
  h1 { font-size: 27pt; }
  .eyebrow { margin-bottom: 2mm; font-size: 7pt; }
  .role { margin-bottom: 2mm; font-size: 10pt; }
  .profile-summary { font-size: 9pt; }
  .contact-list { gap: 2mm; font-size: 8pt; }
  .content-grid { grid-template-columns: 31% 69%; }
  .sidebar, .main-column { padding: 6mm 7mm; }
  .cv-section + .cv-section { margin-top: 6mm; }
  .section-heading { margin-bottom: 3mm; }
  .section-index { font-size: 6.7pt; }
  h2 { font-size: 10pt; }
  h3 { font-size: 8.8pt; }
  .stack-list, .experience-list { gap: 4mm; }
  .education-entry .entry-place, .education-entry .entry-detail, .experience-heading > div p, .experience-entry ul { font-size: 7.7pt; }
  .skill-list { gap: 1.5mm; }
  .skill-list li { padding: 1mm 1.5mm; font-size: 7.4pt; }
  .experience-entry { padding-bottom: 4mm; }
  .experience-entry ul { gap: 1mm; margin-top: 2mm; }
  .projects-grid { grid-template-columns: repeat(3, 1fr); gap: 2.5mm; }
  .project-visual { height: 18mm; }
  .project-copy { padding: 2.5mm; }
  .project-summary { min-height: 0; margin-bottom: 2mm; font-size: 6.9pt; }
  .project-copy h3 { font-size: 8.1pt; }
  .technology-list li { font-size: 6pt; }
  .cv-footer { padding: 3mm 7mm; font-size: 6.8pt; }
  .cv-section, .project-card, .education-entry, .experience-entry { break-inside: avoid; }
}
