/* Font Definitions */
@font-face {
  font-family: 'TBJTerminalMono';
  src: url('fonts/TBJTerminalMono-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TBJTerminalMono';
  src: url('fonts/TBJTerminalMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TBJTerminalMono';
  src: url('fonts/TBJTerminalMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TBJTerminalMono';
  src: url('fonts/TBJTerminalMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TBJTerminalMono';
  src: url('fonts/TBJTerminalMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TBJTerminalMono';
  src: url('fonts/TBJTerminalMono-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'TBJTerminalMono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  background: #F2F2F7;
  color: #1a1a1a;
  min-height: 100vh;
}

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

/* Header */
.header {
  position: relative;
  width: min(600px, 90vw);
  margin: 0 auto;
  padding: clamp(4rem, 12vw, 10rem) 0 clamp(2rem, 4vw, 3rem);
}

.header-content {
  width: 100%;
}

.headline {
  font-weight: 800;
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.inline-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-link:hover {
  opacity: 0.6;
}

.bio {
  font-weight: 400;
  font-size: 0.861rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 2rem;
  font-weight: 700;
  font-size: 0.861rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.social-links a {
  transition: opacity 0.2s;
}

.social-links a:hover {
  opacity: 0.5;
}

/* Experience sidebar — absolute on wide screens, inline on narrow */
.experience {
  position: absolute;
  top: clamp(4rem, 12vw, 10rem);
  left: calc(100% + clamp(2rem, 3vw, 3rem));
  text-align: left;
  white-space: nowrap;
}

@media (max-width: 1400px) {
  .experience {
    position: static;
    white-space: normal;
    margin-top: 1.5rem;
  }
}

.experience-label {
  font-weight: 700;
  font-size: 0.861rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.experience-list {
  list-style: none;
  font-weight: 400;
  font-size: 0.861rem;
  line-height: 2;
}

/* Feed */
.feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 0 clamp(1rem, 4vw, 3rem) clamp(3rem, 6vw, 6rem);
}

/* Card */
.card {
  position: relative;
  width: min(525px, 90vw);
  aspect-ratio: 3 / 4;
  border-radius: clamp(24px, 3.5vw, 40px);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Carousel track */
.card-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}

.card-track.dragging {
  transition: none;
}

/* Slide */
.card-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Slide types */
.slide-image {
  background: #1a1a1a;
}

.slide-image img,
.slide-image video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.slide-phone {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 12%;
  position: relative;
}

.slide-phone::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid #ffffff;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

.slide-phone img,
.slide-phone video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  border-radius: 2px;
  filter: drop-shadow(0 0 1px #ffffff) drop-shadow(0 0 2px #ffffff);
}


/* Fit slide type */
.slide-fit {
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-fit img,
.slide-fit video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.slide-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15%;
}

.slide-text p {
  font-weight: 500;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.4;
  text-align: center;
}

/* Card footer */
.card-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 clamp(1.5rem, 4%, 3.5rem) clamp(1.5rem, 4%, 3.5rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.card-footer-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.card-title {
  font-weight: 400;
  font-size: 0.861rem;
  line-height: 1.3;
}

.card-role {
  font-weight: 400;
  font-size: 0.861rem;
  line-height: 1.3;
}

.card-year {
  font-weight: 400;
  font-size: 0.861rem;
  line-height: 1.6;
}

/* Footer light (for phone slides on light bg) */
.card-footer-light .card-title,
.card-footer-light .card-role,
.card-footer-light .card-year {
  color: #1a1a1a;
}

/* Footer dark (for full bleed image slides) */
.card-footer-dark .card-title,
.card-footer-dark .card-role,
.card-footer-dark .card-year {
  color: #ffffff;
}

.card-footer-dark .card-year {
  color: #f4f4f4;
}

/* Carousel dots */
.card-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-bottom: clamp(1.5rem, 4%, 3.5rem);
  pointer-events: auto;
}

.card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s, width 0.3s, margin 0.3s;
  padding: 0;
}

.card-footer-light .card-dot {
  background: #1a1a1a;
  opacity: 0.25;
}

.card-footer-light .card-dot.active {
  opacity: 1;
}

.card-footer-dark .card-dot {
  background: #ffffff;
  opacity: 0.35;
}

.card-footer-dark .card-dot.active {
  opacity: 1;
}

/* Navigation arrows */
.card-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 5;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.card-nav-prev { left: 0; }
.card-nav-next { right: 0; }

.card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.card:hover .card-arrow {
  opacity: 1;
}

.card-nav-prev .card-arrow {
  left: 16px;
  background: rgba(255, 255, 255, 0.85);
}

.card-nav-next .card-arrow {
  right: 16px;
  background: rgba(255, 255, 255, 0.85);
}

.card-arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #1a1a1a;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hide single-slide navigation */
.card[data-slides="1"] .card-nav,
.card[data-slides="1"] .card-dots {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    width: 90vw;
    padding: 2rem 0 1.5rem;
  }

  .experience {
    position: static;
    white-space: normal;
    margin-top: 1.5rem;
  }

  .experience-list {
    line-height: 1.8;
  }

  .feed {
    gap: 40px;
  }

  .card {
    width: 95vw;
    border-radius: clamp(16px, 4vw, 40px);
  }

  .card-arrow {
    display: none;
  }

  .social-links {
    gap: 1.25rem;
  }
}

/* Feed end / back to top */
.feed-end {
  display: flex;
  justify-content: center;
  padding: 3rem 0 4rem;
}

.back-to-top {
  display: block;
  transition: opacity 0.2s;
}

.back-to-top:hover {
  opacity: 0.5;
}

.initials-logo {
  width: 120px;
  height: auto;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card-track {
    transition: none;
  }
}
