/* Waymaker brand: colours and fonts from "Knjiga vizualnih standarda" v1.0 */

:root {
  --navy: #0F2743;
  --gold: #bd985f;
  --sand: #F4EFE5;
  --soft-gray: #E8E8E8;
  --dark-gray: #2B2B2B;
  --white: #ffffff;

  --text: var(--dark-gray);
  --text-on-navy: #ffffff;
  --muted-on-navy: rgba(255, 255, 255, 0.78);
  --line: rgba(15, 39, 67, 0.14);

  --font-display: "Noto Serif Display", "Georgia", serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 66ch;
  --content: 1120px;
  --gutter: 16px;
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--navy);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

h3 {
  font-size: 1.5rem;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

.plain-list {
  margin: 0 0 1.5em;
  padding-left: 1.2em;
}

/* Reading progress bar: a gold line across the top of the page */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 20;
  background: transparent;
}

.progress__bar {
  display: block;
  height: 100%;
  background: var(--gold);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

/* Header */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px var(--gutter);
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
}

.site-header__logo img {
  width: 150px;
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-nav a {
  color: var(--text-on-navy);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--gold);
}

/* Hero */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--text-on-navy);
  padding: 140px max(var(--gutter), calc((100% - var(--content)) / 2)) 96px;
}

.hero__text,
.hero__portrait {
  max-width: 100%;
  margin: 0;
}

.hero {
  display: grid;
  gap: 48px;
  align-items: end;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    padding-top: 160px;
  }
}

.hero__text {
  max-width: 720px;
}

.hero__name {
  color: var(--text-on-navy);
  font-size: clamp(2.6rem, 5.6vw, 5.2rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.2em;
}

.hero__title-small {
  display: block;
  margin-top: 0.1em;
  font-size: 0.5em;
  font-weight: 400;
  color: var(--gold);
}

.hero__role {
  font-size: 2rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 1.5em;
}

.hero__intro {
  color: var(--muted-on-navy);
  font-size: 1.5rem;
}

.hero__intro em {
  color: var(--text-on-navy);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero__portrait {
  width: min(100%, 360px);
}

/* Arch shape: a soft nod to the Waymaker "A" mark */
.hero__portrait img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 999px 999px 0 0;
  border-bottom: 3px solid var(--gold);
}

@media (min-width: 900px) {
  .hero__portrait {
    justify-self: end;
  }
}

/* Buttons */
.button {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font: 600 1rem/1 var(--font-text);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button--gold {
  background: var(--gold);
  color: var(--navy);
}

.button--gold:hover {
  background: #cfab76;
}

.button--ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--text-on-navy);
}

.button--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Generic section layout */
.section {
  padding: 96px var(--gutter);
}

.section__head,
.services,
.filters,
.timeline,
.background,
.contact {
  max-width: var(--content);
  margin-left: auto;
  margin-right: auto;
}

.section__head {
  margin-bottom: 40px;
}

.section__head p {
  color: #4a4a4a;
}

.section--white {
  background: var(--white);
}

.section--sand {
  background: var(--sand);
}

.section--navy {
  background: var(--navy);
  color: var(--text-on-navy);
}

/* Services: filters and accordion */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter {
  font: 500 0.95rem/1 var(--font-text);
  padding: 10px 18px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.filter:hover {
  background: var(--sand);
}

.filter.is-active {
  background: var(--navy);
  color: var(--white);
}

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

.service {
  border-bottom: 1px solid var(--line);
}

.service[hidden] {
  display: none;
}

.service > summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 22px 48px 22px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--navy);
  line-height: 1.3;
}

.service > summary::-webkit-details-marker {
  display: none;
}

/* Gold triangle from the Waymaker "A": points right when closed, down when open */
.service > summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  margin-top: -6px;
  width: 0;
  height: 0;
  border-left: 12px solid var(--gold);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  transform-origin: 30% 50%;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service[open] > summary::after {
  transform: rotate(90deg);
}

.service:not([hidden]) {
  animation: panel-in 0.4s ease both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Tool chips pop in one after another when a panel opens */
.service[open] .chips li {
  animation: chip-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms + 120ms);
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.chips li {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.chips li:hover {
  transform: translateY(-2px);
  background: #e9dcc6;
}

/* "Surprise me" button and the panel it picks */
.filter--surprise {
  border-style: dashed;
  border-color: var(--gold);
  color: #7d5f32;
}

.filter--surprise:hover {
  background: #f7f0e3;
}

.service.is-picked {
  background: var(--sand);
  box-shadow: -12px 0 0 var(--gold);
  transition: background-color 0.6s ease;
}

.service.is-picked > summary {
  padding-left: 16px;
}

.service > summary:hover {
  color: #1d3b5e;
}

.service__body {
  display: grid;
  gap: 8px;
  padding: 0 0 28px;
  max-width: var(--measure);
}

.service__tools-label {
  margin: 8px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 6px 12px;
  background: var(--soft-gray);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--dark-gray);
}

/* Experience timeline: a gold "path" that fills as you scroll */
.timeline {
  list-style: none;
  padding: 0 0 0 36px;
  position: relative;
}

.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 12px;
  bottom: 12px;
  width: 2px;
}

.timeline::before {
  background: rgba(15, 39, 67, 0.15);
}

.timeline::after {
  background: var(--gold);
  height: calc(var(--fill, 0) * (100% - 24px));
  bottom: auto;
}

.timeline__item {
  position: relative;
  margin-bottom: 28px;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sand);
  border: 2px solid var(--navy);
  transform: translateX(-1px);
  box-sizing: border-box;
}

.timeline__item::before {
  background: var(--gold);
  border-color: var(--gold);
}

.timeline__head {
  padding: 6px 0 10px;
}

.timeline__role {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--navy);
}

.timeline__meta {
  display: block;
  font-size: 0.95rem;
  color: #55595f;
}

.timeline__points {
  margin: 0 0 8px;
  padding-left: 1.2em;
  max-width: var(--measure);
}

.timeline__points li {
  margin-bottom: 6px;
}

/* Background: education, certificates, languages */
.background {
  display: grid;
  gap: 56px;
}

@media (min-width: 900px) {
  .background {
    grid-template-columns: 1.4fr 1fr;
    gap: 72px;
  }
}

.background__block h3 {
  font-size: 1.35rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.background__sub {
  margin-top: 40px;
}

.degree {
  margin-bottom: 32px;
}

.degree__name {
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
}

.degree__school {
  color: #55595f;
  font-size: 0.95rem;
}

.languages {
  list-style: none;
  margin: 0;
  padding: 0;
}

.languages li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.dots {
  display: inline-flex;
  gap: 6px;
}

.dots i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--navy);
  transition: background-color 0.4s ease, transform 0.4s ease;
}

.dots i.is-on {
  background: var(--navy);
}

/* Contact */
.contact {
  display: grid;
  gap: 56px;
}

@media (min-width: 900px) {
  .contact {
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
  }
}

.contact h2 {
  color: var(--text-on-navy);
}

.contact p {
  color: var(--muted-on-navy);
}

.contact__links {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.contact__links a {
  color: var(--text-on-navy);
  font-size: 1.05rem;
}

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

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-on-navy);
}

.field input,
.field textarea {
  font: 400 1rem/1.4 var(--font-text);
  color: var(--navy);
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #e0a19a;
}

.field__error {
  margin: 0;
  color: #ffb4a8;
  font-size: 0.9rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__note {
  font-size: 0.9rem;
  color: var(--muted-on-navy);
  margin: 0;
}

.form .button {
  justify-self: start;
  cursor: pointer;
}

.form .button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form__status {
  margin: 0;
  min-height: 1.5em;
  color: var(--text-on-navy);
}

.form__status.is-error {
  color: #ffb4a8;
}

.form__status.is-success {
  color: var(--gold);
}

/* Footer */
.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 32px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--muted-on-navy);
  font-size: 0.9rem;
}

.site-footer img {
  width: 130px;
  height: auto;
}

.site-footer p {
  margin: 0;
}

/* Small screens */
@media (max-width: 720px) {
  .site-header {
    position: relative;
    background: var(--navy);
  }

  .hero {
    padding-top: 40px;
  }

  .site-nav {
    width: 100%;
    gap: 4px 16px;
  }

  .section {
    padding: 72px var(--gutter);
  }

  .hero {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
}

/* Respect people who ask their device to limit motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
