:root {
  --font-size:15px;
  --line-height: 1.6;
  --background: #fff;
  --grey1: #090A0C;
  --grey2: #666;
  --grey3: #999;
  --wash1: #e5e5e5;
  --wash2: #f2f2f2;
  --transparentBorder: rgba(0, 0, 0, 0.05);
  --font-inter: "Inter", sans-serif;
  --spring-easing: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --spring-duration: 0.4s;
  
  --lightbox-bg: rgba(255, 255, 255, 0.95);
  --lightbox-controls: #111;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #090A0C;
    --grey1: #eee;
    --grey2: #bbb;
    --grey3: #888;
    --wash1: #4E4E4E;
    --wash2: #383838;
    --transparentBorder: rgb(255 255 255 / 0.1);
    
    --lightbox-bg: rgba(9, 10, 12, 0.9);
    --lightbox-controls: #fff;
  }
}

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

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background-color: var(--background);
  font-family: var(--font-inter), sans-serif;
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--grey1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}

.page {
  padding: 0 24px;
}

.profile {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(24px, calc((100vw - 540px) / 2), 72px) 0;
}

.profileHeader {
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 16px;
}

.profileHeader h1 {
    font-size: var(--font-size);
    font-weight: 400;
}

.byline {
  color: var(--grey2);
}

.profilePhoto {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--wash2);
  overflow: hidden;
}

.profilePhoto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profileSection:first-of-type {
  margin: 36px 0;
}

.profileSection {
  margin: 60px 0;
}

.profileSection h3 {
  font-size: var(--font-size);
  font-weight: normal;
  margin-bottom: calc((var(--font-size) * var(--line-height)) / 2);
}

.experiences {
  display: flex;
  flex-direction: column;
  row-gap: 36px;
  margin-top: 24px;
}

.contacts {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
  margin-top: 24px;
}

.experience {
  display: flex;
  flex-direction: row;
  column-gap: 36px;
}

.experienceContent {
  min-width: 0;
}

.description {
  color: var(--grey2);
  display: flex;
  row-gap: calc((var(--font-size) * var(--line-height)) / 2);
  flex-direction: column;
}

.description p a {
  border-bottom: 1px solid var(--wash1);
}

.year {
  color: var(--grey3);
  font-variant-numeric: tabular-nums;
  position: relative;
  flex-shrink: 0;
}

.year::before {
  content: "0000 — 0000";
  visibility: hidden;
}

.year span {
  position: absolute;
  left: 0;
  white-space: nowrap;
}

.title a:hover {
  border-bottom: 1px solid;
}

.linkArrow {
  white-space: nowrap;
}

.linkArrow svg {
  margin-left: 2px;
  vertical-align: middle;
}

.location {
  color: var(--grey2);
}

.location ~ .description {
  margin-top: calc((var(--font-size) * var(--line-height)) / 2);
}

.attachments {
  margin-top: 12px;
  width: 100%;
  position: relative;
}

.scrollableArea {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 14px;
  cursor: grab;
}

.scrollableArea:active {
  cursor: grabbing;
}

.scrollableArea::-webkit-scrollbar {
  display: block;
  height: 4px;
}

.scrollableArea::-webkit-scrollbar-track {
  background: var(--wash2);
  border-radius: 4px;
}

.scrollableArea::-webkit-scrollbar-thumb {
  background-color: var(--grey3);
  border-radius: 4px;
}

.images {
  display: flex;
  column-gap: 8px;
  position: relative;
  width: fit-content;
  min-width: 100%;
}

.media {
  background-color: var(--wash2);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  cursor: zoom-in;
}

.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.media::after {
  position: absolute;
  inset: 0;
  content: '';
  border: 1px solid var(--transparentBorder);
  border-radius: inherit;
  z-index: 10;
  pointer-events: none;
}

@keyframes lightboxEnter {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}

@keyframes lightboxContentEnter {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes lightboxExit {
  from {
    opacity: 1;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  to {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
}

@keyframes lightboxContentExit {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

.lightbox {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--lightbox-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
}

.lightbox.show {
  opacity: 1;
  pointer-events: auto;
  animation: lightboxEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lightbox.closing {
  pointer-events: none;
  animation: lightboxExit 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0.95);
}

.lightbox.show .lightbox-content {
  animation: lightboxContentEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.05s;
}

.lightbox.closing .lightbox-content {
  animation: lightboxContentExit 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lightbox-content img,
.lightbox-content video {
  display: block;
  width: 100%;
  max-width: 2400px;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  margin: auto;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 1002;
  cursor: pointer;
}

.lightbox-nav.prev {
  left: 0;
  cursor: w-resize;
}

.lightbox-nav.next {
  right: 0;
  cursor: e-resize;
}

.close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--lightbox-controls);
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1003;
  line-height: 1;
  transition: all 0.2s ease;
  background: rgba(128, 128, 128, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, sans-serif;
  padding-bottom: 0;
}

.close-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--lightbox-controls);
}

.close-btn:hover {
  background: rgba(128, 128, 128, 0.25);
  transform: scale(1.05);
}

.lightbox-dots {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  column-gap: 8px;
  z-index: 1003;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(128, 128, 128, 0.3);
  cursor: pointer;
  transition: background-color 0.2s;
}

.dot.active {
  background-color: var(--lightbox-controls);
  transform: scale(1.2);
}

@media only screen and (max-width: 480px) {

  .experience {
    flex-direction: column;
  }

  .scrollableArea {
    margin-left: -40px; 
    margin-right: -24px;
    padding-left: 40px;
    padding-right: 24px;
  }
  
  .scrollableArea::-webkit-scrollbar {
    display: none;
  }
}
