:root {
  /* Szín hierarchia */
  --accent-primary: #155eef;   /* Csak CTA gombokra és hero state-re */
  --accent-secondary: #8b95a1; /* Time badges, hints */
  --accent-tertiary: #e5e7eb;  /* Borders, subtle */

  --text-primary: #111827;     /* H1-H3 */
  --text-secondary: #6b7280;   /* Body text */
  --text-tertiary: #9ca3af;    /* Captions */
}

/* ===== Flat background ===== */
body {
  background-color: #f7f8fa;
}

.dark body {
  background-color: #14171a;
}

.glass-card {
  overflow: hidden;
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.dark .glass-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* ===== Section title with signature blue underline on the first word ===== */
.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-title-underline {
  position: relative;
  padding-bottom: 0.55rem;
}

.section-title-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.25rem;
  height: 4px;
  border-radius: 1px;
  background-color: var(--accent-primary);
}

/* ===== Timeline (Education / Experience) ===== */
.timeline {
  position: relative;
  border-left: 1px solid theme("colors.surface.light-border");
}

.dark .timeline {
  border-left-color: theme("colors.surface.dark-border");
}

.timeline-item {
  position: relative;
  padding: 0 0 3.25rem 1.75rem;
}

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

/* Multiple roles at one employer, nested under a shared company heading */
.timeline-roles {
  position: relative;
  margin-left: 0.25rem;
  padding-left: 1.25rem;
  border-left: 2px solid rgba(21, 94, 239, 0.25);
}

.timeline-role {
  position: relative;
  padding-bottom: 2.75rem;
}

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

/* Year badge styled like a log/timestamp readout, not a generic pill */
.timeline-year {
  display: inline-flex;
  align-items: center;
  position: relative;
  border: 1px solid var(--accent-secondary);
  color: var(--accent-secondary);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.75rem;
  border-radius: 3px;
  white-space: nowrap;
}

.timeline-year::before,
.timeline-year::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-color: var(--accent-secondary);
}

.timeline-year::before {
  top: -2px;
  left: -2px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.timeline-year::after {
  bottom: -2px;
  right: -2px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

/* ===== Side-branch callout (parallel activity, e.g. freelance work run
   alongside the main job — a dashed note set apart from the timelines) ===== */
.timeline-branch-box {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem 1.5rem;
  border: 1px dashed var(--accent-secondary);
  border-radius: 0.5rem;
  background: rgba(139, 149, 161, 0.05);
}

.dark .timeline-branch-box {
  background: rgba(139, 149, 161, 0.08);
}

.timeline-branch-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

/* ===== Language proficiency (separate from the timeline, plain label not a badge) ===== */
.lang-level {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--accent-secondary);
}

/* ===== Theme toggle switch ===== */
.theme-toggle,
.lang-toggle {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 60px;
  height: 32px;
  border-radius: 9999px;
  background-color: #e6e8eb;
  border: 1px solid #d8dade;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.dark .theme-toggle-track {
  background-color: #262b30;
  border-color: #323941;
}

.theme-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background-color: #155eef;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}

.dark .theme-toggle-knob {
  transform: translateX(28px);
}

.theme-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.theme-icon-sun {
  left: 7px;
  color: #f5b400;
}

.theme-icon-moon {
  right: 7px;
  color: #9ca3af;
}

/* ===== Language toggle switch ===== */
.lang-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 66px;
  height: 32px;
  border-radius: 9999px;
  background-color: #e6e8eb;
  border: 1px solid #d8dade;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.dark .lang-toggle-track {
  background-color: #262b30;
  border-color: #323941;
}

.lang-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 31px;
  height: 26px;
  border-radius: 9999px;
  background-color: #155eef;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}

html[lang="en"] .lang-toggle-knob {
  transform: translateX(29px);
}

.lang-toggle-label {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #9ca3af;
  pointer-events: none;
  transition: color 0.25s ease;
}

.dark .lang-toggle-label {
  color: #6b7280;
}

html[lang="hu"] .lang-toggle-label-hu,
html[lang="en"] .lang-toggle-label-en {
  color: #fff;
}

/* ===== Project cards — system/technology pill tags ===== */
.system-tag {
  display: inline-flex;
  align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  border: 1px solid rgba(139, 149, 161, 0.35);
  color: #8b95a1;
  background: rgba(139, 149, 161, 0.06);
}

.dark .system-tag {
  border-color: rgba(139, 149, 161, 0.4);
  background: rgba(139, 149, 161, 0.1);
}

/* ===== Mermaid diagram (What I Do) ===== */
.mermaid {
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.dark .mermaid {
  filter: brightness(0.95);
}

/* ===== Contact spec plate (compact datasheet under the hero portrait) ===== */
.spec-plate {
  position: relative;
}

.spec-plate::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #155eef;
}

.spec-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b95a1;
  width: 4.25rem;
}

/* ===== Skills marquee (auto-scrolling logo strip) =====
   Edge-to-edge fade mask + an infinite translateX loop over a doubled item
   list; hovering (or focusing a card, for keyboard users) pauses the scroll
   so the logos can actually be read. ===== */
.skills-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6rem, black calc(100% - 6rem), transparent);
  mask-image: linear-gradient(to right, transparent, black 6rem, black calc(100% - 6rem), transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 1.25rem;
  padding: 0 1.5rem;
  animation: marquee-scroll 90s linear infinite;
}

.skills-marquee:hover .marquee-track,
.marquee-track:has(:focus-visible) {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex: 0 0 auto;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--accent-tertiary);
  background: rgba(139, 149, 161, 0.05);
}

.dark .skill-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(139, 149, 161, 0.06);
}

.skill-card-logo {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
}

/* Black & white by default — the logo only reveals its brand color when
   the card is hovered, a quieter/more premium resting state than a wall
   of colored logos. */
.skill-card-logo svg {
  filter: grayscale(1) opacity(0.7);
  transition: filter 0.35s ease;
}

.skill-card:hover .skill-card-logo svg,
.skill-card:focus-visible .skill-card-logo svg {
  filter: grayscale(0) opacity(1);
}

@media (prefers-reduced-motion: reduce) {
  .skill-card-logo svg {
    transition: none;
  }
}

.skill-card-level {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

/* ===== Misc ===== */
html {
  scroll-padding-top: 5.5rem;
}

::selection {
  background-color: #155eef;
  color: #ffffff;
}
