body {
  transform-origin: 0 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 90px;
  font-family: 'Montserrat', Arial, sans-serif;
  overflow-x: hidden;
  overflow-y: scroll;
  color: #e5e5e5;
  background: #1c1c1c url(/img/bg.png);
}

a,
button,
* {
  outline: none;
}

img {
  font-size: 0;
}

::selection {
  background: #bbb;
  color: #222;
}

.content {
  position: relative;
  max-width: 1150px;
  margin: 0 auto;
}

h1,
h2 {
  margin: 0;
  padding: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 40px;
}



h1 a {
  text-decoration: none;
  color: #e5e5e5;
}

h3 {
  margin: 20px 0 0 0;
  padding: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 36px;
  text-align: center;
  color: #aaa;
}


header {
  position: relative;
  padding: 40px 5px 50px;
  display: flex;
  flex-direction: column;
}

.header-top {
  display: flex;
  flex-wrap: nowrap;
  /* Prevent accidental wrapping - use breakpoint instead */
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
  /* Minimum gap between logo and nav */
}

header h1 {
  /* float: left; Removed float */
  line-height: 0;
  /* Fix for image height */
}

h1 a {
  text-decoration: none;
  display: block;
}

.header-logo-link {
  display: block;
  position: relative;
  text-decoration: none;
  width: 280px;
  max-width: 100%;
}

.header-logo {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.back-text {
  position: absolute;
  top: 62%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 35px;
  font-weight: 700;
  color: #e5e5e5;
  white-space: nowrap;
  letter-spacing: normal;
  opacity: 0;
  filter: blur(3px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* Hover effect only when 'back' class is present */
.header-logo-link.back:hover .header-logo {
  opacity: 0.3;
  filter: grayscale(100%) blur(3px);
  /* Slight ghosting or 0 for full hide */
}

.header-logo-link.back:hover .back-text {
  opacity: 1;
  filter: blur(0);
  color: #00c8ff;
}

header ul {
  display: block;
  margin: 0;
  padding: 0;
  font-weight: 400;
  text-align: right;
  list-style: none;
  align-self: flex-end;
  padding-bottom: 5px;
}

header ul li {
  display: inline-block;
  margin: 0 0 0 15px;
  padding: 0;
  font-size: 17px;
  line-height: 40px;
}

header ul li a {
  display: block;
  color: #e5e5e5;
  text-decoration: none;
  height: 41px;
  box-sizing: border-box;
}

header ul li a:hover {
  border-bottom: 2px solid;
  height: 40px;
  transition: height 0.3s cubic-bezier(0, 0, 0, 1);
}

header p {
  /* clear: both; Removed clear */
  max-width: 100%;
  /* Allow full width or constrain if preferred */
  font-size: 18px;
  line-height: 30px;
  font-weight: 300;
  color: #808080;
  margin: 20px 0 0 0;
  /* Add margin-top */
  padding: 0;
}

footer {
  padding: 80px 5px 40px;
  font-weight: 300;
  text-align: center;
  color: #999;
}

footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: #e5e5e5;
}

footer small {
  color: #666;
}

/* Tagline on homepage */
.tagline {
  margin-top: 30px;
}

.tagline p {
  text-align: left;
  color: #808080;
  margin: 0 0 40px;
}

/* Project title spacing */
.project h2 {
  margin-bottom: 20px;
}

.projects {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
}


.thumb {
  position: relative;
  overflow: hidden;
  background: url(/img/noise-dark.png);
  animation: noiser 0.3s infinite;
}

@keyframes noiser {
  0% {
    background-position: 0;
  }

  49% {
    background-position: 0;
  }

  50% {
    background-position: 0 1000px;
  }

  51% {
    background-position: 0 2000px;
  }

  100% {
    background-position: 0 2000px;
  }
}

.thumb.x1 {
  width: 33.33%;
}

.thumb.x2 {
  width: 66.67%;
}


.thumb.x3 {
  width: 100%;
}

.thumb img {
  display: block;
  width: 100%;
  object-fit: cover;
  transition-duration: 0.8s;
  transition-timing-function: cubic-bezier(0, 1, 0.3, 1);
}

.thumb.x1 img {
  aspect-ratio: 1 / 1;
}

.thumb.x2 img {
  aspect-ratio: 2 / 1;
}

.thumb.x3 img {
  aspect-ratio: 3 / 1;
}

.thumb .caption {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9;
  text-align: center;
  justify-content: center;
  align-items: center;
  flex-flow: column;
  opacity: 0;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0, 1, 0.3, 1);
  transform: scale(1.1);
}

.thumb .caption b {
  font-size: 22px;
  font-weight: 400;
  line-height: 30px;
  color: #eee;
  margin: 0 80px;
}

.thumb .caption em {
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  font-style: normal;
  color: #aaa;
}

.thumb:after {
  display: block;
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  pointer-events: none;
}

.thumb:hover img {
  opacity: 0.15;
  transition-duration: 0.2s;
  transform: scale(1.05);
  filter: blur(10px) grayscale(100%);
}

.thumb:hover .caption {
  opacity: 1;
  transition-duration: 0.2s;
  transform: scale(1);
}




/* PROJECT */

.project {
  padding: 80px 5px 50px;
}

.video {
  position: relative;
  padding: 56.25% 0 0 0;
  margin: 40px 0;
  background: #111;
}

.video.flush {
  margin-bottom: 0;
  margin-top: 0;
}

.video iframe,
.video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}



.project p {
  font-size: 17px;
  line-height: 28px;
  font-weight: 400;
  color: #999;
  margin: 18px 0;
}

/* Project contribution section */
.project-contribution {
  text-align: left;
  margin-top: 50px;
}

.project-contribution .contribution-title {
  font-weight: 500;
  color: #e5e5e5;
  margin-bottom: 5px;
}

.project-contribution .contribution-details {
  margin-top: 0;
}

.project-contribution .contribution-signoff {
  margin-top: 50px;
}

.project img {
  background-image: url(/img/noise-dark.png);
}

.project p a,
.project li a {
  color: #999;
  text-decoration: none;
  border-bottom: 1px solid #999;
  transition: 0.2s;
}

.project p a:hover,
.project li a:hover {
  color: #eee;
  border-bottom: 1px solid #eee;
  padding-bottom: 3px;
}

.project a img {
  cursor: zoom-in;
}

.project a:active img {
  transform: scale(0.98);
  transition: 0.1s;
}


/* Timestamps */

.timestamps {
  text-align: left;
}

.timestamps table {
  width: auto;
  border-collapse: collapse;
  font-size: 15px;
  color: #999;
  margin-bottom: 30px;
  text-align: left;
  margin-left: 0;
  margin-right: auto;
}

.timestamps td {
  padding: 8px 30px 8px 0;
  border-bottom: 1px solid #222;
  vertical-align: top;
  white-space: nowrap;
  text-align: left;
}

.timestamps td:nth-child(1) {
  width: 1px;
  font-variant-numeric: tabular-nums;
}

.timestamps td:nth-child(2) {
  width: 1px;
  font-weight: 500;
  color: #ccc;
}

.timestamps td:last-child {
  white-space: normal;
}

.timestamps a {
  color: #ccc;
  text-decoration: none;
  border-bottom: 1px solid #555;
  transition: 0.2s;
}

.timestamps a:hover {
  color: #fff;
  border-bottom-color: #fff;
}


/* Music credit styling */

.music-credit {
  font-size: 14px;
  color: #999;
  text-align: left;
}

.music-credit .label {
  font-size: 16px;
  font-weight: 500;
  color: #ccc;
}


/* ANIMATION */

html.fadeout .projects,
html.fadeout .project,
html.fadeout .tagline {
  opacity: 0;
  transition: 0.3s cubic-bezier(.8, 0, .8, 0);
  transform: translateY(10px);
}

.project.fadein,
.projects.fadein,
.tagline.fadein {
  animation: fadein 1s cubic-bezier(.2, 1, .2, 1);
}

@keyframes fadein {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}


/* LINKS Page */

.links .content {
  /* width: 340px; */
}

.links .project {
  padding-top: 0;
}

ul.links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.links-list li {
  padding: 0;
  margin: 0 0 16px;
  font-weight: 300;
  color: #808080;
  font-size: 17px;
  line-height: 28px;
}

ul.links-list li a {
  color: #e5e5e5;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: padding 0.2s;
}

ul.links-list li a:hover {
  color: #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 3px;
  transition: padding 0.1s;
}