/* Shay Silberstein portfolio: monochrome layout adapted from the
   "Tomasz Gajda" Figma Community template (see docs/DESIGN.md). */

:root {
  --black: #000;
  --charcoal: #1e1e1e;
  --ink: #1a1a1a;          /* body text */
  --muted: #4d4d4d;        /* >= 5.5:1 on the darkest page grey (#d2d2d2) */
  --on-dark: #fff;
  --on-dark-muted: #b8b8b8; /* ~8:1 on charcoal */
  --grey: #dedede;
  --tile: #f2f2f2;
  --page: radial-gradient(ellipse at 50% 40%, #fafafa 0%, #e6e6e6 50%, #d4d4d4 100%);

  --f-display: Raleway, "Segoe UI", Arial, sans-serif;
  --f-label: Montserrat, "Segoe UI", Arial, sans-serif;
  --f-body: "Open Sans", "Segoe UI", Arial, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font: 400 15px/1.7 var(--f-body);
  color: var(--ink);
  background: #e2e2e2;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
a { color: inherit; }
main:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid #000; outline-offset: 3px; }
.band :focus-visible, .hero__panel :focus-visible, .nav.is-scrolled :focus-visible,
.nav__links :focus-visible, .nav__toggle:focus-visible { outline-color: #fff; }
.tile:focus-visible { outline-offset: 2px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 18px; background: #000; color: #fff;
  font: 700 12px/1 var(--f-label); letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
}
.skip:focus { top: 16px; outline-color: #fff; outline-offset: -6px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }

/* ---------- Shared pieces ---------- */

.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ico--fill { fill: currentColor; stroke: none; width: 18px; height: 18px; }

.mono { width: 54px; height: 34px; fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: square; }

/* Boxed, letter-spaced section title */
.boxed {
  display: table; margin: 0 auto 36px;
  min-width: 190px; padding: 16px 30px 16px calc(30px + .3em);
  border: 3px solid #000;
  font: 700 clamp(15px, 2vw, 19px)/1.3 var(--f-label);
  letter-spacing: .3em; text-transform: uppercase; text-align: center; color: #000;
}

/* —— \V/ —— */
.ornament { width: 120px; height: 16px; margin: 40px auto; fill: none; stroke: #222; stroke-width: 2; }

/* | LABEL | */
.btn-bracket {
  display: inline-block; padding: 3px 16px 3px calc(16px + .3em);
  border-left: 2px solid currentColor; border-right: 2px solid currentColor;
  font: 700 11px/1.6 var(--f-label); letter-spacing: .3em; text-transform: uppercase;
  text-decoration: none; color: #111;
  transition: background-color .2s, color .2s;
}
.btn-bracket:hover { background: #111; color: #fff; }
.btn-bracket--light { color: #fff; }
.btn-bracket--light:hover { background: #fff; color: #111; }
.btn-bracket--big { font-size: 14px; padding: 8px 26px 8px calc(26px + .3em); border-width: 3px; }

/* Square icon buttons */
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--tile); color: #111;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  transition: transform .2s, box-shadow .2s;
}
.icon-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, .3); }
.icon-btn--outline { background: transparent; color: #fff; box-shadow: none; border: 1.5px solid #fff; border-radius: 50%; }
.icon-btn--outline:hover { background: #fff; color: #111; box-shadow: none; }

.lead { max-width: 640px; margin: 0 auto 28px; text-align: center; color: var(--muted); }

/* ---------- Nav ---------- */

/* Over the split hero the bar is white and blends with "difference":
   it reads near-black over the grey half and white over the black panel. */
.nav { position: absolute; inset: 0 0 auto; z-index: 50; mix-blend-mode: difference; }
.nav.is-scrolled, .nav.is-open { mix-blend-mode: normal; }
.nav__inner {
  max-width: calc(var(--wrap) + 2 * var(--gutter)); height: var(--nav-h); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__logo { color: #fff; display: block; padding: 4px; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 40px); }
.nav__links a {
  color: #fff; text-decoration: none;
  font: 600 12px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase;
  padding: 8px 0; border-bottom: 1px solid transparent;
}
.nav__links a:not(.nav__cta):hover { border-bottom-color: currentColor; }
.nav__links .nav__cta {
  display: inline-block; padding: 11px 22px; border-radius: 999px;
  background: #fff; color: #000; letter-spacing: .2em; border: 0;
}
.nav__links .nav__cta:hover { background: #d9d9d9; }
.nav__toggle { display: none; }

/* JS on: the bar follows the page and turns charcoal once scrolled */
.js .nav { position: fixed; transition: background-color .3s, box-shadow .3s; }
.js .nav.is-scrolled { background: rgba(30, 30, 30, .96); box-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.js .nav.is-scrolled .nav__logo { color: #fff; }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  min-height: clamp(620px, 100svh, 940px);
  display: flex; align-items: center;
  background: radial-gradient(ellipse at 22% 50%, #f7f7f7 0%, #e2e2e2 55%, #d2d2d2 100%);
}
.hero__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 58%;
  background: #000;
  clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%);
}
.hero__art {
  position: absolute; top: 50%; right: max(4%, calc((100vw - var(--wrap)) / 2 - 40px));
  width: min(520px, 66%); height: auto; aspect-ratio: 1; transform: translateY(-46%);
}
.hero__photo {
  position: absolute; top: 50%; right: max(4%, calc((100vw - var(--wrap)) / 2 - 40px));
  width: min(560px, 68%); height: auto; aspect-ratio: 1; object-fit: cover; object-position: 40% 40%;
  transform: translateY(-44%);
  filter: saturate(.85) contrast(1.05);
  /* Melt the square photo into the black panel */
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}
.hero__content {
  position: relative; z-index: 1;
  width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: var(--nav-h) var(--gutter) 40px;
}
.hero__text { max-width: min(46vw, 540px); }
.hero__hi { font: 600 clamp(22px, 2.2vw, 30px)/1.2 var(--f-display); color: #111; }
.hero__name { margin: 6px 0 4px; font: 700 clamp(40px, 5vw, 66px)/1.05 var(--f-display); color: #000; letter-spacing: -.01em; }
.hero__he { font-size: 15px; color: var(--muted); }
.hero__role { margin-top: 14px; font: 600 18px/1.4 var(--f-display); color: var(--muted); }
.hero__pitch { margin-top: 14px; max-width: 30em; font-size: 15px; color: var(--muted); }
.hero__social { display: flex; gap: 14px; margin-top: 30px; }

/* ---------- Featured band ---------- */

.band { background: var(--charcoal); color: var(--on-dark); }
.featured { position: relative; overflow: hidden; padding: 96px 0; }
.featured__inner { position: relative; z-index: 1; }
.featured__title {
  font: 700 clamp(24px, 4vw, 44px)/1.2 var(--f-label); letter-spacing: .25em; text-transform: uppercase;
}
.featured__text { max-width: 560px; margin: 22px 0 30px; color: var(--on-dark-muted); }
.featured__mark {
  position: absolute; right: -0.12em; top: 50%; transform: translateY(-50%);
  font: 700 clamp(220px, 34vw, 460px)/1 var(--f-label); letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 2px #3d3d3d; pointer-events: none; user-select: none;
}

/* ---------- Light sections ---------- */

.section { padding: 96px 0; }
.section--light { background: var(--page); }
.section--alt { background: radial-gradient(ellipse at 50% 30%, #f0f0f0 0%, #dcdcdc 60%, #d2d2d2 100%); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 64px; max-width: 820px; margin: 0 auto; }
.feature { position: relative; isolation: isolate; padding: 18px 0 0 52px; }
.feature:last-child { grid-column: 1 / -1; justify-self: center; width: min(100%, 378px); }
.feature__ico {
  position: absolute; left: -26px; top: -18px; width: 96px; height: 96px; z-index: -1;
  fill: none; stroke: #000; stroke-width: .8; opacity: .14;
}
.feature__title { font: 700 14px/1.4 var(--f-label); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 8px; color: #000; }
.feature p { color: var(--muted); font-size: 14px; }

/* Experience timeline */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 36px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: #000; }
.timeline__item { position: relative; padding-bottom: 34px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -36px; top: 5px; width: 15px; height: 15px;
  background: #e6e6e6; border: 2px solid #000; transform: rotate(45deg) scale(.8);
}
.timeline__item.is-current::before { background: #000; }
.timeline__when { font: 600 11px/1.6 var(--f-label); letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.timeline__role { margin-top: 4px; font: 700 18px/1.35 var(--f-display); color: #000; }
.timeline__org { display: block; font: 600 12px/1.6 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: #333; margin-top: 2px; }
.timeline__note { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* Skills */
.skills { max-width: 900px; margin: 0 auto; }
.skills__label { font: 700 13px/1.4 var(--f-label); letter-spacing: .25em; text-transform: uppercase; margin-bottom: 28px; color: #000; }
.logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 24px; }
.logos li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.logos li > span:last-child {
  font: 600 10.5px/1.5 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: #222;
  overflow-wrap: anywhere;
}
.logos__img, .logos__ico, .flag { width: 44px; height: 44px; }
.logos__ico { color: #222; stroke-width: 1.3; }
.logos__pair { display: flex; gap: 6px; }
.logos__pair .logos__img { width: 38px; height: 44px; }
.logos--flags { grid-template-columns: repeat(4, 1fr); }

/* ---------- Achievements ---------- */

.achievements { background: var(--page); }
.achievements__banner {
  padding: 88px var(--gutter);
  background:
    repeating-linear-gradient(115deg, rgba(0, 0, 0, .07) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(65deg, rgba(255, 255, 255, .35) 0 1px, transparent 1px 34px),
    linear-gradient(160deg, #cfcfcf 0%, #a9a9a9 55%, #8c8c8c 100%);
}
.boxed--banner { margin-bottom: 0; background: rgba(255, 255, 255, .55); }
.filter-bar { background: var(--charcoal); min-height: 12px; }
.filter { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px clamp(12px, 4vw, 48px); padding: 14px var(--gutter); }
.filter[hidden] { display: none; }
.filter button {
  appearance: none; background: none; border: 0; cursor: pointer; color: var(--on-dark-muted);
  padding: 10px 2px 8px; border-bottom: 2px solid transparent;
  font: 600 12px/1 var(--f-label); letter-spacing: .25em; text-transform: uppercase;
}
.filter button:hover { color: #fff; }
.filter button[aria-selected="true"] { color: #fff; border-bottom-color: #fff; }
.filter button:focus-visible { outline-color: #fff; outline-offset: 2px; }

.achievements__body { padding: 56px 0 80px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 240px; padding: 26px 24px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: #141414; color: #fff;
}
.tile[hidden] { display: none; }
/* Line-art backgrounds per category */
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: .55;
  transition: transform .5s ease, opacity .3s;
}
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, .15) 100%);
  transition: background-color .3s;
}
.tile--award::before {
  background:
    radial-gradient(circle at 78% 28%, transparent 0 38px, #555 39px 40px, transparent 41px 62px, #444 63px 64px, transparent 65px 88px, #333 89px 90px, transparent 91px),
    linear-gradient(135deg, #2a2a2a, #0d0d0d);
}
.tile--cert::before {
  background:
    repeating-linear-gradient(45deg, #3a3a3a 0 1px, transparent 1px 18px),
    linear-gradient(160deg, #2b2b2b, #101010);
}
.tile--learn::before {
  background:
    repeating-linear-gradient(0deg, #333 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, #333 0 1px, transparent 1px 22px),
    linear-gradient(160deg, #2d2d2d, #0f0f0f);
}
.tile--edu::before {
  background:
    repeating-radial-gradient(circle at 100% 0%, #3c3c3c 0 1px, transparent 1px 20px),
    linear-gradient(200deg, #2a2a2a, #0e0e0e);
}
.tile:hover::before, .tile:focus-within::before { transform: scale(1.08); opacity: .9; }
.tile:hover::after { background-color: rgba(0, 0, 0, .25); }
.tile__tag { font: italic 400 13px/1.4 var(--f-body); color: #d0d0d0; margin-bottom: 8px; }
.tile__title { font: 700 15px/1.4 var(--f-label); letter-spacing: .08em; text-transform: uppercase; }
.tile__meta { margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: #d6d6d6; }
.tile__date {
  align-self: flex-start; margin-top: 14px; padding: 1px 12px 1px calc(12px + .25em);
  border-left: 2px solid #fff; border-right: 2px solid #fff;
  font: 600 11px/1.6 var(--f-label); letter-spacing: .25em; text-transform: uppercase;
}
.closing { margin-top: 44px; text-align: center; font: 600 18px/1.4 var(--f-display); color: #222; }

/* ---------- Contact & footer ---------- */

.contact__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px 32px; }

.footer { padding: 44px 0 36px; text-align: center; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.footer__top {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  font: 600 11px/1 var(--f-label); letter-spacing: .25em; text-transform: uppercase; text-decoration: none; color: #fff;
}
.footer__top .ico { width: 20px; height: 20px; stroke-width: 2; }
.footer__top:hover { color: var(--on-dark-muted); }
.footer__social { display: flex; gap: 16px; }
.footer__copy { font-size: 13px; color: #e6e6e6; }
.footer__copy strong { color: #fff; font-weight: 600; }
.footer__built { font: 600 10.5px/1 var(--f-label); letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-muted); margin-top: -10px; }

/* ---------- Tablet: hamburger menu (JS only) ---------- */

@media (max-width: 1024px) {
  .js .nav__toggle {
    display: grid; place-items: center; width: 46px; height: 46px; margin-right: -8px;
    background: none; border: 0; color: #fff; cursor: pointer; position: relative; z-index: 2;
  }
  .nav__bars, .nav__bars::before, .nav__bars::after {
    display: block; width: 26px; height: 2px; background: currentColor; transition: transform .25s, opacity .25s;
  }
  .nav__bars { position: relative; }
  .nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
  .nav__bars::before { top: -8px; }
  .nav__bars::after { top: 8px; }
  .nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
  .nav__toggle[aria-expanded="true"] .nav__bars::before { transform: translateY(8px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__bars::after { transform: translateY(-8px) rotate(-45deg); }

  .js .nav__menu {
    position: fixed; inset: 0; z-index: 1;
    display: grid; place-items: center;
    background: rgba(18, 18, 18, .97);
    visibility: hidden; opacity: 0; transition: opacity .25s, visibility 0s .25s;
  }
  .js .nav.is-open .nav__menu { visibility: visible; opacity: 1; transition: opacity .25s; }
  .js .nav__links { flex-direction: column; gap: 30px; text-align: center; }
  .js .nav__links a { font-size: 17px; letter-spacing: .3em; }
  .js .nav__links .nav__cta { margin-top: 10px; padding: 14px 30px; font-size: 13px; }
  .js .nav.is-open .nav__logo { color: #fff; position: relative; z-index: 2; }
  body.menu-open { overflow: hidden; }
}

/* ---------- Mobile (Figma mobile frame) ---------- */

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .nav__inner { justify-content: center; position: relative; }
  .nav__logo { color: #fff; }
  .js .nav__toggle { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); margin: 0; }
  /* Without JS the links stay visible as a wrapped row under the logo */
  html:not(.js) .nav__inner { flex-direction: column; height: auto; padding-top: 12px; padding-bottom: 12px; gap: 6px; }
  html:not(.js) .nav__links { flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
  html:not(.js) .nav__links a { font-size: 11px; }
  html:not(.js) .nav__links .nav__cta { padding: 8px 14px; }

  .hero { display: block; min-height: 0; background: #000; }
  .hero__panel {
    position: relative; width: 100%; height: clamp(300px, 55svh, 450px);
    clip-path: none;
  }
  .hero__photo { right: 50%; top: 44%; width: min(280px, 68%); transform: translate(50%, -50%); }
  .hero__content {
    margin-top: -150px; padding: 78px var(--gutter) 34px;
    display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end;
    background: rgba(216, 216, 216, .93);
    clip-path: polygon(0 56px, 100% 0, 100% 100%, 0 100%);
  }
  .hero__text { max-width: none; }
  .hero__name { font-size: clamp(34px, 10vw, 46px); }
  .hero__role { font-size: 16px; }
  .hero__pitch { font-size: 14px; }
  .hero__social { flex-direction: column; margin: 0; }

  .section, .featured { padding: 72px 0; }
  .featured__mark { font-size: 260px; right: -.25em; }
  .features { grid-template-columns: 1fr; gap: 36px; }
  .feature:last-child { grid-column: auto; justify-self: stretch; width: auto; }
  .logos, .logos--flags { grid-template-columns: repeat(3, 1fr); gap: 30px 12px; }
  .logos li > span:last-child { font-size: 9.5px; letter-spacing: .1em; }
  .logos__img, .logos__ico, .flag { width: 36px; height: 36px; }
  .logos__pair .logos__img { width: 30px; height: 36px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 200px; }
  .boxed { padding: 14px 20px 14px calc(20px + .3em); min-width: 0; max-width: 100%; }
  .btn-bracket--big { font-size: 13px; padding: 8px 18px 8px calc(18px + .3em); }
}

@media (max-width: 400px) {
  .filter button { letter-spacing: .15em; font-size: 11px; }
  .boxed { letter-spacing: .2em; padding-left: calc(18px + .2em); padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .tile:hover::before, .tile:focus-within::before { transform: none; }
  .icon-btn:hover { transform: none; }
}
