:root {
  --bg: #F7F6F2;
  --surface: #F9F8F5;
  --border: #D4D1CA;
  --text: #28251D;
  --muted: #7A7974;
  --faint: #BAB9B4;
  --accent: #01696F;
  --accent-hover: #0C4E54;
}

[data-theme="dark"] {
  --bg: #171614;
  --surface: #1C1B19;
  --border: #393836;
  --text: #CDCCCA;
  --muted: #797876;
  --faint: #5A5957;
  --accent: #4F98A3;
  --accent-hover: #227F8B;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  padding: 32px 0 56px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

/* Visually hidden but accessible to screen readers and SEO */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
}

.avatar {
  display: block;
  width: 180px;
  height: 180px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
  display: block;
}

[data-theme="dark"] .avatar img {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}



.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 56px;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

[data-theme="dark"] .lang-btn.active {
  color: #171614;
}

.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--text);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-btn:hover {
  border-color: var(--accent);
}

.name {
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 6px;
}

.role {
  color: var(--accent);
  font-weight: 600;
  font-size: clamp(16px, 2vw, 19px);
  margin: 0 0 6px;
}

.subtitle {
  color: var(--muted);
  font-weight: 500;
  font-size: 16px;
  margin: 0 0 20px;
}

.contacts {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.8;
}

.contacts a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s;
}

.contacts a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.dot { color: var(--faint); margin: 0 6px; }

.actions {
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.15s;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

[data-theme="dark"] .btn.primary {
  color: #171614;
}

.btn.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn:not(.primary) {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn:not(.primary):hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Main */
main {
  padding-bottom: 64px;
}

section {
  margin-bottom: 48px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px;
}

h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.job {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.job:last-child {
  border-bottom: none;
}

.job header { margin-bottom: 8px; }

.meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.context {
  color: var(--text);
  font-size: 15px;
  margin: 0 0 12px;
  line-height: 1.55;
}

ul {
  padding-left: 18px;
  margin: 0 0 12px;
}

li {
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 6px;
  color: var(--text);
}

li::marker { color: var(--faint); }

.stack {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
  font-style: italic;
}

#about p {
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0 0 12px;
}

/* Skills */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.skill-group {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.skill-group p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

footer a:hover { color: var(--accent); border-color: var(--accent); }

/* Breadcrumbs */
.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 24px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before {
  content: "›";
  color: var(--muted);
  opacity: 0.6;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color 0.15s, border-color 0.15s;
}
.breadcrumbs a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.breadcrumbs [aria-current="page"] { color: var(--fg, inherit); }

/* Quick links */
.quicklinks {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.quicklinks h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 12px;
  padding: 0;
  border: none;
}
.quicklinks ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.quicklinks a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.quicklinks a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.service-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.service-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}
.service-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* Mobile */
@media (max-width: 720px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: left;
    justify-items: start;
  }
  .avatar { width: 120px; height: 120px; }
}

@media (max-width: 600px) {
  .hero { padding: 20px 0 40px; }
  .topbar { margin-bottom: 32px; }
  .contacts { font-size: 13px; }
  .dot { display: none; }
  .contacts a { display: inline-block; margin-right: 12px; }
}

/* Print */
@media print {
  .topbar, .actions, footer, .breadcrumbs, .quicklinks { display: none; }
  body { background: white; color: black; }
  .job, .service-card { page-break-inside: avoid; }
}
