/* ============================================================
   Piotr Szcząchor — portfolio
   Design tokens
   ============================================================ */
:root {
  --accent: #5FB8C4;
  --bg: #0B0D10;
  --bg-alt: #0E1116;
  --surface: #12151B;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #E8EAED;
  --text-muted: #9AA3AF;
  --text-faint: #6B7280;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 16, 0.82);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav__logo {
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

.nav__links {
  display: flex;
  gap: 20px;
  flex: 1;
  flex-wrap: wrap;
}

.nav__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}

.nav__links a:hover { color: var(--text); }

.lang-toggle {
  display: flex;
  gap: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 3px;
}

.lang-toggle button {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
}

.lang-toggle button.active {
  background: var(--accent);
  color: var(--bg);
}

.btn-accent {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 9px;
}

.btn-accent:hover { filter: brightness(1.1); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  display: flex;
  flex-wrap: wrap-reverse;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(48px, 7vw, 80px);
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 280px;
  flex: 1;
}

.hero__badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.hero__badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.hero__role {
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
}

.hero__intro {
  margin: 0;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  text-wrap: pretty;
}

.hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero__ctas .primary {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 10px;
}

.hero__ctas .primary:hover { filter: brightness(1.1); }

.hero__ctas .secondary {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 10px;
}

.hero__ctas .secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero__loc {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.hero__photo {
  position: relative;
  width: 280px;
  max-width: 100%;
}

.hero__photo::before {
  content: '';
  position: absolute;
  inset: -14px;
  border: 1px solid color-mix(in oklab, var(--accent) 45%, transparent);
  border-radius: 28px;
  transform: rotate(-2.5deg);
}

.hero__photo img {
  display: block;
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 24px;
  filter: saturate(0.92);
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  border-top: 1px solid var(--border);
}

.section--alt { background: var(--bg-alt); }

.section__inner {
  padding-top: 88px;
  padding-bottom: 88px;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
}

.section h2 {
  margin: 0 0 40px;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ============================================================
   Cards & grids
   ============================================================ */
.grid { display: grid; gap: 20px; }
.grid--services { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--skills { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card--outline { background: transparent; }

.card--hover:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, transparent);
}

.card__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.card__title { font-size: 20px; font-weight: 600; }

.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* Skills */
.skill-group__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

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

.chip {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: #C7CCD4;
}

/* Experience */
.job {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(18px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.job__header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.logo-chip {
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-chip img { width: 38px; height: 38px; object-fit: contain; }

.logo-chip--lg { width: 56px; height: 56px; border-radius: 12px; }
.logo-chip--lg img { width: 48px; height: 48px; }
.logo-chip--cover img { width: 56px; height: 56px; object-fit: cover; }

.job__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 170px;
}

.job__company { font-size: 19px; font-weight: 600; line-height: 1.2; }
.job__role { font-size: 14px; color: var(--text-muted); }

.job__dates {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
}

.job ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.job li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* Portfolio */
.portfolio-card {
  text-decoration: none;
  cursor: pointer;
  gap: 16px;
}

.portfolio-card__kind {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.portfolio-card__domain {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

/* Projects */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
  border-radius: 999px;
  padding: 5px 11px;
}

/* Education */
.edu {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
}

.edu__school { font-size: 18px; font-weight: 600; line-height: 1.3; }
.edu__degree { font-size: 14px; color: var(--text-muted); margin-top: 5px; }
.edu__dates {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-top: 5px;
}

/* ============================================================
   Contact & footer
   ============================================================ */
.contact {
  padding-top: 100px;
  padding-bottom: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.contact h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact p {
  margin: 0;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

.contact__email {
  margin-top: 10px;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.contact__email:hover { text-decoration: underline; }

.contact__links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.contact__links a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}

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

.contact__company {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.footer { border-top: 1px solid var(--border); }

.footer__inner {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-faint);
}

.footer__nip { font-family: var(--font-mono); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  .nav__links { display: none; }
}
