/* =========================================================
   Gabriela Słomiany: portfolio
   Colours, type and spacing live in the tokens below only.
   ========================================================= */

:root {
  --accent-rgb: 119, 147, 166;            /* #7793A6 */
  --accent: rgb(var(--accent-rgb));

  /* dark (default) */
  --bg: #000000;
  --surface: #0f0f10;
  --surface-2: #161618;
  --border: #232326;
  --text: #f5f5f5;
  --text-muted: #9a9a9f;
  --text-display: #b4b4b8;                /* big grey headings, as in template 1 */
  --line: rgba(255, 255, 255, 0.06);      /* hero diagonals */
  --polaroid: #d6d6d6;
  --polaroid-ink: #111;

  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 48px; --s6: 96px;
  --radius: 6px;
  --max-w: 1200px;
  --gutter: clamp(16px, 5vw, 64px);
}

[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f2f2f3;
  --border: #e4e4e7;
  --text: #0a0a0a;
  --text-muted: #5f5f66;
  --text-display: #2a2a2d;
  --line: rgba(0, 0, 0, 0.07);
  --polaroid: #ffffff;
  --polaroid-ink: #111;
  --accent-rgb: 91, 122, 143;             /* slightly darker accent for contrast on white */
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
img { max-width: 100%; display: block; }
html, body { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }

/* bracket label: [ About Me ] */
.label { font-size: 15px; color: var(--text-muted); letter-spacing: .01em; }
.label::before { content: "[ "; }
.label::after  { content: " ]"; }

.statement {
  font-size: clamp(28px, 4.2vw, 56px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-display);
  margin: var(--s3) 0 0;
  max-width: 22ch;
}
.section { padding: var(--s6) 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--border); }
.site-header.is-hidden:not(:focus-within) { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__links { display: flex; gap: clamp(20px, 4vw, 56px); }
.nav__links a {
  font-weight: 500; color: var(--text-muted);
  transition: color .2s;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a[aria-current="page"]::after {
  content: ""; display: block; height: 1px; background: var(--accent); margin-top: 2px;
}
.nav__right { display: flex; align-items: center; gap: var(--s3); }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 1px solid var(--border); border-radius: 50%;
  cursor: pointer; transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }

/* ---------- hero (home) ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  display: flex; align-items: center;
}
.hero__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__lines line { stroke: var(--line); stroke-width: 1; }
.hero__inner {
  position: relative; width: 100%;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: var(--s4);
}
.hero__name {
  margin: 0;
  font-size: clamp(64px, 13vw, 200px);
  line-height: .9;
  font-weight: 700;
  letter-spacing: -0.045em;
  color: var(--text-display);
}
.hero__role { white-space: nowrap; font-size: clamp(24px, 3.6vw, 52px); font-weight: 500; letter-spacing: -0.02em; color: var(--text-display); margin: 0; }
.hero__role::before { content: "[ "; } .hero__role::after { content: " ]"; }
.hero__intro { grid-column: 1 / -1; max-width: 52ch; color: var(--text-muted); margin: var(--s4) 0 0; }

/* ---------- polaroids ---------- */
.polaroid {
  margin: 0;
  background: var(--polaroid);
  padding: 14px 14px 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  width: 100%;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.polaroid img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.polaroid figcaption { color: var(--polaroid-ink); padding-top: 12px; line-height: 1.2; }
.polaroid figcaption strong { display: block; font-size: 22px; letter-spacing: -0.01em; }
.polaroid figcaption span { color: #666; font-size: 15px; }

.polaroid-stack { display: block; position: relative; width: min(420px, 80vw); margin: var(--s5) auto 0; aspect-ratio: 0.82; }
.polaroid-stack .polaroid { position: absolute; inset: 0; height: max-content; }
/* side photos spread out so all three are visible; hover fans them a bit further */
.polaroid-stack { --spread: 64%; --tilt: 8deg; }
.polaroid-stack .polaroid:nth-child(1) { transform: translateX(calc(var(--spread) * -1)) translateY(4%) rotate(calc(var(--tilt) * -1)) scale(.88); }
.polaroid-stack .polaroid:nth-child(2) { transform: translateX(var(--spread)) translateY(4%) rotate(var(--tilt)) scale(.88); }
.polaroid-stack .polaroid:nth-child(3) { transform: rotate(-1deg); }
.polaroid-stack:hover .polaroid:nth-child(1) { transform: translateX(calc(var(--spread) * -1 - 6%)) translateY(2%) rotate(calc(var(--tilt) * -1.3)) scale(.9); }
.polaroid-stack:hover .polaroid:nth-child(2) { transform: translateX(calc(var(--spread) + 6%)) translateY(2%) rotate(calc(var(--tilt) * 1.3)) scale(.9); }
.polaroid-stack:hover .polaroid:nth-child(3) { transform: rotate(0deg) translateY(-4%); }
@media (max-width: 720px) {
  .polaroid-stack { width: 50vw; --spread: 50%; --tilt: 7deg; }
}

.about-preview { text-align: center; }
.about-preview .statement { margin-left: auto; margin-right: auto; max-width: 26ch; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 15px;
  background: var(--accent); color: #0a0a0a;
  border: 0; border-radius: var(--radius);
  padding: 14px 24px; cursor: pointer;
  transition: transform .15s, filter .2s;
}
[data-theme="light"] .btn { color: #fff; }
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.link-arrow { font-family: var(--font-mono); color: var(--text-muted); transition: color .2s; }
.link-arrow:hover { color: var(--accent); }
.link-arrow .slash { color: var(--accent); margin-right: 8px; }

/* ---------- project controls ---------- */
.controls {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--s3);
  margin: var(--s5) 0 var(--s4);
}
.controls__group { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.segmented {
  display: inline-flex; padding: 4px; gap: 4px;
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
}
.segmented button {
  border: 0; background: none; cursor: pointer;
  padding: 8px 14px; border-radius: 4px; color: var(--text-muted);
  font-family: var(--font-mono); font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.segmented button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.segmented svg { width: 16px; height: 16px; }
.chip {
  border: 1px solid var(--border); background: var(--surface);
  padding: 8px 14px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.select {
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  padding: 10px 36px 10px 14px; font-family: var(--font-mono); font-size: 14px; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9a9f' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

/* ---------- project cards (template 2 style) ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
.projects-grid.is-list { grid-template-columns: 1fr; }
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 32px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .15), 0 12px 40px rgba(var(--accent-rgb), .12);
  transform: translateY(-2px);
}
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.card__title { font-family: var(--font-mono); font-size: 20px; font-weight: 500; margin: 0; transition: color .25s; }
.card:hover .card__title, .card:hover .card__arrow { color: var(--accent); }
.card__arrow { color: var(--text-muted); flex-shrink: 0; transition: color .25s, transform .25s; }
.card:hover .card__arrow { transform: translateX(3px); }
.card__meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.card__pin { color: var(--accent); }
.card__desc { color: var(--text-muted); margin: var(--s3) 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tag {
  font-family: var(--font-mono); font-size: 13px;
  border: 1px solid var(--border); background: var(--surface-2);
  padding: 4px 10px; border-radius: 3px; color: var(--text-muted);
}
.card__result {
  border-top: 1px solid var(--border); margin-top: var(--s4); padding-top: var(--s3);
  font-family: var(--font-mono); font-size: 14px; color: var(--accent);
}
.card__result::before { content: "// "; color: var(--text-muted); }
.empty { text-align: center; color: var(--text-muted); padding: var(--s6) 0; grid-column: 1 / -1; }

/* ---------- CTA strip ---------- */
.cta { border-top: 1px solid var(--border); }
.cta__inner { display: flex; align-items: end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.big-headline {
  font-size: clamp(56px, 10vw, 150px);
  line-height: .92; font-weight: 700; letter-spacing: -0.05em;
  margin: 0; color: var(--text);
}

/* ---------- about page ---------- */
.banner {
  position: relative; margin-top: var(--s4);
  border: 1px solid var(--border); overflow: hidden;
  aspect-ratio: 21 / 9; min-height: 380px;
  display: grid; place-items: center; text-align: center;
}
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.45) saturate(.8); }
.banner__content { position: relative; display: grid; justify-items: center; gap: var(--s4); padding: var(--s4); }
.pill {
  display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.15);
  background: rgba(30,30,32,.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  flex-wrap: wrap; justify-content: center;
}
.pill a { color: #e8e8e8; padding: 8px 18px; border-radius: 999px; transition: background .2s; }
.pill a:hover { background: rgba(255,255,255,.08); }

/* fake "selected text" box with handles, Figma style */
.selected {
  position: relative; display: inline-block;
  padding: 0 .18em;
  background: rgba(var(--accent-rgb), .35);
  border-left: 2px solid var(--accent); border-right: 2px solid var(--accent);
  font-size: clamp(48px, 8vw, 112px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15;
  color: #e6e6e6; margin: 0;
}
.selected::before, .selected::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
}
.selected::before { top: -7px; left: -8px; }
.selected::after  { bottom: -7px; right: -8px; }
.banner__sub { color: #c9c9cc; font-size: 20px; margin: 0; }

.about-body {
  display: grid; grid-template-columns: 1fr minmax(0, 620px) 1fr;
  gap: var(--s5); align-items: start;
}
.about-body__text p { color: var(--text-muted); font-size: 18px; margin: 0 0 var(--s4); }
.about-body__text p:first-of-type { color: var(--text); font-size: 22px; line-height: 1.5; }
.about-body__text .accent { color: var(--accent); }
.side-polaroids { display: grid; gap: var(--s5); padding-top: var(--s5); }
.side-polaroids .polaroid { max-width: 240px; }
.side-polaroids.side-polaroids--left .polaroid { transform: rotate(-6deg); justify-self: end; }
.side-polaroids--right .polaroid:nth-child(1) { transform: rotate(5deg); }
.side-polaroids--right .polaroid:nth-child(2) { transform: rotate(-3deg); margin-left: 24px; }
.side-polaroids .polaroid:hover { transform: rotate(0) scale(1.04); }

/* ---------- contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s5); margin-top: var(--s5); }
.sub-label {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 14px; color: var(--text-muted);
  margin: 0 0 var(--s4);
}
.sub-label::before { content: "//"; color: var(--accent); }
.sub-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.field { display: grid; gap: 8px; margin-bottom: var(--s4); }
.field label { font-family: var(--font-mono); font-size: 14px; }
.field input, .field textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; font-family: var(--font-mono); font-size: 14px; outline: none;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 160px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-status { font-family: var(--font-mono); font-size: 14px; margin-top: var(--s3); min-height: 1.4em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #e07a7a; }

.connect-card {
  display: flex; align-items: center; gap: var(--s3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: var(--s3); transition: border-color .2s;
}
.connect-card:hover { border-color: var(--accent); }
.connect-card__icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--surface-2); border-radius: var(--radius);
}
.connect-card__icon svg { width: 20px; height: 20px; }
.connect-card strong { display: block; font-family: var(--font-mono); font-weight: 500; }
.connect-card span { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.availability {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--surface);
}
.availability .mono { color: var(--accent); font-size: 13px; }
.calendly-wrap {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  min-height: 680px; overflow: hidden;
}
.calendly-placeholder { display: grid; place-items: center; min-height: 680px; text-align: center; padding: var(--s4); color: var(--text-muted); }

/* ---------- footer (template 3 layout) ---------- */
.site-footer { border-top: 1px solid var(--border); padding: var(--s5) 0 var(--s4); margin-top: var(--s6); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
.footer-col h4 {
  margin: 0 0 var(--s3); font-size: 13px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted);
}
.footer-col a, .footer-col p { display: block; margin: 0 0 6px; font-size: 15px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s3);
  margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--border);
  font-size: 14px; color: var(--text-muted);
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .about-body { grid-template-columns: 1fr; }
  .side-polaroids { grid-auto-flow: column; justify-content: center; padding-top: 0; gap: var(--s4); }
  .side-polaroids .polaroid { max-width: 160px; }
  .side-polaroids--right { order: 3; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__links { gap: 16px; font-size: 14px; }
  .hero__inner { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .banner { aspect-ratio: auto; min-height: 460px; }
  .section { padding: 64px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- PDF portfolio card (contact page) ---------- */
.connect-card--pdf { border-color: rgba(var(--accent-rgb), .55); background: linear-gradient(135deg, rgba(var(--accent-rgb), .10), var(--surface) 60%); }
.connect-card--pdf .connect-card__icon { color: var(--accent); }
.pdf-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.pdf-actions .chip { color: var(--text); }
.pdf-actions .chip:hover { border-color: var(--accent); color: var(--accent); }
.chip--solid { background: var(--accent); border-color: var(--accent); color: #0a0a0a !important; }
[data-theme="light"] .chip--solid { color: #fff !important; }
.chip--solid:hover { filter: brightness(1.1); }
@media (max-width: 720px) {
  .connect-card--pdf { flex-wrap: wrap; }
  .pdf-actions { margin-left: 60px; }
}
.connect-card__icon { flex-shrink: 0; }
.connect-card--pdf > span:nth-child(2) { flex: 1 1 0; min-width: 0; }
@media (max-width: 720px) { .pdf-actions { flex-basis: 100%; } }
.pdf-actions .chip--soon { border-style: dashed; border-color: rgba(var(--accent-rgb), .6); color: var(--accent); cursor: default; }
