/* Selma Mujan Musić — shared styles.
   Palette taken from her portrait: the blazer blue, the black top, warm skin and auburn hair.
   Soft drifting glows behind big type, a wall light switch for dark mode. */
:root {
  --bg: #f3f6fb;
  --bg-2: #e6edf7;
  --card: #ffffff;
  --fg: #10203a;
  --muted: #56627a;
  --line: #d6dfec;
  --accent: #2f6db5;
  --accent-ink: #ffffff;
  --warm: #c9774a;
  --glow-a: #8fb8ea;
  --glow-b: #c3dbf6;
  --glow-c: #f2c6ae;
  --glow-alpha: .6;
  --shadow: 0 18px 50px -24px rgba(16, 32, 58, .35);
  --display: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --radius: 22px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1424; --bg-2: #13203a; --card: #13203a; --fg: #eef3fb; --muted: #9eabc4; --line: #22324f;
    --accent: #8cb9f3; --accent-ink: #0b1424; --warm: #f0a77e; --glow-a: #1f4f8f; --glow-b: #173a6b; --glow-c: #6b3b2b; --glow-alpha: .5;
    --shadow: 0 18px 50px -24px rgba(0, 0, 0, .7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1424; --bg-2: #13203a; --card: #13203a; --fg: #eef3fb; --muted: #9eabc4; --line: #22324f;
  --accent: #8cb9f3; --accent-ink: #0b1424; --warm: #f0a77e; --glow-a: #1f4f8f; --glow-b: #173a6b; --glow-c: #6b3b2b; --glow-alpha: .5;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, .7); color-scheme: dark;
}

@view-transition { navigation: auto; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 17px; line-height: 1.6; transition: background-color .5s ease, color .5s ease; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.todo { color: #b4570f; border-bottom: 1px dashed currentColor; }

/* drifting glows behind every page */
.glows { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.glows span { position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%; filter: blur(70px); opacity: var(--glow-alpha); transition: background .6s ease, opacity .6s ease; }
.glows span:nth-child(1) { background: var(--glow-a); top: -22vmax; left: -10vmax; animation: drift1 26s ease-in-out infinite alternate; }
.glows span:nth-child(2) { background: var(--glow-b); top: 10vmax; right: -24vmax; animation: drift2 32s ease-in-out infinite alternate; }
.glows span:nth-child(3) { background: var(--glow-c); bottom: -30vmax; left: 20vmax; animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-16vmax, 14vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-14vmax, -16vmax) scale(1.15); } }

/* header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; padding-block: 14px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.logo i { font-style: normal; color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: color-mix(in srgb, var(--card) 72%, transparent); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--line); }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 16px; border-radius: 999px; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.header-end { display: flex; align-items: center; gap: 12px; }

/* light switch (theme toggle) */
.switch { width: 42px; height: 42px; border: 0; padding: 0; border-radius: 9px; cursor: pointer; display: grid; place-items: center; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.switch .rocker { width: 20px; height: 22px; border-radius: 3px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); position: relative; transition: transform .25s ease; }
.switch .led { position: absolute; left: 50%; top: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #9aa19f; transition: background .3s, box-shadow .3s; }
:root[data-theme="dark"] .switch .led { background: #f3c57a; box-shadow: 0 0 8px #f3c57a; }
:root[data-theme="dark"] .switch .rocker { transform: perspective(60px) rotateX(16deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .switch .led { background: #f3c57a; box-shadow: 0 0 8px #f3c57a; } }

/* buttons, pills */
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 16px; padding: 14px 24px; border-radius: 999px; border: 1.5px solid var(--fg); background: transparent; cursor: pointer; transition: transform .25s ease, background .25s, color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn.solid { background: var(--fg); color: var(--bg); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--card) 80%, transparent); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 500; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #2fae74; box-shadow: 0 0 0 0 rgba(47, 174, 116, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(47, 174, 116, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 174, 116, 0); } }

/* page title block used on inner pages */
.page-head .wrap { padding-block: 64px 40px; }
.page-head h1 { font-size: clamp(39px, 7.7vw, 105px); font-weight: 700; letter-spacing: -.03em; line-height: .9; }
.page-head p.lede { margin-top: 22px; font-size: 20px; color: var(--muted); max-width: 34em; }

/* word-by-word entrance on big headings */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; }
.split .w > span { display: inline-block; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 70ms + 80ms); }
@keyframes rise { from { transform: translateY(105%); } }

/* reveal on scroll (only for things below the first screen; set by script) */
.pre { opacity: 0; transform: translateY(28px); }
.shown { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 18px; background: color-mix(in srgb, var(--card) 50%, transparent); }
.marquee .track { display: flex; width: max-content; gap: 40px; animation: slide 32s linear infinite; font-family: var(--display); font-size: clamp(18px, 2.8vw, 31px); font-weight: 700; white-space: nowrap; }
.marquee .track span:nth-child(even) { color: var(--accent); }
@keyframes slide { to { transform: translateX(-50%); } }

/* photo + caption */
figure { margin: 0; }
.photo { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.exif { margin-top: 10px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* project cards */
.card { position: relative; display: flex; flex-direction: column; gap: 16px; text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; min-width: 0; width: 100%; }
.card .photo { aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.card:hover .photo img { transform: scale(1.05); }
.card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card h3 { font-size: clamp(20px, 2.2vw, 27px); font-weight: 700; }
.card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--card) 85%, transparent); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); }

/* cursor bubble on cards */
.cursor { position: fixed; left: 0; top: 0; z-index: 50; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-weight: 600; font-size: 14px; pointer-events: none; transform: scale(0); transition: transform .25s ease; }
.cursor.on { transform: scale(1); }
@media (hover: none) { .cursor { display: none; } }

/* sections */
.section { padding-block: 96px 24px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4.5vw, 62px); font-weight: 700; letter-spacing: -.03em; }
.section-head p { max-width: 26em; color: var(--muted); }

/* CTA band */
.cta-band { margin-block: 96px 48px; }
.cta-band .inner { position: relative; overflow: hidden; border-radius: 32px; background: var(--fg); color: var(--bg); padding: clamp(36px, 7vw, 88px); display: grid; gap: 28px; }
.cta-band .inner::after { content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -200px; border-radius: 50%; background: radial-gradient(closest-side, var(--glow-a), transparent); opacity: .55; pointer-events: none; }
.cta-band h2 { font-size: clamp(29px, 5.2vw, 73px); font-weight: 700; letter-spacing: -.03em; max-width: 11em; position: relative; }
.cta-band .btn { border-color: var(--bg); color: var(--bg); position: relative; justify-self: start; }
.cta-band .btn.solid { background: var(--bg); color: var(--fg); }
.cta-band .row { display: flex; gap: 12px; flex-wrap: wrap; position: relative; }

/* footer */
.site-footer .wrap { padding-block: 32px 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; color: var(--muted); font-size: 15px; }
.site-footer a:hover { color: var(--fg); }

@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .nav a { padding: 8px 12px; font-size: 14px; }
  .section { padding-block: 64px 16px; }
}
/* Animations stay on even when the system asks for reduced motion: the owner wants them visible. */

/* image lightbox, used by [data-zoom] */
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: min(1200px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: visible; }
dialog.lightbox::backdrop { background: rgba(8, 14, 26, .78); backdrop-filter: blur(6px); }
dialog.lightbox[open] { animation: lb-in .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes lb-in { from { transform: scale(.96); opacity: 0; } }
dialog.lightbox img { max-height: calc(100vh - 110px); width: auto; border-radius: 14px; margin: 0 auto; }
dialog.lightbox p { color: #eef3fb; text-align: center; margin-top: 12px; font-size: 15px; }
dialog.lightbox .x { position: absolute; top: -14px; right: -14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: #10203a; font-size: 20px; cursor: pointer; }
[data-zoom] { cursor: zoom-in; }

/* CV band shared at the bottom of pages */
.cv { margin-block: 24px 64px; }
.cv .inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 30px; border-radius: var(--radius); background: color-mix(in srgb, var(--card) 85%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.cv b { font-family: var(--display); font-size: 24px; font-weight: 700; display: block; }
.cv span.sub { color: var(--muted); font-size: 15px; }
