:root {
  --bg: #0a0d12;
  --bg2: #10141b;
  --bg3: #161b24;
  --border: #1e2530;
  --border2: #2a323f;
  --accent: #ffb454;
  --accent-dim: #cc8f3f;
  --cyan: #5ec8d8;
  --text: #e6e9ef;
  --text2: #8a94a3;
  --text3: #4d5561;
  --red: #ff6b6b;
  --green: #6ee86e;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Space Grotesk', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(255, 180, 84, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 10%, rgba(94, 200, 216, 0.05) 0%, transparent 55%);
  background-repeat: no-repeat;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(255, 180, 84, 0.25);
  color: var(--text);
}

/* vacation banner */
.vacation-banner {
  background: var(--accent);
  color: #14100a;
  text-align: center;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
}

/* discord status card */
.discord-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 18px 22px;
  max-width: 420px;
}

.discord-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.discord-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  display: block;
}

.discord-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px solid var(--bg2);
  z-index: 2;
}
.discord-status-dot.online { background: #3ba55c; }
.discord-status-dot.idle { background: #faa61a; }
.discord-status-dot.dnd { background: #ed4245; }
.discord-status-dot.offline { background: #747f8d; }

.discord-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  pointer-events: none;
}

.discord-info .discord-name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 3px;
}
.discord-info .discord-status-text {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text2);
}
.discord-info .discord-activity {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text3);
  margin-top: 4px;
}

/* business chat widget */
.chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #14100a;
  cursor: pointer;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-launcher:hover {
  background: var(--accent-dim);
}
.chat-launcher .chat-badge {
  background: var(--red);
  color: white;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.72rem;
}

.chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 201;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 460px;
  max-height: calc(100vh - 48px);
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.open {
  display: flex;
}

.chat-panel-header {
  padding: 14px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-panel-header .title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}
.chat-panel-header .close-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.chat-panel-header .close-btn:hover {
  color: var(--red);
}

.chat-start-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  justify-content: center;
}
.chat-start-form label {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text3);
  margin-bottom: -6px;
}
.chat-start-form input,
.chat-start-form select {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.chat-start-form input:focus,
.chat-start-form select:focus {
  outline: none;
  border-color: var(--accent);
}
.chat-start-form button {
  margin-top: 6px;
  padding: 11px;
  border: none;
  border-radius: 7px;
  background: var(--accent);
  color: #14100a;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
}
.chat-start-form button:hover {
  background: var(--accent-dim);
}
.chat-start-error {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.78rem;
  display: none;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.4;
  word-wrap: break-word;
}
.chat-msg.visitor {
  align-self: flex-end;
  background: var(--accent);
  color: #14100a;
  border-bottom-right-radius: 3px;
}
.chat-msg.admin {
  align-self: flex-start;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border2);
  border-bottom-left-radius: 3px;
}
.chat-msg-empty {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: center;
  margin: auto;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.chat-input-row input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 9px 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.86rem;
}
.chat-input-row input:focus {
  outline: none;
  border-color: var(--accent);
}
.chat-input-row button {
  background: var(--accent);
  color: #14100a;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 1rem;
}
.chat-input-row button:hover {
  background: var(--accent-dim);
}

@media (max-width: 480px) {
  .chat-panel {
    right: 16px;
    bottom: 88px;
    width: calc(100vw - 32px);
  }
  .chat-launcher {
    right: 16px;
    bottom: 16px;
  }
}

/* contact page (kontakt.html) */
.contact-page-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 64px 24px 100px;
}

.contact-intro {
  margin-bottom: 32px;
}

.contact-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.contact-card-header {
  padding: 16px 20px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--text2);
}

.contact-start-form {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  justify-content: center;
}
.contact-start-form label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text3);
  margin-bottom: -8px;
}
.contact-start-form input,
.contact-start-form select {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.contact-start-form input:focus,
.contact-start-form select:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-start-form button {
  margin-top: 8px;
  padding: 13px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #14100a;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.contact-start-form button:hover {
  background: var(--accent-dim);
}
.contact-start-error {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.8rem;
  display: none;
}

.contact-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 320px;
  max-height: 55vh;
}
.contact-msg {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-wrap: break-word;
}
.contact-msg.visitor {
  align-self: flex-end;
  background: var(--accent);
  color: #14100a;
  border-bottom-right-radius: 4px;
}
.contact-msg.admin {
  align-self: flex-start;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border2);
  border-bottom-left-radius: 4px;
}
.contact-msg-empty {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 0.86rem;
  text-align: center;
  margin: auto;
}

.contact-input-row {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.contact-input-row input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: 11px 16px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.contact-input-row input:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-input-row button {
  background: var(--accent);
  color: #14100a;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 1.1rem;
}
.contact-input-row button:hover {
  background: var(--accent-dim);
}

/* ---------- layout shells ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 18, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

nav .wrap {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-btn {
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 6px 11px;
  border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text3);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.lang-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg3);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.88rem;
  color: var(--text2);
}

.nav-links a {
  transition: color 0.15s ease;
}

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

/* ---------- hero ---------- */
.hero {
  padding: 96px 0 72px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 0.82rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.6;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--accent);
}

.hero .tagline {
  color: var(--text2);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: 32px;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-size: 0.88rem;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #14100a;
  border-color: var(--accent);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}

.btn-ghost {
  color: var(--text);
  background: var(--bg2);
}

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

/* ---------- terminal ---------- */
.terminal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border2);
}

.terminal-bar .title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text3);
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
}

.terminal-body {
  font-family: var(--mono);
  font-size: 0.86rem;
  padding: 22px;
  min-height: 220px;
  color: var(--text2);
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-body .prompt {
  color: var(--cyan);
}

.terminal-body .cmd {
  color: var(--text);
}

.terminal-body .ok {
  color: var(--green);
}

.terminal-body .path {
  color: var(--accent);
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- sections ---------- */
section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text3);
  margin-bottom: 24px;
}

.section-label .prompt {
  color: var(--cyan);
}

.section-label .cmd {
  color: var(--accent);
}

.about-text {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 68ch;
  margin-bottom: 32px;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 8px 14px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  background: var(--bg2);
  color: var(--text2);
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* projects */
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 18px;
  transition: border-color 0.15s ease;
}

.project-card:hover {
  border-color: var(--border2);
}

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.project-head h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.project-head a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--cyan);
  white-space: nowrap;
}

.project-head a:hover {
  text-decoration: underline;
}

.project-desc {
  color: var(--text2);
  margin-bottom: 16px;
  font-size: 0.96rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 5px;
  background: var(--bg3);
  color: var(--text3);
}

/* links list */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.9rem;
  transition: background 0.15s ease;
}

.link-row:hover {
  background: var(--bg2);
}

.link-row .slug {
  color: var(--accent);
}

.link-row .slug::before {
  content: 'xarion.pl/';
  color: var(--text3);
}

.link-row .label {
  color: var(--text3);
  font-family: var(--sans);
  font-size: 0.85rem;
}

.links-empty {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 0.88rem;
}

/* footer / contact */
footer {
  padding: 56px 0 80px;
  border-top: 1px solid var(--border);
}

.contact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.contact-box h2 {
  font-size: 1.6rem;
  font-weight: 700;
}

.socials-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

footer .foot-note {
  margin-top: 40px;
  color: var(--text3);
  font-size: 0.8rem;
  font-family: var(--mono);
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 56px;
  }
  .nav-links {
    display: none;
  }
  .nav-right {
    gap: 0;
  }
  .contact-box {
    flex-direction: column;
    align-items: flex-start;
  }
}
