:root {
  --bg: #ffffff;
  --text: #111111;
  --text-secondary: #555555;
  --border: #e4e4e4;
  --border-light: #efefef;
  --muted: #c8c8c8;
  --surface: #f0f5ff;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 760px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: #fafafa;
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

/* ── Background decorative SVG layer ── */
#bg-deco {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

#bg-deco svg {
  width: 100%;
  height: 100%;
}

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}

.logo {
  height: 34px;
  width: auto;
  flex-shrink: 0;
}

.brand-name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.015em;
}

nav {
  display: flex;
  gap: 1.75rem;
}

nav a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

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

.hero-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.25rem;
}

.hero-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hero-link:hover {
  color: var(--text);
}

/* ── Page content column with vertical decorative borders ── */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

/* ── Section dividers ── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Sections ── */
.section {
  padding: 3.75rem 2.5rem;
}

/* ── Hero ── */
.hero {
  padding: 4.5rem 2rem 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--accent);
}

.hero-caption {
  font-size: 0.95rem;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

/* ── Section headings ── */
.section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.section h2::before {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  background: var(--accent);
  opacity: 0.55;
  transform: rotate(45deg);
}

.section p {
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}

.section p:last-child {
  margin-bottom: 0;
}

/* ── Intro ── */
.intro-lead {
  font-size: 1rem !important;
  color: var(--text) !important;
  margin-bottom: 1.6rem !important;
  line-height: 1.75;
}

.focus-intro {
  margin-bottom: 0.75rem !important;
}

.focus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.focus-list li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding-left: 1.5rem;
  position: relative;
}

.focus-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 400;
}

.focus-list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.focus-list a:hover {
  color: var(--accent);
  border-bottom-color: rgba(37, 99, 235, 0.35);
}

/* ── Prose links ── */
p a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.3);
  transition: border-color 0.15s ease;
}

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

/* ── Inline highlight ── */
.hl {
  color: var(--accent);
  border-radius: 3px;
  transition: background 0.15s ease;
}

.hl:hover {
  background: var(--accent-soft);
}

/* ── Bio / Timeline ── */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-top: 0.5rem;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #222;
  opacity: 0.12;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.25rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-2rem - 3px);
  top: 0.52rem;
  width: 7px;
  height: 7px;
  background: var(--bg);
  border: 1.5px solid var(--accent);
  opacity: 0.55;
  transform: rotate(45deg);
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 280px;
  margin-bottom: 0.55rem;
  mix-blend-mode: multiply;
}

.logo-silvester {
  height: 60px;
}

.timeline-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.timeline-content p {
  margin-bottom: 0.6rem;
}

.project-list {
  list-style: none;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.project-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: 1.1rem;
  position: relative;
}

.project-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* ── Consulting ── */
.consulting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.consulting-card {
  position: relative;
  padding: 1.1rem 1.1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.consulting-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08), inset 0 0 24px rgba(37, 99, 235, 0.03);
}

/* Corner bracket — top left */
.consulting-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 10px; height: 10px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

/* Corner bracket — bottom right */
.consulting-card::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.consulting-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.consulting-card p {
  font-size: 0.82rem !important;
  line-height: 1.6;
  margin-bottom: 0 !important;
  color: var(--text-secondary);
}

/* ── Consulting CTA ── */
@keyframes status-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0); }
}

.consulting-cta {
  margin-top: 1.5rem;
  padding: 1.1rem 1.4rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.consulting-cta-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.consulting-cta-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: status-pulse 2.4s ease-in-out infinite;
}

.status-label {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4ade80;
}

.consulting-cta-headline {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
}

.consulting-cta-sub {
  font-size: 0.75rem;
  color: #64748b;
}

.cta-button {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: transparent;
  color: #60a5fa;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #1d4ed8;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.cta-button:hover {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cta-button-secondary {
  color: #94a3b8;
  border-color: #334155;
}

.cta-button-secondary:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}

@media (max-width: 640px) {
  .consulting-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Projects ── */
.projects-list {
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
  gap: 0.75rem;
}

.project-card {
  position: relative;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08), inset 0 0 24px rgba(37, 99, 235, 0.03);
}

.project-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 10px; height: 10px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.project-card::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.project-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.project-card p {
  font-size: 0.83rem !important;
  margin-bottom: 0 !important;
  line-height: 1.6;
}

.badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 100px;
  padding: 0.3rem 0.75rem;
  white-space: nowrap;
  margin-top: 0.1rem;
}

/* ── Footnotes ── */
body {
  counter-reset: fn-counter;
}

.footnotes {
  padding: 1.5rem 2.5rem;
}

.footnotes ol {
  list-style: none;
  counter-reset: footnote;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footnotes li {
  counter-increment: footnote;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 1.5rem;
  position: relative;
}

.footnotes li::before {
  content: counter(footnote);
  position: absolute;
  left: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.7;
  top: 0.1em;
}

.fn-ref {
  counter-increment: fn-counter;
}

.fn-ref a {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
  opacity: 0.8;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35) !important;
  transition: opacity 0.15s ease, background 0.15s ease;
  border-radius: 2px;
  padding: 0 1px;
}

.fn-ref a::before {
  content: counter(fn-counter);
}

.fn-ref a:hover {
  opacity: 1;
  background: var(--accent-soft);
}

.fn-back {
  margin-left: 0.4rem;
  color: var(--muted) !important;
  border-bottom: none !important;
  text-decoration: none;
  transition: color 0.15s ease;
}

.fn-back:hover {
  color: var(--accent) !important;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.9rem;
  }

  .section {
    padding: 3rem 1.5rem;
  }

  .consulting-grid {
    grid-template-columns: 1fr;
  }

  nav {
    display: none;
  }

  .header-inner {
    padding: 0.9rem 1.25rem;
  }
}
