@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

html {
  box-sizing: border-box;
  height: 100%;
  background: #000;
  overscroll-behavior: none;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100%;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
}

/* Page System */
.page {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: none;
}

.page.active {
  display: block;
}

/* Homepage Background */
#homepage {
  background-image: url('./media/IMG_4681.jpg');
  background-size: cover;
  background-position: center;
}

#homepage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
}

/* Content Pages - Video Background */
.content-page {
  position: relative;
  background: #000;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.content-page::before {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: rgba(255, 255, 255, 0.75);
  z-index: 1;
  pointer-events: none;
}

/* Header */
.header {
  margin: clamp(30px, 8vw, 100px) clamp(20px, 8vw, 200px);
  position: relative;
  z-index: 10;
}

.main-logo {
  max-width: clamp(145px, 24vw, 250px);
  display: block;
  transition: transform 0.15s ease-out, filter 0.15s;
  filter: contrast(1.1);
}

.main-logo:hover {
  transform: scale(1.03) rotate(-1deg);
  filter: contrast(1.2);
}

.navigation-list {
  list-style: none;
  padding: 0;
  margin: clamp(20px, 5vw, 30px) 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(8px, 2vw, 15px);
}

.navigation-list a {
  text-decoration: none;
  display: block;
  transition: transform 0.1s ease-out;
  filter: contrast(1.1);
}

.navigation-list a:hover img {
  transform: translateX(8px) rotate(1deg);
  filter: contrast(1.2) brightness(0.95);
}

.navigation-list a:active img {
  animation: clickPulse 0.4s ease-out;
}

@keyframes clickPulse {
  0% {
    transform: translateX(8px) rotate(1deg) scale(1);
  }
  50% {
    transform: translateX(8px) rotate(1deg) scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: translateX(8px) rotate(1deg) scale(1);
    opacity: 1;
  }
}

/* Nav images */
.about-pic,
.works-pic,
.contact-pic {
  width: clamp(53px, 8.8vw, 76px);
  height: auto;
  display: block;
}

/* Page Header */
.page-header {
  width: clamp(120px, 20vw, 230px);
  height: auto;
  margin: 0 0 clamp(30px, 5vw, 50px) 0;
}

/* Back Button */
.back-button {
  position: fixed;
  top: clamp(20px, 5vw, 40px);
  left: clamp(20px, 5vw, 40px);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: clamp(8px, 2vw, 12px) clamp(15px, 3vw, 20px);
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 300;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s ease;
  text-transform: lowercase;
  letter-spacing: 1px;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(-3px);
}

.back-button:active {
  transform: translateX(-5px) scale(0.98);
}

/* Content Wrapper */
.content-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(80px, 12vw, 120px) clamp(20px, 5vw, 60px) clamp(40px, 8vw, 80px);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.content-wrapper::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* About Page */
.bio {
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.8;
  margin-bottom: clamp(40px, 6vw, 60px);
  font-weight: 300;
  max-width: 800px;
}

.name-section {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(16px, 3vw, 28px);
}

.propernoun-img {
  width: min(100%, 740px);
  height: auto;
  display: block;
}

.readings-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(12px, 2.8vw, 26px);
  margin-top: clamp(8px, 2vw, 16px);
  margin-bottom: clamp(30px, 5vw, 50px);
}

.readings-img {
  width: min(100%, 640px);
  height: auto;
  display: block;
}

.contempr-img {
  width: min(100%, 460px);
  height: auto;
  display: block;
  align-self: flex-end;
}

.cv-download-section {
  display: flex;
  justify-content: center;
  margin-top: clamp(62px, 11vw, 120px);
  margin-bottom: clamp(20px, 4vw, 36px);
}

.cv-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.cv-download-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.03) contrast(1.02);
}

.cv-download-button:active {
  transform: translateY(0);
  filter: saturate(0.99);
}

.cv-download-button:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.6);
  outline-offset: 2px;
}

.cv-logo-gif {
  width: min(100%, 210px);
  height: auto;
  display: block;
}

/* Works Page */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 34px);
  align-items: start;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: clamp(12px, 2vw, 16px);
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: rgba(255, 255, 255, 0.52);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  min-width: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.work-card::before {
  content: '';
  position: absolute;
  width: clamp(28px, 3.8vw, 42px);
  height: clamp(28px, 3.8vw, 42px);
  pointer-events: none;
  z-index: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.work-card::after {
  content: '';
  position: absolute;
  width: clamp(28px, 3.8vw, 42px);
  height: clamp(28px, 3.8vw, 42px);
  pointer-events: none;
  z-index: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.work-card:nth-child(odd)::before {
  top: -12px;
  left: -10px;
}

.work-card:nth-child(odd)::after {
  bottom: -12px;
  right: -10px;
}

.work-card:nth-child(even)::before {
  top: -12px;
  right: -10px;
}

.work-card:nth-child(even)::after {
  bottom: -12px;
  left: -10px;
}

.work-card:nth-child(4n + 1)::before {
  background-image: url('./media/leftoben.gif');
}

.work-card:nth-child(4n + 1)::after {
  background-image: url('./media/unten%20right.gif');
}

.work-card:nth-child(4n + 2)::before {
  background-image: url('./media/oben%20right.gif');
}

.work-card:nth-child(4n + 2)::after {
  background-image: url('./media/unten%20left.gif');
}

.work-card:nth-child(4n + 3)::before {
  background-image: url('./media/oben%20left%201.gif');
}

.work-card:nth-child(4n + 3)::after {
  background-image: url('./media/round%20unten%20right.gif');
}

.work-card:nth-child(4n)::before {
  background-image: url('./media/leftoben.gif');
}

.work-card:nth-child(4n)::after {
  background-image: url('./media/unten%20left.gif');
}

.work-card:nth-child(4)::before {
  background-image: url('./media/round%20unten%20right.gif');
}

.work-card > * {
  position: relative;
  z-index: 1;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 0, 0, 0.38);
  background: rgba(255, 255, 255, 0.66);
}

.work-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.24);
  text-decoration: none;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.work-card:hover .work-thumb img {
  transform: scale(1.02);
}

.work-thumb-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.youtube-thumb {
  background: #111;
}

.youtube-thumb.is-fallback {
  filter: saturate(0.97) contrast(1.03);
}

.youtube-thumb.is-low-res {
  filter: saturate(0.95) contrast(1.02) brightness(0.98);
}

.work-meta {
  font-size: clamp(11px, 1.3vw, 12px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #444;
  margin: 2px 0 0;
}

.work-card h4 {
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 400;
  margin: 0;
  text-transform: lowercase;
  line-height: 1.25;
}

.work-context {
  font-size: clamp(12px, 1.7vw, 14px);
  font-style: italic;
  color: #444;
  margin: 0;
}

.work-card p {
  font-size: clamp(12px, 1.7vw, 14px);
  font-weight: 300;
  color: #333;
  margin: 0;
  line-height: 1.5;
}

.work-open {
  width: fit-content;
  margin-top: 2px;
  font-size: clamp(11px, 1.4vw, 12px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
}

.work-open:hover {
  border-bottom-color: rgba(0, 0, 0, 0.85);
}

/* Contact Page */
.contact-info {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: clamp(240px, 48vh, 460px);
  width: 100%;
  transform: translateY(clamp(-72px, -8vh, -28px));
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(16px, 3vw, 22px);
}

.contact-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(10px, 2vw, 16px);
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.contact-item:hover {
  transform: translateX(3px);
}

.contact-item:active {
  transform: translateX(2px) scale(0.98);
}

.contact-item:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.65);
  outline-offset: 2px;
}

.email-clean-gif {
  width: clamp(36px, 7vw, 58px);
  height: auto;
  display: block;
}

.click-ornament-gif {
  width: clamp(36px, 6vw, 52px);
  height: auto;
  display: block;
  margin-left: clamp(3px, 0.8vw, 8px);
  transform: translate(-18px, -20px);
}

.gmail-gif {
  width: clamp(190px, 44vw, 334px);
  height: auto;
  display: block;
}

.insta-logo-gif {
  width: clamp(42px, 8vw, 66px);
  height: auto;
  display: block;
}

.inst-text-gif {
  width: clamp(126px, 30vw, 198px);
  height: auto;
  display: block;
}

.copy-email-button {
  cursor: copy;
}

.copy-email-button.is-copied {
  opacity: 0.65;
}

.copy-feedback {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  padding: 3px 8px;
  border: 1px solid rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.copy-email-button.is-copied .copy-feedback {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  body {
    overflow: hidden;
  }

  .content-page {
    height: 100vh;
    height: 100dvh;
    background: transparent;
  }

  .bg-video,
  .content-page::before {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
  }

  .header {
    margin: 20px;
  }

  .content-wrapper {
    height: 100vh;
    height: 100dvh;
    padding: 80px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(22px, 4vw, 34px);
  }

  .work-card::before {
    width: clamp(22px, 6vw, 32px);
    height: clamp(22px, 6vw, 32px);
  }

  .work-card::after {
    width: clamp(22px, 6vw, 32px);
    height: clamp(22px, 6vw, 32px);
  }

  .work-card:nth-child(odd)::before {
    top: -8px;
    left: -7px;
  }

  .work-card:nth-child(odd)::after {
    bottom: -8px;
    right: -7px;
  }

  .work-card:nth-child(even)::before {
    top: -8px;
    right: -7px;
  }

  .work-card:nth-child(even)::after {
    bottom: -8px;
    left: -7px;
  }

  .about-pic,
  .works-pic,
  .contact-pic {
    width: 58px;
  }

  .page-header {
    width: clamp(96px, 24vw, 150px);
  }

  .readings-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .contempr-img {
    width: min(100%, 420px);
  }
}

@media (max-width: 480px) {
  .main-logo {
    max-width: 120px;
  }

  .about-pic,
  .works-pic,
  .contact-pic {
    width: 53px;
  }

  .back-button {
    font-size: 14px;
    padding: 8px 12px;
  }

  .page-header {
    width: 86px;
  }
}
