
:root {
  --bg-color: #f2f2f2;
  --bg-elevated: #ffffff;
  --text-color: #111111;
  --muted-text: #555555;
  --accent-color: #000000;
  --border-color: #dddddd;
}

body.dark-mode {
  --bg-color: #050505;
  --bg-elevated: #111111;
  --text-color: #f0f0f0;
  --muted-text: #aaaaaa;
  --accent-color: #f5f5f5;
  --border-color: #333333;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "IBM Plex Mono", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar / header */

.site-header {
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(90deg, rgba(0,0,0,0.85), rgba(0,0,0,0.96));
  color: #f5f5f5;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 40px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Nav */

.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.nav-links a {
  padding: 0.25rem 0.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-links a.current {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
}

.nav-links a:hover {
  border-color: rgba(255,255,255,0.35);
}

/* Theme toggle */

.theme-toggle {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-toggle span.icon {
  font-size: 0.95rem;
}

/* Main layout */

.main {
  flex: 1;
}

.main-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

/* Generic components */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.8rem;
  margin: 0;
}

.page-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--muted-text);
}

.page-lead {
  max-width: 640px;
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: var(--muted-text);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
}

/* Cards */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.card {
  background: radial-gradient(circle at top left, rgba(255,255,255,0.04), transparent 60%),
              var(--bg-elevated);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  padding: 1.1rem 1rem;
  position: relative;
  overflow: hidden;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--muted-text);
}

.card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--muted-text);
}

.card ul li + li {
  margin-top: 0.15rem;
}

/* Subtle "PCB" vibe — dotted line */

.card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  height: 1px;
  width: 120px;
  background-image: radial-gradient(circle, rgba(0,0,0,0.35) 1px, transparent 1px);
  background-size: 6px 1px;
  opacity: 0.6;
}

/* Home: hero + FB */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr);
  gap: 1.5rem;
  align-items: stretch;
}

.hero-text {
  padding: 1.25rem 1.1rem;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--muted-text);
}

.hero-title {
  font-size: 2rem;
  margin: 0.45rem 0 0.2rem;
}

.hero-highlight {
  font-weight: 400;
  opacity: 0.7;
}

.hero-punchline {
  font-size: 0.96rem;
  margin: 0.8rem 0 0.5rem;
  color: var(--muted-text);
}

.hero-list {
  margin: 0.75rem 0 1rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--muted-text);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn {
  border-radius: 999px;
  border: 1px solid var(--accent-color);
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  background: transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-color);
  color: #f5f5f5;
}

body.dark-mode .btn-primary {
  color: #111111;          /* ciemny tekst na jasnym przycisku w trybie Noc */
  border-color: #f5f5f5; 
}

.btn-outline {
  background: transparent;
}

.hero-meta {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--muted-text);
}

.hero-meta strong {
  color: var(--text-color);
}

/* FB panel */

.hero-fb {
  border-radius: 1.1rem;
  border: 1px solid var(--border-color);
  background: radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 60%),
              url("../assets/tło.png");
  background-size: cover;
  background-position: center;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
}

.fb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted-text);
}

.fb-header span.label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
}

.fb-shell {
  flex: 1;
  min-height: 520px;
  border-radius: 0.9rem;
  overflow: hidden;
  background: rgba(0,0,0,0.02);
}

/* Fallback box when FB blocked */

.fb-fallback {
  height: 100%;
  padding: 1rem;
  font-size: 0.86rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
}

/* Other pages layout */

.section {
  margin-top: 1.25rem;
}

.section + .section {
  margin-top: 1.6rem;
}

.section h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.section p {
  margin: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Timeline-ish list for portfolio */

.timeline {
  border-left: 1px solid var(--border-color);
  margin-top: 1rem;
}

.timeline-item {
  padding-left: 1.1rem;
  padding-bottom: 0.9rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.2rem;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid var(--accent-color);
  background: var(--bg-color);
}

.timeline-title {
  font-size: 0.95rem;
  margin: 0;
}

.timeline-meta {
  font-size: 0.78rem;
  color: var(--muted-text);
  margin: 0.1rem 0 0.25rem;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 1.4rem;
}

.contact-item {
  font-size: 0.9rem;
  color: var(--muted-text);
}

.contact-item strong {
  color: var(--text-color);
}

.contact-item a {
  text-decoration: underline;
  text-decoration-style: dotted;
}

.form {
  display: grid;
  gap: 0.7rem;
}

.form label {
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.2rem;
}

.form input,
.form textarea {
  width: 100%;
  border-radius: 0.6rem;
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
  background: var(--bg-elevated);
  color: var(--text-color);
}

.form textarea {
  min-height: 120px;
  resize: vertical;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 0.7rem 1.25rem 1rem;
  font-size: 0.78rem;
  color: var(--muted-text);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Responsive */

@media (max-width: 820px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .main-inner {
    padding-inline: 1rem;
  }

  .page-title {
    font-size: 1.4rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 820px) {
  .fb-shell {
    min-height: 420px; /* trochę niżej na telefonie */
  }
}
