@font-face {
  font-family: "Nordic Alternative";
  src: url("fonts/Nordic Alternative Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Koliko";
  src: url("fonts/koliko-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg: #ffffff;
  --text: #262626;
  --grid-bg: #f0f0f0;
}

[data-theme="dark"] {
  --bg: #121212;
  --text: #f0f0f0;
  --grid-bg: #1e1e1e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-header {
  position: relative;
  z-index: 30;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 16px 16px;
}

.logo-intro {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: visible;
  height: clamp(80px, 13vw, 115px);
  margin-bottom: 12px;
}

.profile-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(80px, 13vw, 115px);
  height: clamp(80px, 13vw, 115px);
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--text);
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
}

.profile-circle::before,
.profile-circle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--text);
}

.profile-circle::before {
  width: 28px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.profile-circle::after {
  width: 2px;
  height: 28px;
  transform: translate(-50%, -50%);
}

.profile-circle.has-photo::before,
.profile-circle.has-photo::after {
  display: none;
}

.profile-circle.show {
  visibility: visible;
  animation: profile-circle-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes profile-circle-in {
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.logo-mark {
  display: block;
  width: clamp(80px, 13vw, 115px);
  height: auto;
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: filter 0.2s ease;
}

[data-theme="dark"] .logo-mark {
  filter: invert(1);
}

.logo-mark.appear {
  animation: logo-appear 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes logo-appear {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-title {
  margin: 0;
  width: clamp(160px, 42vw, 320px);
  aspect-ratio: 320 / 100;
}

.site-title svg {
  width: 100%;
  height: 100%;
  display: block;
}

.site-title-text {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif;
  font-size: 72px;
  font-weight: 600;
  letter-spacing: 4px;
  fill: var(--text);
  fill-opacity: 0;
  stroke: var(--text);
  stroke-width: 0.75;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation:
    draw-title 2.2s ease forwards,
    fill-title 1s ease-in forwards 1.6s;
}

@keyframes draw-title {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fill-title {
  to {
    fill-opacity: 1;
  }
}

.contact-btn {
  position: absolute;
  right: 0;
  border: 1px solid var(--text);
  border-radius: 4px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.8s ease;
}

body.revealed .contact-btn {
  opacity: 1;
  pointer-events: auto;
}

.contact-btn:hover {
  background: var(--text);
  color: var(--bg);
}

.header-left {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

body.revealed .header-left {
  opacity: 1;
  pointer-events: auto;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--text);
  border-radius: 4px;
  background: none;
  cursor: pointer;
}

.theme-toggle-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #000;
  border: 1px solid var(--text);
}

[data-theme="dark"] .theme-toggle-dot {
  background: #fff;
}

.lang-dropdown {
  position: relative;
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 2px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.lang-caret {
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid var(--text);
  transition: transform 0.15s ease;
}

.lang-dropdown.open .lang-caret {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(4px);
  margin: 0;
  padding: 8px 0;
  min-width: 140px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--text);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.lang-dropdown.open .lang-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(8px);
}

.lang-menu li a {
  display: block;
  padding: 8px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.15s ease;
}

.lang-menu li a:hover {
  background: var(--grid-bg);
}

.subtitle-dropdown {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 8px;
  opacity: 0;
}

body.revealed .subtitle-dropdown {
  animation: fade-subtitle 0.8s ease forwards;
}

@keyframes fade-subtitle {
  to {
    opacity: 1;
  }
}

.site-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 0;
  border: none;
  background: none;
  text-align: center;
  font-family: "Futura", "Trebuchet MS", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 10px;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
}

.subtitle-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text);
  transition: transform 0.15s ease;
}

.subtitle-dropdown.open .subtitle-caret {
  transform: rotate(180deg);
}

.subtitle-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 4px);
  margin: 0;
  padding: 8px 0;
  min-width: 180px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--text);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.subtitle-dropdown.open .subtitle-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 8px);
}

.subtitle-menu li a {
  display: block;
  padding: 8px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.15s ease;
}

.subtitle-menu li a:hover {
  background: var(--grid-bg);
}

.grid {
  max-width: 1200px;
  margin: 48px auto 60px;
  padding: 0 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

body.revealed .grid {
  opacity: 1;
  pointer-events: auto;
}

.grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--grid-bg);
  cursor: pointer;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.grid-item:hover img {
  transform: scale(1.03);
}

.contact-main {
  max-width: 480px;
  margin: 24px auto 80px;
  padding: 0 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

body.revealed .contact-main {
  opacity: 1;
  pointer-events: auto;
}

/* Repeat visits within the same session (e.g. clicking Contact, then Home)
   skip the intro animation entirely — everything appears already settled. */
body.no-intro .site-title-text {
  animation: none;
  stroke-dashoffset: 0;
  fill-opacity: 1;
}

body.no-intro .profile-circle {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

body.no-intro .contact-btn,
body.no-intro .header-left,
body.no-intro .subtitle-dropdown,
body.no-intro .grid,
body.no-intro .contact-main {
  opacity: 1;
  pointer-events: auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
}

.contact-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--text);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

.contact-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.contact-submit {
  align-self: flex-start;
  border: 1px solid var(--text);
  border-radius: 4px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.contact-submit:hover {
  background: var(--text);
  color: var(--bg);
}

.contact-submit:disabled {
  opacity: 0.5;
  cursor: default;
  background: none;
  color: var(--text);
}

.contact-status {
  margin: 0;
  font-size: 13px;
}

.contact-status.success {
  color: #2e7d32;
}

[data-theme="dark"] .contact-status.success {
  color: #81c784;
}

.contact-status.error {
  color: #c62828;
}

[data-theme="dark"] .contact-status.error {
  color: #ef9a9a;
}

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text);
  opacity: 0.6;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 600px) {
  .site-header {
    padding: 56px 16px 16px;
  }

  .contact-btn {
    padding: 5px 12px;
    font-size: 13px;
  }

  .header-left {
    gap: 6px;
  }

  .theme-toggle,
  .lang-toggle {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .logo-intro {
    height: clamp(56px, 16vw, 80px);
  }

  .logo-mark {
    width: clamp(56px, 16vw, 80px);
  }

  .profile-circle {
    width: clamp(56px, 16vw, 80px);
    height: clamp(56px, 16vw, 80px);
  }

  .site-title-text {
    font-size: 64px;
    letter-spacing: 1px;
  }

  .grid {
    gap: 2px;
    padding: 0 2px;
  }
}
