@import url('https://fonts.googleapis.com/css2?family=Freeman&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #ffffff;
  --text: #000000;
  --text-secondary: #333333;
  --text-muted: #666666;
  --text-faint: #999999;
  --text-footer: rgba(0, 0, 0, 0.38);
  --border: #eeeeee;
  --icon-filter: none;
  --page-gutter: clamp(16px, 5vw, 64px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --chrome-glass-bg: rgba(255, 255, 255, 0.42);
  --chrome-glass-border: rgba(0, 0, 0, 0.04);
  --chrome-glass-blur: 12px;
  --chrome-bar-height: 56px;
}

[data-theme="dark"] {
  --bg: #0f0f12;
  --text: #f2f2f4;
  --text-secondary: #c8c8d0;
  --text-muted: #9a9aa8;
  --text-faint: #6e6e7a;
  --text-footer: rgba(242, 242, 244, 0.38);
  --border: #2a2a32;
  --icon-filter: invert(1) brightness(1.15);
  --chrome-glass-bg: rgba(18, 18, 22, 0.55);
  --chrome-glass-border: rgba(255, 255, 255, 0.06);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--page-gutter) + var(--safe-left)) 0 calc(var(--page-gutter) + var(--safe-right));
  min-height: 100vh;
  position: relative;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  min-height: calc(var(--chrome-bar-height) + var(--safe-top));
  padding: var(--safe-top) 0 0;
  box-sizing: border-box;
  isolation: isolate;
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: var(--chrome-glass-bg);
  backdrop-filter: blur(var(--chrome-glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--chrome-glass-blur)) saturate(160%);
  border-bottom: 1px solid transparent;
  transition:
    opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.nav.chrome-glass--active::before {
  opacity: 1;
  border-bottom-color: var(--chrome-glass-border);
}

/* Home page — slight top offset, internal layout unchanged */
body:not(.section-page) .nav {
  top: 10px;
}

.nav__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--page-gutter) + var(--safe-left)) 0 calc(var(--page-gutter) + var(--safe-right));
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.nav__avatar-link {
  display: flex;
  line-height: 0;
  transition: opacity 0.2s ease;
}

.nav__avatar-link:hover {
  opacity: 0.75;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav__link {
  font-family: 'Freeman', cursive;
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav__link:hover {
  opacity: 0.6;
}

/* Main layout */
.landing {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 100px 0 140px;
}

/* Hero */
.hero {
  text-align: center;
  max-width: 640px;
  z-index: 2;
  transform: translateY(-56px);
}

.hero__title {
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero__bio {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 28px;
}

.hero__location {
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
}

/* Sticky notes */
.notes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.note {
  position: absolute;
  pointer-events: auto;
  transition: transform 0.25s ease;
  filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.12));
}

.note:hover {
  transform: scale(1.05) !important;
}

.note img {
  display: block;
  width: 100%;
  height: auto;
}

.note--my-takes {
  top: calc(50vh - 248px);
  left: max(var(--page-gutter), calc(50vw - 536px));
  width: clamp(118px, 13.5vw, 186px);
  transform: rotate(-6deg);
}

.note--profession {
  top: calc(50vh - 268px);
  right: 11%;
  width: clamp(132px, 15vw, 228px);
  transform: rotate(5deg);
}

.note--photography {
  top: calc(50vh + 96px);
  left: 26%;
  width: clamp(124px, 14vw, 198px);
  transform: rotate(-4deg);
}

.note--passion {
  top: calc(50vh + 126px);
  right: 22%;
  width: clamp(124px, 14vw, 198px);
  transform: rotate(4deg);
}

/* Section pages */
.section {
  min-height: 100vh;
  padding: 120px 0 80px;
  max-width: 720px;
}

.section__back {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.section__back:hover {
  color: var(--text);
}

.section__title {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section__title--my-takes { color: #3abbb3; }
.section__title--profession { color: #855f81; }
.section__title--photography { color: #53c2ee; }
.section__title--passion { color: #f39852; }
.section__title--about-me { color: var(--text); }

.section__intro {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.section__content {
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0 0 32px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
}

.section-divider--my-takes {
  color: #3abbb3;
}

.section-divider--my-takes::before,
.section-divider--my-takes::after {
  background: linear-gradient(90deg, transparent, rgba(58, 187, 179, 0.45), transparent);
}

.section-divider--photography {
  color: #53c2ee;
}

.section-divider--photography::before,
.section-divider--photography::after {
  background: linear-gradient(90deg, transparent, rgba(83, 194, 238, 0.45), transparent);
}

.section__placeholder {
  font-size: 15px;
  color: var(--text-faint);
}

.footer {
  position: fixed;
  bottom: calc(28px + var(--safe-bottom));
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-footer);
  letter-spacing: 0.03em;
  z-index: 5;
  pointer-events: none;
}

/* Page toolbar — section screens */
.section-page .nav {
  display: none;
}

.section-page .footer {
  position: relative;
  bottom: auto;
  padding: 8px 0 calc(28px + var(--safe-bottom));
}

.page-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: calc(var(--chrome-bar-height) + var(--safe-top));
  padding: var(--safe-top) calc(var(--page-gutter) + var(--safe-right)) 0 calc(var(--page-gutter) + var(--safe-left));
  box-sizing: border-box;
  isolation: isolate;
  pointer-events: none;
}

.page-toolbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: var(--chrome-glass-bg);
  backdrop-filter: blur(var(--chrome-glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--chrome-glass-blur)) saturate(160%);
  border-bottom: 1px solid transparent;
  transition:
    opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.page-toolbar.chrome-glass--active::before {
  opacity: 1;
  border-bottom-color: var(--chrome-glass-border);
}

.page-toolbar__btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 0;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.page-toolbar__btn:hover {
  opacity: 0.65;
}

.page-toolbar__icon {
  width: 32px;
  height: 32px;
  display: block;
  filter: var(--icon-filter);
  transition: filter 0.25s ease;
}

html.page-enter-pending .page,
html.page-enter-pending .page-toolbar,
html.page-enter-pending .notes {
  opacity: 0;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.chrome-glass--active::before,
  .page-toolbar.chrome-glass--active::before {
    background: rgba(255, 255, 255, 0.94);
  }

  [data-theme="dark"] .nav.chrome-glass--active::before,
  [data-theme="dark"] .page-toolbar.chrome-glass--active::before {
    background: rgba(18, 18, 22, 0.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav::before,
  .page-toolbar::before {
    transition: none;
  }
}

/* Responsive — laptop / tablet */
@media (max-width: 1024px) {
  .note--my-takes {
    left: max(var(--page-gutter), calc(50vw - 520px));
  }

  .note--profession {
    right: 8%;
  }
}

@media (max-width: 900px) {
  .note--my-takes {
    top: calc(50vh - 210px);
    left: max(var(--page-gutter), calc(50vw - 560px));
    width: clamp(90px, 18vw, 140px);
  }

  .note--profession {
    top: calc(50vh - 225px);
    right: 9%;
    width: clamp(100px, 20vw, 160px);
  }

  .note--photography {
    top: calc(50vh + 72px);
    left: 22%;
    width: clamp(95px, 19vw, 150px);
  }

  .note--passion {
    top: calc(50vh + 96px);
    right: 18%;
    width: clamp(95px, 19vw, 150px);
  }

  .section {
    padding: 110px 0 72px;
  }
}

/* Tablet — stack sticky notes below hero */
@media (max-width: 768px) {
  .landing {
    padding: calc(116px + var(--safe-top)) 0 calc(100px + var(--safe-bottom));
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100svh;
  }

  .hero {
    margin-bottom: 28px;
    transform: none;
    max-width: 100%;
  }

  .notes {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
    max-width: min(360px, 100%);
    margin-top: 8px;
    pointer-events: auto;
  }

  .note {
    position: relative;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    justify-self: center;
  }

  .note--my-takes {
    transform: rotate(-4deg);
  }

  .note--profession {
    transform: rotate(3deg);
  }

  .note--photography {
    transform: rotate(-3deg);
  }

  .note--passion {
    transform: rotate(3deg);
  }
}

@media (max-width: 600px) {
  :root {
    --chrome-bar-height: 52px;
  }

  .nav__inner {
    gap: 12px;
  }

  .nav__avatar {
    width: 40px;
    height: 40px;
  }

  .nav__links {
    gap: 14px;
  }

  .nav__link {
    font-size: 15px;
  }

  .page-toolbar {
    gap: 12px;
  }

  .page-toolbar__icon {
    width: 28px;
    height: 28px;
  }

  .page-toolbar__btn {
    min-width: 44px;
    min-height: 44px;
  }

  .section {
    padding: calc(96px + var(--safe-top)) 0 calc(56px + var(--safe-bottom));
  }

  .section__intro {
    margin-bottom: 32px;
  }

  .section__content {
    padding-top: 24px;
  }

  .landing {
    padding-top: calc(128px + var(--safe-top));
  }
}

@media (max-width: 390px) {
  .nav__link {
    font-size: 14px;
  }

  .hero__title {
    font-size: 28px;
  }

  .notes {
    gap: 12px;
    max-width: 100%;
  }
}
