/* ==========================================================================
   golobov.se — site stylesheet
   Colours, fonts and sizes match the original Squarespace design.
   ========================================================================== */

:root {
  --bg:            #2f3d51;
  --text:          #f5f7fa;
  --logo:          #ebebeb;
  --subtitle:      #edf2f7;
  --nav:           #6bc7f5;
  --nav-active:    #dbe9fa;
  --nav-hover:     #fafafa;
  --h1:            #f49048;
  --h2:            #edf2f7;
  --h3:            #d1d1d1;
  --link:          #64c8ed;
  --link-hover:    #e0f1fa;
  --link-line:     rgba(100, 200, 237, .2);
  --rule:          #bbb;
  --btn-outline:   #f4f7fb;

  --highlight:     rgba(255, 255, 255, .14); /* tile hover / tap highlight (white wash) */
  --highlight-brightness: 1.12;             /* how much brighter the image gets on hover / tap */

  --font:          'Lexend', sans-serif;      /* the only font on the site */

  --max:           1200px;
  --gutter:        17px;    /* half the space between blocks, as on Squarespace */
  --ease:          cubic-bezier(.2, .7, .2, 1);
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--bg-image, none);
  background-repeat: repeat;
  background-position: top left;
  color: var(--text);
  font-family: var(--font);
  font-weight: 200;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }   /* the <img> inside lays out exactly as if the wrapper wasn't there */
button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--link); text-decoration: none; transition: color .15s linear; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: #fff; color: var(--bg); font-weight: 400;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- layout */
.canvas {
  max-width: calc(var(--max) + 40px);
  margin: 10px auto;
  padding: 20px;
}

/* Blocks have 17px padding; pull the content area out so block content lines up with the header edges */
.page { padding: 17px 0; margin: 0 calc(-1 * var(--gutter)); }

/* ---------------------------------------------------------------- header */
.site-header {
  text-align: center;
  margin-bottom: 42px;
}

.logo {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.logo a { color: var(--logo); }
.logo a:hover { color: #f7f7f7; }

.logo-subtitle {
  margin: .7em 0 0;
  font-weight: 200;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 2px;
  color: var(--subtitle);
}

.main-nav { margin-top: 21px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 0 58px; }
.main-nav a {
  display: inline-block;
  font-weight: 300;
  font-size: 16px;
  line-height: normal;
  letter-spacing: .73px;
  text-transform: uppercase;
  color: var(--nav);
}
.main-nav .is-active > a { color: var(--nav-active); }
.main-nav a:hover { color: var(--nav-hover); }

.menu-toggle { display: none; }

/* ---------------------------------------------------------------- blocks & grid */
.block { padding: var(--gutter); position: relative; }

.row { display: flex; }
.col { flex: 0 0 auto; min-width: 0; }
.span-1  { width: 8.3333%; }  .span-2  { width: 16.6667%; } .span-3  { width: 25%; }
.span-4  { width: 33.3333%; } .span-5  { width: 41.6667%; } .span-6  { width: 50%; }
.span-7  { width: 58.3333%; } .span-8  { width: 66.6667%; } .span-9  { width: 75%; }
.span-10 { width: 83.3333%; } .span-11 { width: 91.6667%; } .span-12 { width: 100%; }

.block-spacer { padding: 0; }

/* ---------------------------------------------------------------- typography */
h1, h2, h3, h4 { margin: 1em 0 .5em; font-family: var(--font); text-transform: uppercase; letter-spacing: .06em; }
h1 { font-weight: 300; font-size: 1.9em; line-height: 1.2; color: var(--h1); }
h2 { font-weight: 400; font-size: 1.7em; line-height: 1;   color: var(--h2); }
h3 { font-weight: 200; font-size: 1.4em; line-height: 1.2; color: var(--h3); }

.block-text > :first-child { margin-top: 0; }
.block-text > :last-child  { margin-bottom: 0; }
.block-text p, .block-text h1, .block-text h2, .block-text h3 { white-space: pre-wrap; }

p { margin: 0 0 1em; }
ul, ol { margin: 1em 0; padding-left: 40px; }
.block-text li > * { margin-top: .5em; margin-bottom: .5em; }
.block-text ul > li { list-style: none; }
.block-text ul > li > :first-child::before {
  content: "\2022"; display: inline-block; box-sizing: border-box;
  margin-left: -40px; min-width: 40px; padding-right: 10px; text-align: right;
}
.center { text-align: center; }

.block-text a { border-bottom: 1px solid var(--link-line); }
.block-text a:hover { border-color: var(--link-hover); }

/* ---------------------------------------------------------------- back link */
.back-link {
  margin: -24px 0 0;
  padding: 0 var(--gutter);
  font-weight: 300;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.back-link a { display: inline-flex; align-items: center; gap: .45em; padding: 10px 0; color: var(--nav); }
.back-link svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.back-link a:hover { color: var(--nav-hover); }

/* ---------------------------------------------------------------- images */
.block-image img { width: 100%; }

/* Project tiles (Professional & Personal): a light highlight on hover, keyboard focus and tap */
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(175, 175, 175, .1);
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
}
.tile__media { display: block; }
.tile__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .45s var(--ease), filter .3s ease;
}
.tile__overlay {
  position: absolute;
  inset: 0;
  background: var(--highlight);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

/* Shown on keyboard focus, and while a finger is on the tile (.is-pressed) */
.tile:focus-visible .tile__overlay,
.tile.is-pressed .tile__overlay { opacity: 1; }
.tile:focus-visible .tile__media img,
.tile.is-pressed .tile__media img { transform: scale(1.03); filter: brightness(var(--highlight-brightness)); }
.tile:focus-visible { outline-offset: 4px; }

/* Mouse hover (only on devices that really hover, so it never "sticks" on touch screens) */
@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile__overlay { opacity: 1; }
  .tile:hover .tile__media img { transform: scale(1.03); filter: brightness(var(--highlight-brightness)); }
}

/* ---------------------------------------------------------------- video */
.video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe, .video__poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__poster { display: block; cursor: pointer; }
.video__poster img { width: 100%; height: 100%; object-fit: cover; }
.video__play {
  position: absolute; left: 50%; top: 50%;
  width: 68px; height: 48px; transform: translate(-50%, -50%);
}
.video__play svg { width: 100%; height: 100%; display: block; }
.video__play-bg { fill: #212121; fill-opacity: .8; transition: fill .15s, fill-opacity .15s; }
.video__poster:hover .video__play-bg, .video__poster:focus-visible .video__play-bg { fill: #f00; fill-opacity: 1; }

/* ---------------------------------------------------------------- gallery / slideshow */
.gallery { position: relative; }
.gallery__stage { position: relative; background: rgba(175, 175, 175, .1); }
.gallery__track {
  list-style: none; margin: 0; padding: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  aspect-ratio: 16 / 9;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.gallery__slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.gallery__slide img { width: 100%; height: 100%; object-fit: contain; }

.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff; cursor: pointer;
  opacity: .85;
  transition: background .15s, opacity .15s;
}
.gallery__nav:hover { background: rgba(0, 0, 0, .6); opacity: 1; }
.gallery__nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.gallery__nav--prev { left: 12px; }
.gallery__nav--next { right: 12px; }
.gallery__nav[disabled] { opacity: .25; cursor: default; }

.gallery__count {
  position: absolute; right: 12px; bottom: 10px; margin: 0;
  padding: 2px 10px; border-radius: 12px;
  background: rgba(0, 0, 0, .45); color: #fff;
  font-size: 13px; font-weight: 300; letter-spacing: .08em;
}

/* Thumbnails: centred and wrapping onto more rows on desktop; a single swipeable row on phones */
.gallery__thumbs {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.gallery__thumb {
  position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer;
  width: 84px; height: 84px;
  opacity: .55; transition: opacity .2s ease;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb::after {                 /* the highlight frame: one element, only its opacity animates */
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 2px var(--link);
  opacity: 0; transition: opacity .2s ease;
  pointer-events: none;
}
.gallery__thumb:hover { opacity: .85; }
.gallery__thumb.is-active { opacity: 1; }
.gallery__thumb.is-active::after { opacity: 1; }
.gallery__thumb:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 2px; }

/* ---------------------------------------------------------------- rule & buttons */
.block-rule hr { border: 0; height: 1px; margin: 0; background: var(--rule); }

.button-row { margin: 0; text-align: center; }
.button { display: inline-block; text-align: center; text-transform: uppercase; letter-spacing: 1px; line-height: normal; cursor: pointer; }
.button--medium {
  padding: 21px 34px;
  font-family: var(--font); font-weight: 300; font-size: 15px;
  color: var(--btn-outline);
  border: 2px solid var(--btn-outline);
  background: transparent;
  transition: background-color .1s linear, color .1s linear;
}
.button--medium:hover { background: var(--btn-outline); color: #1d1d1d; }
.button--small {
  padding: 13px 26px;
  font-family: var(--font); font-weight: 600; font-size: 16px;
  color: var(--bg); background: #fff; border-radius: 3px;
  transition: opacity .1s linear;
}
.button--small:hover { color: var(--bg); opacity: .8; }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: 11px; padding: 17px; text-align: center; }
.social-link { display: inline-flex; padding: 8px; color: #fff; }
.social-link svg { width: 34px; height: 34px; }
.social-link svg { fill: currentColor; }
.social-link:hover { color: var(--link-hover); }

/* ==========================================================================
   Mobile & tablet (same breakpoint as the original template: 750px)
   ========================================================================== */
@media (max-width: 750px) {
  .canvas { margin: 0 auto; padding: 20px 16px; }
  .page { margin: 0; }
  .site-header { margin-bottom: 30px; }

  .logo { font-size: clamp(24px, 7.4vw, 34px); letter-spacing: 1px; }
  .logo-subtitle { font-size: clamp(16px, 4.8vw, 22px); letter-spacing: 1.5px; }

  /* Menu button + collapsible navigation */
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    margin: 22px 0 0; padding: 10px 18px; min-height: 44px;
    border: 1px solid rgba(107, 199, 245, .35); border-radius: 2px;
    background: transparent; color: var(--nav);
    font: 300 16px/1 var(--font); letter-spacing: .12em; text-transform: uppercase;
    cursor: pointer;
  }
  .menu-toggle__icon { position: relative; width: 18px; height: 12px; }
  .menu-toggle__icon span {
    position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor;
    transition: transform .25s var(--ease), opacity .2s;
  }
  .menu-toggle__icon span:nth-child(1) { top: 0; }
  .menu-toggle__icon span:nth-child(2) { top: 5.25px; }
  .menu-toggle__icon span:nth-child(3) { top: 10.5px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) { transform: translateY(5.25px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) { transform: translateY(-5.25px) rotate(-45deg); }

  /* The list is revealed like a curtain: only its visible height animates,
     the links themselves never move (block layout, no flex shrinking). */
  .js .main-nav {
    margin-top: 0;
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .3s var(--ease);
  }
  .js .main-nav > ul { overflow: hidden; min-height: 0; }
  .js .main-nav.is-open { grid-template-rows: 1fr; }
  .main-nav ul { display: block; }
  .main-nav li:first-child { margin-top: 12px; }
  .main-nav li { border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .main-nav li:first-child { border-top: 1px solid rgba(255, 255, 255, .08); }
  .main-nav a { display: block; padding: 12px 0; font-size: 17px; line-height: 1.4; }
  .main-nav .is-active > a { color: #fff; font-weight: 400; }

  /* Stack columns; drop spacer blocks */
  .row { display: block; }
  .col { width: auto !important; }
  .block-spacer { display: none; }
  .block { padding: 12px 0; }

  /* Readability: slightly heavier body text on small screens (Lexend 200 is very thin) */
  body { font-size: 17px; line-height: 1.65; }
  p, li { font-weight: 300; }
  h1 { font-size: clamp(26px, 7vw, 34px); }
  h2 { font-size: clamp(22px, 6.2vw, 30px); line-height: 1.15; }
  h3 { font-size: clamp(19px, 5.4vw, 25px); }
  ul, ol { padding-left: 28px; }
  .block-text ul > li > :first-child::before { margin-left: -28px; min-width: 28px; padding-right: 10px; }

  .back-link { margin: -14px 0 4px; padding: 0; font-size: 14px; }
  .back-link a { padding: 12px 0; }

  .tiles .block { padding: 8px 0; }

  .gallery__nav { width: 40px; height: 40px; }
  .gallery__nav--prev { left: 6px; }
  .gallery__nav--next { right: 6px; }
  .gallery__thumbs {
    flex-wrap: nowrap; justify-content: flex-start; gap: 6px;
    overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
    overscroll-behavior-x: contain;
  }
  .gallery__thumbs::-webkit-scrollbar { display: none; }
  .gallery__thumbs > li:first-child { margin-left: auto; }   /* centred when the row fits, */
  .gallery__thumbs > li:last-child { margin-right: auto; }   /* scrollable when it doesn't */
  .gallery__thumbs > li { flex: 0 0 auto; }
  .gallery__thumb { width: 64px; height: 64px; }

  .button--medium { padding: 18px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Footer text link (privacy) */
.footer-links { margin: 30px 0 0; font-size: 13px; font-weight: 300; letter-spacing: .06em; text-transform: uppercase; }
.footer-links a { color: rgba(245, 247, 250, .55); }
.footer-links a:hover { color: var(--link-hover); }
