:root {
  color-scheme: dark;
  --ink: #0b1024;
  --ink-deep: #060a19;
  --paper: #f7f5ed;
  --glass: rgba(28, 38, 76, 0.46);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-edge: rgba(191, 213, 255, 0.2);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--ink-deep);
  color: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ==========================================================================
   LIQUID GLASS TOP NAVIGATION BAR & LOGO (LÅST VED SCROLL)
   ========================================================================== */

.site-header {
  position: fixed;
  top: 1.2rem;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}

/* Container til at holde logo og navigationsbar vertikalt centreret */
.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

/* Logo-link & Drop Shadow (magen til billede på om-mig) */
.logo-link {
  pointer-events: auto;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-link:hover {
  transform: scale(1.05);
}

.site-logo {
  height: 65px;
  width: auto;
  display: block;
  filter: 
    drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 20px rgba(255, 255, 255, 0.15));
}

.liquid-navbar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: rgba(11, 16, 36, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    0 12px 30px rgba(3, 6, 22, 0.45);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-navbar a {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  color: rgba(247, 245, 237, 0.85);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.liquid-navbar a:hover,
.liquid-navbar a:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  outline: none;
}

.liquid-navbar a[aria-current="page"] {
  background: rgba(94, 126, 207, 0.45);
  color: #ffffff;
}

/* ==========================================================================
   SCROLL ANIMATION FOR LOGO OG NAVIGATIONSBAR
   ========================================================================== */

.site-header.scrolled .logo-link {
  transform: scale(0.85);
  opacity: 0.9;
}

.site-header.scrolled .liquid-navbar {
  transform: scale(0.94) translateY(-4px);
  background: rgba(8, 12, 28, 0.82);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    0 20px 40px rgba(0, 0, 0, 0.6);
}

.site-header.scrolled .liquid-navbar a {
  padding: 0.5rem 0.95rem;
  font-size: 0.7rem;
}

/* ==========================================================================
   HERO OVERSKRIFT I MIDTEN AF SIDEN
   ========================================================================== */

.hero-section {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, #ffffff 0%, rgba(247, 245, 237, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-top: 0.8rem;
  color: rgba(247, 245, 237, 0.75);
  text-transform: uppercase;
}

/* ==========================================================================
   OM MIG SEKTION (UDEN BOKS / FIRKANTET BILLEDE MED DROP-SHADOW)
   ========================================================================== */

.about-section {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  padding: 8rem 0 4rem 0;
}

.about-layout {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.about-image-container {
  flex-shrink: 0;
  width: 260px;
  height: 280px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(255, 255, 255, 0.1);
  background: rgba(11, 16, 36, 0.4);
}

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

.about-content {
  color: var(--paper);
}

.about-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-top: 0;
  margin-bottom: 1.2rem;
  color: #ffffff;
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, #ffffff 0%, rgba(247, 245, 237, 0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(247, 245, 237, 0.9);
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   BAGGRUND CANVAS (FASTSTÅENDE UNDER SCROLL)
   ========================================================================== */

.page-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(217, 151, 133, 0.6), transparent 21%),
    radial-gradient(ellipse at 50% 39%, #56619c 0%, #31376d 20%, transparent 43%),
    linear-gradient(180deg, #6d384e 0%, #2b315f 25%, #111c3f 56%, #070d24 100%);
}

.page-canvas::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(ellipse at -5% 49%, rgba(240, 82, 159, 0.8), transparent 28%),
    radial-gradient(ellipse at 106% 52%, rgba(216, 48, 119, 0.75), transparent 28%),
    radial-gradient(ellipse at 50% 80%, rgba(68, 105, 69, 0.75), transparent 27%),
    linear-gradient(110deg, rgba(2, 9, 27, 0.68) 0 18%, transparent 41% 59%, rgba(3, 7, 23, 0.72) 87%);
  mix-blend-mode: screen;
  opacity: 0.78;
}

.page-canvas::after {
  position: absolute;
  inset: 0;
  z-index: 4;
  content: "";
  background: linear-gradient(180deg, rgba(3, 8, 26, 0.1), rgba(3, 8, 26, 0.02) 38%, rgba(3, 8, 26, 0.6));
  pointer-events: none;
}

.mist,
.ridge,
.bloom {
  position: absolute;
  pointer-events: none;
}

.mist {
  z-index: 1;
  border-radius: 50%;
  filter: blur(1.5rem);
  opacity: 0.4;
}

.mist-one {
  top: 15%;
  left: 20%;
  width: 42vw;
  height: 14vw;
  background: #e89aab;
}

.mist-two {
  top: 35%;
  right: 16%;
  width: 38vw;
  height: 12vw;
  background: #7994ca;
  opacity: 0.24;
}

.ridge {
  z-index: 2;
  width: 70%;
  background: linear-gradient(165deg, rgba(44, 73, 91, 0.72), rgba(5, 15, 37, 0.9));
  clip-path: polygon(0 100%, 11% 64%, 25% 78%, 41% 28%, 54% 61%, 67% 42%, 82% 75%, 100% 55%, 100% 100%);
}

.ridge-far {
  top: 32%;
  left: 16%;
  height: 34rem;
  opacity: 0.74;
}

.ridge-near {
  top: 53%;
  right: -12%;
  width: 78%;
  height: 46rem;
  background: linear-gradient(160deg, rgba(27, 59, 60, 0.88), rgba(4, 12, 29, 0.96));
  transform: scaleX(-1);
}

.bloom {
  z-index: 3;
  width: 36vw;
  height: 70svh;
  border-radius: 44% 56% 49% 51% / 40% 48% 52% 60%;
  background:
    radial-gradient(ellipse at 24% 16%, #fa8fbe 0 3%, transparent 3.5%),
    radial-gradient(ellipse at 65% 22%, #d6438b 0 4%, transparent 4.5%),
    radial-gradient(ellipse at 34% 43%, #e75c9d 0 7%, transparent 7.5%),
    radial-gradient(ellipse at 76% 55%, #b42f78 0 6%, transparent 6.5%),
    radial-gradient(ellipse at 15% 72%, #ee70aa 0 8%, transparent 8.5%),
    radial-gradient(ellipse at 61% 82%, #a32669 0 10%, transparent 10.5%),
    radial-gradient(ellipse, #243d48 0 30%, transparent 71%);
  filter: saturate(1.18) contrast(1.08);
  opacity: 0.96;
}

.bloom-left {
  bottom: -10%;
  left: -8%;
  transform: rotate(-14deg) scale(1.5);
}

.bloom-right {
  right: -8%;
  bottom: -7%;
  transform: rotate(17deg) scale(1.48) scaleX(-1);
}

/* ==========================================================================
   LIQUID GLASS CONTACT WIDGET
   ========================================================================== */

.apple-widget-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#main-apple-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(11, 16, 36, 0.45);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    0 12px 30px rgba(3, 6, 22, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

#main-apple-btn:hover {
  background: rgba(28, 38, 76, 0.6);
  transform: scale(1.05);
}

#btn-icon {
  font-size: 24px;
  color: var(--paper);
  transition: opacity 0.15s ease;
}

.widget-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92) translateY(15px);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.widget-options.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.apple-option-btn {
  padding: 11px 20px;
  border-radius: 30px;
  background: rgba(28, 38, 76, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 24px rgba(3, 6, 22, 0.3);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.apple-option-btn:hover {
  background: rgba(94, 126, 207, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateX(-4px);
}

.apple-option-btn .icon {
  font-size: 16px;
}

/* ==========================================================================
   AI CHAT BOX STYLING
   ========================================================================== */

.ai-chat-box {
  position: fixed;
  bottom: 105px;
  right: 30px;
  width: 340px;
  max-width: calc(100vw - 40px);
  height: 460px;
  max-height: 70vh;
  border-radius: 20px;
  background: rgba(11, 16, 36, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px rgba(3, 6, 22, 0.5);
  display: flex;
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.ai-chat-box.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--paper);
}

.ai-chat-close {
  background: none;
  border: none;
  color: var(--paper);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.7;
}

.ai-chat-close:hover {
  opacity: 1;
}

.ai-chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
}

.ai-msg.user {
  align-self: flex-end;
  background: rgba(94, 126, 207, 0.55);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.ai-msg.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.12);
  color: var(--paper);
  border-bottom-left-radius: 3px;
}

.ai-chat-input-area {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  gap: 8px;
}

.ai-chat-input-area input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 14px;
  color: #fff;
  outline: none;
  font-size: 0.88rem;
}

.ai-chat-input-area input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.ai-chat-input-area button {
  background: rgba(94, 126, 207, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBIL OG TABLET)
   ========================================================================== */

@media (max-width: 768px) {
  .site-header {
    top: 0.8rem;
    padding: 0 0.5rem;
  }

  .site-logo {
    height: 30px;
  }

  .liquid-navbar {
    overflow-x: auto;
    max-width: 100%;
    padding: 0.35rem 0.5rem;
    gap: 0.25rem;
  }

  .liquid-navbar a {
    padding: 0.5rem 0.7rem;
    font-size: 0.65rem;
  }

  .about-section {
    padding-top: 6rem;
  }

  .about-layout {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .about-image-container {
    width: 200px;
    height: 220px;
  }

  .apple-widget-container {
    bottom: 20px;
    right: 20px;
  }

  #main-apple-btn {
    width: 54px;
    height: 54px;
  }

  .ai-chat-box {
    right: 20px;
    bottom: 90px;
    width: calc(100vw - 40px);
  }
}
