/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Mono', 'Courier New', Courier, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.85);
  background: #fff;
}

/* ============================================
   TOP NAV
   ============================================ */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-identity {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-left: 1px solid rgba(0, 0, 0, 0.15);
  padding-left: 20px;
}

.nav-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.85);
}

.nav-subtitle {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
}

.nav-name {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.85);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(0, 0, 0, 0.85);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

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

/* ============================================
   PAGE WRAPPER (3-column grid)
   ============================================ */
.page-wrapper {
  display: grid;
  grid-template-columns: 340px 1fr 300px;
  height: calc(100vh - 44px);
  margin-top: 44px;
  overflow: hidden;
}

/* ============================================
   SIDEBARS
   ============================================ */
.sidebar-left,
.sidebar-right {
  height: 100%;
  overflow-y: auto;
}

.sidebar-left {
  border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.sidebar-right {
  border-left: 1px solid rgba(0, 0, 0, 0.15);
}

.sidebar-inner {
  padding: 24px 20px 60px 20px;
}

/* ============================================
   PROFILE PHOTO
   ============================================ */
.profile-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 20px;
  background: #eee;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  display: block;
}

/* ============================================
   PROFILE HEADER
   ============================================ */
.profile-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.85);
  margin-bottom: 6px;
}

.profile-subtitle {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ============================================
   SECTION LABELS
   ============================================ */
.section-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  margin-top: 28px;
  color: rgba(0, 0, 0, 0.85);
}

.sidebar-left .section-label:first-of-type {
  margin-top: 0;
}

.sidebar-inner p {
  margin-bottom: 14px;
  font-size: 12.5px;
  color: rgba(0, 0, 0, 0.75);
  line-height: 1.65;
}

.sidebar-inner p:last-child {
  margin-bottom: 0;
}

.sidebar-inner a {
  color: rgba(0, 0, 0, 0.85);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s ease;
}

.sidebar-inner a:hover {
  opacity: 0.5;
}

.label {
  color: rgba(0, 0, 0, 0.85);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  height: 100%;
  overflow-y: auto;
  padding: 0;
}

/* ============================================
   PROJECT HEADER (sticky)
   ============================================ */
.project-header {
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  color: rgba(0, 0, 0, 0.85);
}

/* ============================================
   PROJECT INTRO
   ============================================ */
.project-intro {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.5);
  font-size: 12px;
  line-height: 1.6;
}

/* ============================================
   PROJECT BLOCK
   ============================================ */
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 24px 24px;
}

.project-meta {
  padding-right: 24px;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.project-description {
  padding-left: 24px;
}

.project-number {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.4);
  margin-bottom: 8px !important;
}

.project-label {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.85);
  margin-bottom: 10px !important;
  line-height: 1.5;
}

.project-org {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 8px !important;
}

.project-type {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 6px !important;
}

.project-meta p,
.project-description p {
  margin-bottom: 14px;
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.75);
}

.project-meta p:last-child,
.project-description p:last-child {
  margin-bottom: 0;
}

.project-description .indented {
  padding-left: 16px;
  border-left: 1px solid rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.65);
}

.muted {
  color: rgba(0, 0, 0, 0.4) !important;
}

/* ============================================
   DIVIDERS
   ============================================ */
hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  margin: 0 24px;
}

/* ============================================
   PROJECT IMAGES
   ============================================ */
.project-image {
  padding: 20px 24px;
}

.project-image img {
  width: 100%;
  display: block;
  margin-bottom: 10px;
}

/* ============================================
   GALLERY / CAROUSEL
   ============================================ */
.gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 14px;
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.gallery-track img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
  margin-bottom: 0;
}

.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  font-family: inherit;
}

.gallery-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.15s ease;
}

.gallery-dot.active {
  background: #fff;
}

.figma-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 10px;
}

.figma-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.image-caption {
  font-size: 11.5px;
  color: rgba(0, 0, 0, 0.45);
  line-height: 1.5;
}

.end-spacer {
  height: 80px;
}

/* ============================================
   CV SIDEBAR
   ============================================ */
.cv-section {
  margin-bottom: 32px;
}

.cv-heading {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(0, 0, 0, 0.85);
  margin-bottom: 16px;
  margin-top: 24px;
}

.cv-list {
  list-style: none;
}

.cv-list li {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cv-title {
  font-size: 12.5px;
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.5;
}

.cv-org {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.5;
}

.cv-date {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.4);
  line-height: 1.5;
}

.cv-note {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 8px !important;
}

/* ============================================
   SCROLL FADE-UP ANIMATION
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

/* ============================================
   MOBILE NAV (hidden on desktop)
   ============================================ */
.mobile-nav {
  display: none;
}

/* ============================================
   RESPONSIVE — TABLET / MOBILE
   ============================================ */
@media (max-width: 960px) {
  .top-nav {
    display: none;
  }

  .page-wrapper {
    display: block;
    height: auto;
    margin-top: 0;
    overflow: visible;
  }

  .sidebar-left,
  .sidebar-right,
  .main-content {
    height: auto;
    overflow-y: visible;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }

  .project {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-meta {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 16px;
  }

  .project-description {
    padding-left: 0;
  }

  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    z-index: 100;
    justify-content: space-around;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .mobile-nav a {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(0, 0, 0, 0.85);
    text-decoration: none;
    transition: opacity 0.15s ease;
  }

  .mobile-nav a:hover {
    opacity: 0.5;
  }
}

/* ============================================
   PLACEHOLDER for missing images
   ============================================ */
img {
  min-height: 1px;
  background: #f0f0f0;
}

/* ============================================
   READ MORE BUTTON
   ============================================ */
.read-more-btn {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #1a1a1a;
  border-radius: 3px;
  padding: 7px 16px;
  cursor: pointer;
  margin-top: 12px;
  margin-bottom: 20px;
  display: inline-block;
  transition: background 0.15s, color 0.15s;
}
.read-more-btn:hover {
  background: #1a1a1a;
  color: #fff;
}
