/* Lylaa (lylaa.si) — hand-written styles. No frameworks, no external assets. */

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

/* Light theme is the default; dark overrides below. */

:root {
  color-scheme: light;

  --bg: #f6f7f9;
  --bg-image: radial-gradient(120% 90% at 50% -15%, rgba(122, 102, 224, 0.18), transparent 60%);
  --surface: #ffffff;
  --line: #e3e6ec;
  --text: #14171d;
  --body: #454c58;
  --muted: #7b828f;
  --accent: #5b48d8;
  --accent-hover: #4a38c4;
  --accent-ink: #ffffff;
  --ring: rgba(91, 72, 216, 0.45);
  --glow: rgba(20, 23, 29, 0.22);

  --wrap: 34rem;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0a0d16;
  --bg-image:
    radial-gradient(72% 52% at 10% -6%, rgba(116, 92, 240, 0.42), transparent 62%),
    radial-gradient(68% 48% at 94% 2%, rgba(40, 100, 196, 0.40), transparent 64%),
    radial-gradient(95% 58% at 50% 110%, rgba(214, 132, 58, 0.26), transparent 64%),
    linear-gradient(178deg, #101830 0%, #0a0f1c 46%, #080a11 100%);
  --surface: #14181e;
  --line: #232934;
  --text: #eceff4;
  --body: #aeb6c2;
  --muted: #7f8896;
  --accent: #a99bff;
  --accent-hover: #c2b8ff;
  --accent-ink: #14121f;
  --ring: rgba(169, 155, 255, 0.5);
  --glow: rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0a0d16;
    --bg-image:
      radial-gradient(72% 52% at 10% -6%, rgba(116, 92, 240, 0.42), transparent 62%),
      radial-gradient(68% 48% at 94% 2%, rgba(40, 100, 196, 0.40), transparent 64%),
      radial-gradient(95% 58% at 50% 110%, rgba(214, 132, 58, 0.26), transparent 64%),
      linear-gradient(178deg, #101830 0%, #0a0f1c 46%, #080a11 100%);
    --surface: #14181e;
    --line: #232934;
    --text: #eceff4;
    --body: #aeb6c2;
    --muted: #7f8896;
    --accent: #a99bff;
    --accent-hover: #c2b8ff;
    --accent-ink: #14121f;
    --ring: rgba(169, 155, 255, 0.5);
    --glow: rgba(0, 0, 0, 0.6);
  }
}

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--body);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 10px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 0 0 8px 0;
  font-size: 0.9375rem;
}

.skip-link:focus {
  left: 0;
  color: var(--accent-ink);
  text-decoration: none;
}

/* Header */

.site-header {
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
}

.brand {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.theme-switch label {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.theme-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.theme-switch .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.theme-switch label:hover .chip {
  color: var(--text);
}

.theme-switch input:checked + .chip {
  background: var(--accent);
  color: var(--accent-ink);
}

.theme-switch input:focus-visible + .chip {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.icon {
  display: block;
}

/* Hero */

main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
}

.hero {
  width: 100%;
  padding: clamp(0.75rem, 2.5vh, 1.5rem) 1.25rem clamp(1rem, 3vh, 2rem);
  display: flex;
  justify-content: center;
}

/* Height-driven so the whole page fits the viewport without scrolling. */

.portrait {
  position: relative;
  height: min(calc(100dvh - 14.5rem), 44rem);
  aspect-ratio: 800 / 1421;
  max-width: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: 0 32px 60px -32px var(--glow);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Translucent, slightly blurred panel sitting over the foot of the image. */

.overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  background: rgba(9, 11, 16, 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.overlay::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 4.5rem;
  background: linear-gradient(to top, rgba(9, 11, 16, 0.42), transparent);
  pointer-events: none;
}

.overlay h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  color: #ffffff;
}

.overlay .lead {
  max-width: 26ch;
  margin: 0 auto 0.5rem;
  font-size: clamp(1rem, 3.2vw, 1.125rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.93);
}

.overlay .sub {
  margin: 0 auto;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.72);
}

.overlay .sub a {
  color: #c5bbff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.overlay .sub a:hover {
  color: #ffffff;
}

.overlay .contact {
  margin: 1.25rem 0 0;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Simple centred message, used by the 404 page. */

.notice {
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
}

.notice h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 6vw, 2.25rem);
}

.notice p {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.notice .contact {
  margin: 1.5rem 0 0;
}

/* Footer */

.site-footer {
  flex: 0 0 auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-legal,
.footer-contact {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
