:root {
  --color-accent:     #aaff44;
  --color-muted:      #7abf50;
  --color-border:     #1e3a12;
  --color-text:       #c8f0a0;
  --color-bg:         #040d02;
  --color-bg-article: #091505;
}

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

body {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code",
               ui-monospace, "Courier New", monospace;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  margin-bottom: 2.5rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.subtitle {
  color: var(--color-muted);
  font-size: 1.1rem;
  margin-top: 0.25rem;
}

.about-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.ascii-portrait {
  color: #5a8a3a;
  font-size: 0.36rem;
  line-height: 1.15;
  flex-shrink: 0;
}

.about-text {
  flex: 1;
  min-width: 0;
}

@media (max-width: 600px) {
  .about-row {
    flex-direction: column;
  }

  .ascii-portrait {
    font-size: 0.32rem;
  }
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}

#competences h2 {
  border-bottom: none;
}

h2::before {
  content: "$ ";
  color: var(--color-accent);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.2rem;
}

section {
  margin-bottom: 2.5rem;
}

article {
  border-left: 3px solid var(--color-bg-article);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.15s ease;
}

article:hover {
  border-left-color: var(--color-accent);
}

p {
  margin-bottom: 0.75rem;
}

.period {
  color: var(--color-muted);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.period::before {
  content: "# ";
  color: var(--color-accent);
}

.bold {
  font-weight: 600;
}


ul.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
}

ul.highlights-list li {
  font-size: 0.92rem;
}

ul.tech-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 0.25rem 0.5rem;
  margin-top: 0.35rem;
  opacity: 0.65;
}

ul.tech-list li {
  font-size: 0.8rem;
}

ul.tech-list li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  opacity: 0.5;
}

ul.skill-list {
  list-style: none;
  margin-top: 0.5rem;
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 0.3rem;
}

.skill-group-header::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--color-border);
}

.skill-names span:not(:last-child)::after {
  content: " / ";
  color: var(--color-muted);
}

.skill-bar {
  display: inline-flex;
  letter-spacing: 0;
  margin-right: 0.75ch;
}

.bar-filled {
  color: var(--color-accent);
}

.bar-empty {
  color: var(--color-muted);
  opacity: 0.35;
}

.skill-tier {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-right: 0.75ch;
}

ul.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

ul.project-list li::before {
  content: "→ ";
  color: var(--color-accent);
}

ul.connect-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  body {
    padding: 1.25rem 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  ul.connect-list {
    flex-direction: column;
    gap: 0.4rem;
  }
}

/* Skip link — visually hidden until focused (NOT display:none — that removes from tab order) */
.skip-link {
  position: absolute;
  top: -9999px;
  left: -9999px;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background-color: var(--color-bg);
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  text-decoration: none;
  font-size: 1rem;
}
.skip-link:focus {
  top: 1rem;
  left: 1rem;
}

/* Focus indicators for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

@media print {
  @page {
    margin: 0;
  }

  :root {
    --color-accent:     #2d6e00;
    --color-muted:      #3d6a10;
    --color-border:     #1e3a12;
    --color-text:       #1a1a1a;
    --color-bg:         #ffffff;
    --color-bg-article: #2d6e00;
  }

  .ascii-portrait {
    display: none;
  }

  body {
    max-width: 100%;
    padding: 1.5cm;
  }

  .skip-link {
    display: none;
  }
}

/* Respect user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  article { transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
