<style>
body {
font-family: "Syne", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background-color: #ffffff;
color: #000000;
-webkit-font-smoothing: antialiased;
text-wrap: balance;
transition: background-color 0.3s ease;
}

/* Essential Utility Fallback */
.hidden { display: none !important; }

.text-18pt { font-size: 1.5rem; line-height: 1.1; font-weight: 500; }

/* --- COLOR SYSTEM --- */
:root {
/* Default Gray Fallback */
--theme-r: 244; --theme-g: 244; --theme-b: 245;
}

@view-transition { navigation: auto; }

/* Section Themes (RGB values) */
body.theme-work      { --theme-r: 113; --theme-g: 178; --theme-b: 226; } /* Blue   #71B2E2 */
body.theme-characters{ --theme-r: 238; --theme-g: 35;  --theme-b: 89;  } /* Red    #EE2359 */
body.theme-about     { --theme-r: 255; --theme-g: 204; --theme-b: 81;  } /* Yellow #FFCC51 */
body.theme-contact   { --theme-r: 0;   --theme-g: 178; --theme-b: 152; } /* Green  #00B298 */

/* Flexbox Masonry */
.masonry-container {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  width: 100%;
  justify-content: space-between;
}

.masonry-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 30%;
}



/* Item Styles */
.project-item {
  cursor: pointer;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  position: relative;
  background: #000;
  overflow: hidden;
  display: block;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  width: 100%;

  /* Step 2: Set your minimum aspect ratio target */
  aspect-ratio: 9 / 16; 

  /* Step 3: Keep height automatic so content can push it down */
  height: auto; 
}

.project-item img, .project-item video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.project-item:hover, .project-item:focus-visible {
  opacity: 0.5;
  outline: none;
}

.project-item:active {
  opacity: 0.1;
  filter: brightness(2);
}

/* Type Block */
.type-block {
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 50px 0;
  background: transparent;
}
.type-block-title { padding-bottom: 1rem; font-size: 28px; }
.type-block-body  { font-size: 0.875rem; color: #71717a; line-height: 1.5; max-width: 90%; }
.type-block-body p { margin-bottom: 0.75rem; }
.type-block-body p:last-child { margin-bottom: 0.5rem; }

/* Modal Styles */
#modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 1000;
  padding: 0;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: #fff;
  border: 12px solid #fff;
  box-shadow: 0 0 0 1px #000;
  max-width: 1400px;
  width: 95vw;
  height: 90vh;
  max-height: 90vh;
  margin: 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 100%;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.modal-content:focus { outline: none; }

/* CTA Mode Styles */
.modal-content.is-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.modal-content.is-cta #modal-media-container { display: none !important; }
.modal-content.is-cta .modal-text-container {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem;
}
.modal-content.is-cta .modal-text-container > div.mt-auto {
  margin-top: 0;
  margin-bottom: 0;
  width: 100%;
  max-width: 700px;
}

/* Modal Layout */
#btn-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 50;
}

#modal-media-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  overflow: hidden;
}

.modal-text-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow-y: auto;
  position: relative;
  height: 100%;
}

/* Sidebar */
.sidebar {
  width: 260px; height: 100vh;
  position: fixed; left: 0; top: 0;
  padding: 2.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
  z-index: 50;
  background: white;
}

main { margin-left: 260px; padding: 2.5rem; }

/* --- UNIFIED BUTTON SYSTEM --- */
.nav-link, .pill-button, .control-pill, .icon-btn {
  position: relative;
  text-decoration: none;
  background-color: transparent;
  border: none;
  color: #000;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  background-image:
    linear-gradient(90deg, #000 50%, transparent 50%),
    linear-gradient(90deg, #000 50%, transparent 50%),
    linear-gradient(0deg,  #000 50%, transparent 50%),
    linear-gradient(0deg,  #000 50%, transparent 50%) !important;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-size: 6px 1px, 6px 1px, 1px 6px, 1px 6px;
  background-position: 0 0, 0 100%, 100% 0, 0 0;
}

.nav-link:hover, .nav-link:focus-visible,
.pill-button:hover, .pill-button:focus-visible,
.control-pill:hover, .control-pill:focus-visible,
.icon-btn:hover, .icon-btn:focus-visible {
  animation: march 0.4s linear infinite;
  background-color: rgba(var(--theme-r), var(--theme-g), var(--theme-b), 0.1) !important;
  outline: none;
}

.nav-link:active, .pill-button:active, .control-pill:active, .icon-btn:active {
  animation: none;
  background-image: none;
  border: 1px solid #000 !important;
  transform: scale(0.98);
  background-color: rgba(var(--theme-r), var(--theme-g), var(--theme-b), 0.2) !important;
}

.nav-link {
  display: block; color: #71717a; font-size: 1.125rem;
  margin-bottom: 0.75rem; letter-spacing: -0.01em;
  padding: 0.875rem 1.5rem; width: fit-content; margin-left: -1.5rem;
  background-image:
    linear-gradient(90deg, #a1a1aa 50%, transparent 50%),
    linear-gradient(90deg, #a1a1aa 50%, transparent 50%),
    linear-gradient(0deg,  #a1a1aa 50%, transparent 50%),
    linear-gradient(0deg,  #a1a1aa 50%, transparent 50%);
}
.nav-link:hover {
  color: #000;
  background-image:
    linear-gradient(90deg, #000 50%, transparent 50%),
    linear-gradient(90deg, #000 50%, transparent 50%),
    linear-gradient(0deg,  #000 50%, transparent 50%),
    linear-gradient(0deg,  #a1a1aa 50%, transparent 50%);
}

.nav-link.active {
  color: #000000; font-weight: 600;
  animation: none; background-image: none;
  border: 1px solid rgba(var(--theme-r), var(--theme-g), var(--theme-b), 0.2);
  background-color: rgba(var(--theme-r), var(--theme-g), var(--theme-b), 0.12);
}

/* Hardcoded nav colors */
.nav-link.nav-work:hover, .nav-link.nav-work:focus-visible,
.pill-button.cta-work:hover, .pill-button.cta-work:focus-visible {
  background-color: rgba(113, 178, 226, 0.1) !important;
}
.nav-link.nav-work.active {
  background-color: rgba(113, 178, 226, 0.12) !important;
  border-color: rgba(113, 178, 226, 0.2) !important;
}
.nav-link.nav-characters:hover, .nav-link.nav-characters:focus-visible,
.pill-button.cta-characters:hover, .pill-button.cta-characters:focus-visible {
  background-color: rgba(238, 35, 89, 0.1) !important;
}
.nav-link.nav-characters.active {
  background-color: rgba(238, 35, 89, 0.12) !important;
  border-color: rgba(238, 35, 89, 0.2) !important;
}
.nav-link.nav-about:hover, .nav-link.nav-about:focus-visible,
.pill-button.cta-about:hover, .pill-button.cta-about:focus-visible {
  background-color: rgba(255, 204, 81, 0.1) !important;
}
.nav-link.nav-about.active {
  background-color: rgba(255, 204, 81, 0.12) !important;
  border-color: rgba(255, 204, 81, 0.2) !important;
}
.nav-link.nav-contact:hover, .nav-link.nav-contact:focus-visible,
.pill-button.cta-contact:hover, .pill-button.cta-contact:focus-visible {
  background-color: rgba(0, 178, 152, 0.1) !important;
}
.nav-link.nav-contact.active {
  background-color: rgba(0, 178, 152, 0.12) !important;
  border-color: rgba(0, 178, 152, 0.2) !important;
}

.pill-button    { display: inline-block; padding: 1rem 2.5rem; font-weight: 500; font-size: 0.875rem; text-align: center; }
.control-pill   { font-size: 1rem; padding: 0.75rem 1.25rem; font-weight: 500; user-select: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.icon-btn       { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; }

.archive-link { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; cursor: pointer; transition: color 0.2s; }
.archive-link:hover { color: #71717a; text-decoration-style: solid; }

@keyframes march {
  0%   { background-position: 0 0, 0 100%, 100% 0, 0 0; }
  100% { background-position: 12px 0, -12px 100%, 100% 12px, 0 -12px; }
}

.simulate-pill-hover {
  animation: march 0.4s linear infinite !important;
  background-color: rgba(var(--theme-r), var(--theme-g), var(--theme-b), 0.1) !important;
}

.theme-bg-box {
  background-color: rgba(var(--theme-r), var(--theme-g), var(--theme-b), 0.08) !important;
  border: 1px solid rgba(var(--theme-r), var(--theme-g), var(--theme-b), 0.2) !important;
}

.simulate-hover-left svg  { transform: translateX(-0.25rem); }
.simulate-hover-right svg { transform: translateX(0.25rem); }

/* Tooltip */
.has-tooltip { position: relative; }
.tooltip-text {
  visibility: hidden; background-color: #000; color: #fff;
  text-align: center; padding: 4px 8px; border-radius: 0;
  position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%) translateY(-8px);
  font-size: 10px; opacity: 0; transition: opacity 0.2s;
  pointer-events: none; white-space: nowrap; z-index: 10;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
}
.tooltip-text::after {
  content: ""; position: absolute; top: 100%; left: 50%;
  margin-left: -4px; border-width: 4px; border-style: solid;
  border-color: #000 transparent transparent transparent;
}
.has-tooltip:hover .tooltip-text,
.has-tooltip:focus-visible .tooltip-text { visibility: visible; opacity: 1; }

/* Mobile */
.hamburger {
  display: none; flex-direction: column; justify-content: space-around;
  width: 44px; height: 34px; background: transparent; border: none;
  cursor: pointer; padding: 0; z-index: 60;
}
.hamburger span { width: 100%; height: 2px; background: black; transition: all 0.3s ease-in-out; transform-origin: 1px; }

@media (max-width: 1025px) {
  .masonry-container { flex-direction: column; }
  .masonry-column    { width: 100%; }

  #modal-overlay { align-items: flex-start; overflow-y: auto; }

  .modal-content {
    display: flex; flex-direction: column;
    grid-template-columns: none; grid-template-rows: none;
    width: 100%; min-height: 100vh; height: auto !important;
    max-height: none !important; border: none; margin: 0;
  }

  #modal-media-container {
    height: auto !important; min-height: auto;
    display: block; padding: 0 !important; flex-shrink: 0;
  }

  #modal-media-container img,
  #modal-media-container video {
    width: 99%; height: auto !important;
    max-height: none; object-fit: contain; position: relative;
  }

  .modal-text-container { height: auto; overflow: visible; padding-bottom: 2rem; }

  #btn-close {
    position: fixed; top: 1rem; right: 1rem;
    background-color: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
  }

  #sidebar-role      { padding-left: 24px; font-size: 12px; }
  #sidebar-role-desc { padding-left: 24px; font-size: 8px; }

  .sidebar {
    position: fixed; width: 100%; height: 80px; padding: 1.5rem;
    flex-direction: row; align-items: center; justify-content: space-between;
    border-bottom: 1px solid transparent;
  }
  main { margin-left: 0 !important; padding: 1.5rem; margin-top: 80px; }

  .hamburger   { display: flex; }
  .nav-content {
    display: none; position: fixed; top: 80px; left: 0;
    width: 100%; height: calc(100vh - 80px); background: white;
    padding: 2rem; flex-direction: column; justify-content: space-between;
    border-top: 1px solid #f0f0f0;
  }
  .nav-content.active { display: flex; }

  .hamburger.active span:first-child  { transform: rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg); }

  .nav-content .nav-link { font-size: 1.5rem; margin-bottom: 1.5rem; margin-left: 0; }
}

.hidden { display: none !important; }
</style>
