/* ============================================================
   Niklas Bambor — global styles
   Terminal / network aesthetic · Ayu-dark inspired palette
   ============================================================ */

:root {
  /* palette */
  --bg: #0b0e14;
  --surface: #10141c;
  --surface-2: #151b26;
  --line: #1e2633;
  --line-bright: #2c3648;
  --text: #cbd3df;
  --text-bright: #eef2f7;
  --muted: #7d8899;
  --amber: #ffb454;
  --amber-dim: rgba(255, 180, 84, 0.14);
  --cyan: #39bae6;
  --green: #7fd962;
  --red: #f26d78;

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* layout */
  --container: 1280px;
  --radius: 10px;
  --header-h: 64px;
}

/* large desktop: use the space */
@media (min-width: 1680px) {
  :root { --container: 1440px; }
  body { font-size: 1.06rem; }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* faint blueprint grid over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(57, 186, 230, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 186, 230, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: 0;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
  position: relative;
  z-index: 1;
}

/* ---------- typography ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-bright);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); letter-spacing: -0.015em; }
h3 { font-size: 1.12rem; }

p { margin: 0 0 1em; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.accent { color: var(--amber); }
.mono { font-family: var(--font-mono); }

::selection { background: var(--amber); color: #10141c; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- section scaffolding ---------- */

.section { padding: 88px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(16, 20, 28, 0.85) 12%, rgba(16, 20, 28, 0.85) 88%, transparent); }

/* CLI-prompt style section eyebrow: "~$ about-me" */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before { content: "~$"; color: var(--amber); }
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-bright), transparent);
}

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: var(--line-bright);
  transform: translateY(-3px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}

/* orbiting packet around the full card border on hover */
@property --orbit {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--orbit),
    transparent 0turn,
    transparent 0.78turn,
    rgba(255, 180, 84, 0.25) 0.88turn,
    var(--amber) 0.965turn,
    transparent 1turn
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.card:hover::before {
  opacity: 1;
  animation: orbit 1.6s linear infinite;
}
@keyframes orbit {
  to { --orbit: 1turn; }
}

.card--cta {
  display: block;
  color: inherit;
  border-style: dashed;
  border-color: var(--line-bright);
  background: transparent;
}
.card--cta:hover { text-decoration: none; border-color: var(--amber); }
.card--cta p { color: var(--amber); margin: 0; font-family: var(--font-mono); font-size: 0.9rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  align-items: start;
}

/* ---------- skill card = interface status row ---------- */

.skill__iface {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.skill__iface .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(127, 217, 98, 0.7);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.skill__iface .status { color: var(--green); }
.card h3 { margin-bottom: 4px; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn--primary {
  background: var(--amber);
  color: #10141c;
  font-weight: 600;
}
.btn--primary:hover { box-shadow: 0 6px 22px rgba(255, 180, 84, 0.35); }

.btn--ghost {
  border-color: var(--line-bright);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }

.btn--sm { padding: 7px 14px; font-size: 0.8rem; }

/* ---------- lists ---------- */

.list-dots { list-style: none; padding: 0; margin: 0 0 1em; }
.list-dots li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}
.list-dots li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-family: var(--font-mono);
}

.meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- scroll-reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card::before, .skill__iface .dot { animation: none !important; }
  * { animation-duration: 0.001s !important; }
}
