/* ============================================
   RESET & BASE
   ============================================ */

:root {
  --accent-color: #D35222;
  --black: #121212;
  --gray: #666;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-style: normal;
  background-color: #ffffff;
  color: var(--black);
  line-height: 1.6;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3 {
  font-family: "Space Mono", monospace;
  font-weight: 400;
  color: var(--black);
}

h1 {
  font-size: 1.5rem;
  line-height: 1.4;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.8;
}

h3 {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--black);
}

p {
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray);
}

p.small {
  font-size: 0.8rem;
  line-height: 1.8;
}

ul, ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

li {
  color: var(--gray);
  padding-left: 1.5em;
  position: relative;
  line-height: 1.8;
}

li::before {
  content: '\00B7'; /* &middot; */
  position: absolute;
  left: 0;
  color: var(--gray);
}

/* Exclude navigation lists from bullet styling */
.nav__links li,
.mobile-menu li {
  padding-left: 0;
}

.nav__links li::before,
.mobile-menu li::before {
  display: none;
}

.image-caption {
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--gray);
  font-style: italic;
}

.italic {
  font-style: italic;
}

.video-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(18, 18, 18, 0.1);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 1;
}

.video-container {
  position: relative;
  width: 100%;
}

.video-container video {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-container video.loaded {
  opacity: 1;
}

.video-container .video-loader.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.work-item__media {
  margin-bottom: 0;
}

#image-stroke {
  border: 1px solid #d3d3d3;
}

img,
video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}



#work .section__block {
  padding-top: 0;
  padding-bottom: 0;
}

a {
  color: #9c9c9c;
  text-decoration: none;
  font-size: 1em;
}

a:hover {
  color: var(--accent-color);
}

/* Work card links - block level, gray text by default, accent on hover */
.work-card-link {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.work-card-link:hover {
  color: inherit;
}

.work-card-link p {
  color: var(--gray);
}

.work-card-link:hover p {
  color: var(--accent-color);
  transition: color 0.3s ease;
}

.button {
  color: #9c9c9c;
  font-size: 1rem;
  font-style: italic;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: "Space Mono", monospace;
}

.button:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  height: 100vh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  z-index: 1000;
}

.nav__container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.nav__logo {
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--black);
  text-decoration: none;
  text-align: left;
  align-self: flex-start;
}

.nav__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.nav__link {
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-size: 1rem;
  color: #9c9c9c;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  text-align: left;
}

.nav__link:hover {
  color: var(--accent-color);
}

.nav__link svg {
  width: 20px;
  height: 20px;
}

.nav__icons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav__icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9c9c9c;
  transition: color 0.3s ease;
}

.nav__icon-link:hover {
  color: var(--accent-color);
}

.nav__icon-link svg {
  width: 20px;
  height: 20px;
  display: block;
}

.nav__icon-link svg path {
  fill: currentColor;
}

.nav__hamburger {
  display: none;
  position: relative;
  width: 28px;
  height: 24px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.nav__hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--black);
  margin-bottom: 6px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.nav__hamburger-bar:first-child {
  margin-top: -7px;
}

.nav__hamburger-bar:last-child {
  margin-top: 7px;
  margin-bottom: 0;
}

.nav__hamburger.open .nav__hamburger-bar:first-child {
  margin-top: 0;
  transform: translateY(-50%) rotate(45deg);
}

.nav__hamburger.open .nav__hamburger-bar:last-child {
  margin-top: 0;
  transform: translateY(-50%) rotate(-45deg);
}

/* ============================================
   MOBILE MENU
   ============================================ */

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ffffff;
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu__link {
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-size: 1.5rem;
  color: #9c9c9c;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.mobile-menu__link:hover {
  color: var(--accent-color);
}

.mobile-menu__link svg {
  width: 20px;
  height: 20px;
}

.mobile-menu__icons {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.mobile-menu__icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9c9c9c;
  transition: color 0.3s ease;
}

.mobile-menu__icon-link:hover {
  color: var(--accent-color);
}

.mobile-menu__icon-link svg {
  width: 20px;
  height: 20px;
  display: block;
}

.mobile-menu__icon-link svg path {
  fill: currentColor;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main {
  margin-left: 240px;
  padding: 0  2rem;
  max-width: 1000px;
}

.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

#intro {
  padding-top: 2rem;
  padding-bottom: 0;
  animation: fadeIn 0.8s ease-in-out;
}

#work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  animation: fadeInSlideUp 1s ease-out 1.5s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#work .section__block {
  margin-bottom: 2rem;
}

.two-column {
  display: flex;
  gap: 2rem;
}

.two-column > * {
  flex: 1;
}



.section__divider {
  width: 100%;
  height: 1px;
  background-color: #9c9c9c;
  margin: 2rem 0;
}


.section__block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.section__block > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section__block > div:first-child h3:last-child {
  text-align: right;
}

.job-item {
  padding-top: 0;
  padding-bottom: 0;
  gap: 0;
}

.job-header {
  width: 100%;
  display: grid;
  grid-template-columns: 25% 1fr;
  align-items: center;
  gap: 1rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: "Space Mono", monospace;
}

.job-right-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
  text-align: right;
  justify-self: end;
}

.job-title,
.job-company,
.job-year {
  font-size: 1rem;
  line-height: 1.4;
  color: var(--gray);
}

.job-year {
  text-align: right;
}

.job-toggle-icon {
  flex-shrink: 0;
}

.job-header:hover .job-title,
.job-header:hover .job-company,
.job-header:hover .job-year {
  color: var(--accent-color);
  transition: color 0.3s ease;
}

.job-header[aria-expanded="true"] .job-title,
.job-header[aria-expanded="true"] .job-company,
.job-header[aria-expanded="true"] .job-year {
  color: var(--black);
  transition: color 0.3s ease;
}

.job-toggle-icon {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--black);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.job-header[aria-expanded="true"] .job-toggle-icon {
  transform: rotate(45deg);
}

.job-description {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding-top 0.3s ease;
  padding-top: 0;
}

.job-header[aria-expanded="true"] + .job-description {
  max-height: 500px;
  padding-top: 1rem;
}

.job-divider {
  height: 1px;
  background-image: repeating-linear-gradient(
    to right,
    #c9c9c9 0px,
    #c9c9c9 4px,
    transparent 4px,
    transparent 8px
  );
  margin: 0.5rem 0;
}






/* ============================================
   MEDIA QUERIES
   ============================================ */

@media (max-width: 1024px) {
  #work {
    grid-template-columns: 1fr;
  }
  
  .two-column {
    flex-direction: column;
  }
  
  .nav__icon-link,
  .mobile-menu__icon-link {
    color: #9c9c9c;
  }
  
  .nav__icon-link svg,
  .mobile-menu__icon-link svg {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 768px) {
  .nav {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 1.5rem;
    flex-direction: row;
  }

  .nav__container {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: block;
  }

  .main {
    margin-left: 0;
    padding: 1.5rem;
  }

  #intro .section__block {
    text-align: left;
  }


  .section__block > div:first-child {
    flex-direction: column;
    align-items: flex-start;
  }

  .section__block > div:first-child h3:last-child {
    text-align: left;
  }

  .job-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .job-title,
  .job-company,
  .job-year {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1.125rem;
  }

  h3 {
    font-size: 1rem;
  }
}
