/* ============================================================
   CSS CUSTOM PROPERTIES, edit these to change the whole site
============================================================ */
:root {
  --color-bg:        #ffffff;
  --color-text:      #111111;
  --color-muted:     #999999;
  --color-border:    #e8e8e8;
  --color-accent:    #111111;
  --font-display:    'Geist', system-ui, sans-serif;
  --font-body:       'Geist', system-ui, sans-serif;
  --header-h:        44px;
  --left-w:          1fr;
  --right-w:         1fr;
  --transition:      0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; object-fit: cover; }
button { font: inherit; cursor: pointer; background: none; border: none; }

/* ============================================================
   HEADER
============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  z-index: 100;
}

.header-logo {
  width: 29%;
  flex-shrink: 0;
  padding: 0 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  /* Logo image fades out on collapse (no hard clip needed) */
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.header-logo img {
  height: 22px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.header-center {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  height: 100%;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 24px;
  flex: 1;
}

.nav-link {
  font-size: 13px;
  color: var(--color-muted);
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.2s;
  position: relative;
}
.nav-link:hover { color: var(--color-text); }
.nav-link.active { color: var(--color-text); font-weight: 500; }
.nav-sep { color: var(--color-border); font-size: 13px; margin: 0 2px; user-select: none; }

#live-clock {
  padding: 0 20px;
  font-size: 12px;
  color: var(--color-muted);
  border-left: 1px solid var(--color-border);
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
}

.header-cta {
  width: 29%;
  flex-shrink: 0;
  padding: 0 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
  cursor: pointer;
  transition: opacity 0.2s;
}
.header-cta:hover { opacity: 0.5; }

/* ============================================================
   MAIN LAYOUT — 3-column flex below fixed header.
   Flex is used instead of grid so the sidebar width transition
   only affects one element (no full-grid relayout each frame).
============================================================ */
#layout {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  padding-top: var(--header-h);
}

/* ---- Left Sidebar ---- */
#sidebar-left {
  width: 29%;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow: visible; /* allow toggle button to bleed past border */
  z-index: 5; /* paints above #main-content so toggle btn is always clickable */
}

/* Inner wrapper clips collapsing content; toggle button lives outside this */
.sidebar-inner {
  overflow: hidden;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 28px;
}

.sidebar-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 3.8vw, 58px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 0;
}

.sidebar-social {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  width: fit-content;
}

.social-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.45;
  transition: opacity 0.2s;
  cursor: pointer;
}
.social-icon:hover { opacity: 1; }
.social-icon svg { width: 14px; height: 14px; flex-shrink: 0; }
/* Labels use only GPU-composited properties — no layout triggers */
.social-icon span {
  font-size: 12px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
  /* expanding: labels drift in after column opens */
  transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}


/* ---- Main Content ---- */
#main-content {
  flex: 1;
  min-width: 0; /* prevent overflow from wide content (marquee etc.) */
  border-right: 1px solid var(--color-border);
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
}

/* ---- Right Sidebar ---- */
#sidebar-right {
  width: 29%;
  flex-shrink: 0;
  min-width: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  padding: 0;           /* padding moved to .right-content so overflow-y works */
  overflow-y: auto;     /* allows scrolling if video is taller than viewport */
  overflow-x: hidden;
  /* hide scrollbar visually but keep functionality */
  scrollbar-width: none;
}
#sidebar-right::-webkit-scrollbar { display: none; }
/* Right sidebar content: padding here (not on #sidebar-right) so scroll works.
   height: auto overrides the generic .right-content.active height:100% so the
   content can grow taller than the sticky viewport and be scrolled. */
#sidebar-right .right-content.active {
  padding: 24px 24px 28px;
  height: auto;
  min-height: 100%;
}

.availability-badge {
  font-size: 12px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.availability-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* 2-column upper block: badge left, photo right */
.right-upper {
  display: grid;
  grid-template-columns: 1fr 55%;
  gap: 0;
  align-items: start;
}

.right-upper-badge {
  padding-top: 2px;
}

.profile-photo {
  width: 100%;
  background: #f0f0f0;
  /* No fixed aspect-ratio — let media show at its natural full height */
}
.profile-photo img,
.profile-photo video { width: 100%; height: auto; display: block; }

/* Variant used in work/contact right sidebars */
.profile-photo-full {
  width: 100%;
  background: #f0f0f0;
}
.profile-photo-full img,
.profile-photo-full video { width: 100%; height: auto; display: block; }

.profile-meta {
  margin-top: 12px;
  text-align: right;
}
.profile-meta p {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.8;
}

.sidebar-contact {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
.sidebar-contact p {
  font-size: 11px;
  color: var(--color-muted);
  line-height: 1.9;
}
.sidebar-contact a:hover { color: var(--color-text); }

/* ============================================================
   PAGE TRANSITIONS
============================================================ */
.page {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
}
.page.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.page.fade-in {
  animation: pageIn 0.35s ease forwards;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HOME PAGE
============================================================ */
.section-bio {
  padding: 20px 24px 200px;
  border-bottom: 1px solid var(--color-border);
}

.bio-text {
  font-size: 23px;
  font-weight: 400;
  line-height: 1.30;
  max-width: 580px;
  letter-spacing: -0.01em;
}
.bio-text .muted { color: var(--color-muted); }

.section-work {
  padding: 0 24px 32px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}
.section-header h3 { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; }
.section-count { font-size: 11px; color: var(--color-muted); }

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.work-item {
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.work-item-img {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.work-item-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.work-item:hover .work-item-img img { transform: scale(1.03); }

.work-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}
.work-item:hover .work-item-overlay { opacity: 1; }
.overlay-text h4 { font-size: 15px; color: #fff; font-family: var(--font-display); }
.overlay-text p  { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 3px; }

.work-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}
.work-item-title { font-size: 12px; font-weight: 500; }
.work-item-info  { font-size: 11px; color: var(--color-muted); }

/* ============================================================
   INFO / ABOUT PAGE
============================================================ */
.about-bio {
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--color-border);
}

/* Large statement heading */
.about-lead {
  font-size: 23px;
  font-weight: 400;
  line-height: 1.30;
  max-width: 580px;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 16px;
}

.about-sub {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 560px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--color-border);
}

.stat-item {
  padding: 18px 24px;
  border-right: 1px solid var(--color-border);
}
.stat-item:last-child { border-right: none; }
.stat-num { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 11px; color: var(--color-muted); margin-top: 2px; line-height: 1.4; }

/* Marquee */
.marquee-wrap {
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  padding: 16px 0;
  max-width: 100%;
}
.marquee-track {
  display: flex;
  gap: 0;
  animation: marqueeScroll 40s linear infinite;
  width: max-content;
}
.marquee-track span {
  font-size: 12px;
  color: var(--color-muted);
  letter-spacing: 0.08em;
  padding: 0 32px;
  white-space: nowrap;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* Achievements */
.achieve-section { padding: 0 24px; }
.achieve-header {
  padding: 20px 0 14px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--color-border);
}
.achieve-list { }
.achieve-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
}
.achieve-year {
  font-size: 11px;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}
.achieve-text {
  font-size: 13px;
  line-height: 1.5;
}
.achieve-by {
  color: var(--color-muted);
  font-size: 12px;
}

/* Core Skills */
.skills-section { padding: 0 24px; }
.skills-header {
  padding: 20px 0 14px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--color-border);
}
.skills-grid { }
.skill-group {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
}
.skill-group-label {
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 1px;
}
.skill-group-items {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.55;
}

/* Software Stack */
.stack-section { padding: 0 24px; }
.stack-header {
  padding: 20px 0 14px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--color-border);
}
.stack-category {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
}
.stack-cat-label {
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 2px;
}
.stack-cat-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
}
.stack-cat-items span {
  font-size: 12px;
  color: var(--color-text);
}
.stack-cat-items span::after {
  content: ',';
  color: var(--color-muted);
  margin-right: 6px;
}
.stack-cat-items span:last-child::after { content: ''; }

/* Experience */
.exp-section { padding: 0 24px; }
.exp-header {
  padding: 20px 0 14px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--color-border);
}

/* Education */
.edu-section { padding: 0 24px 32px; }
.edu-header {
  padding: 20px 0 14px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--color-border);
}
.exp-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.exp-left-title { font-size: 12px; font-weight: 500; margin-bottom: 3px; }
.exp-left-sub   { font-size: 11px; color: var(--color-muted); line-height: 1.5; }
.exp-desc       { font-size: 12px; color: var(--color-muted); line-height: 1.7; }

/* Achievements, right sidebar on about page */
.achievements-list { margin-top: 8px; }
.achievement-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.achievement-year { font-size: 11px; color: var(--color-muted); padding-top: 2px; }
.achievement-text h5 { font-size: 12px; font-weight: 500; line-height: 1.4; }
.achievement-text p  { font-size: 11px; color: var(--color-muted); margin-top: 2px; }

/* ============================================================
   WORK PAGE
============================================================ */
.work-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.work-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 11px;
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
  background: transparent;
  font-family: inherit;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* Sort toggle buttons */
.work-sort {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.work-sort-label {
  font-size: 10px;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 4px;
}
.sort-btn {
  font-size: 11px;
  font-family: inherit;
  padding: 4px 11px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: 0.01em;
  transition: all 0.2s;
}
.sort-btn.active {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}
.sort-btn:hover:not(.active) {
  color: var(--color-text);
  border-color: var(--color-text);
}

.work-full-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 15px 15px;
}

.work-full-item {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.work-full-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}
.work-full-img img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s ease;
}
.work-full-item:hover .work-full-img img { transform: scale(1.05); }

.work-full-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.work-full-item:hover .work-full-overlay { opacity: 1; }
.work-full-overlay h4 { font-size: 13px; color: #fff; font-family: var(--font-display); font-weight: 600; }
.work-full-overlay p  { font-size: 10px; color: rgba(255,255,255,0.7); margin-top: 3px; }

.work-full-meta {
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
}
.work-full-meta .title { font-size: 12px; font-weight: 500; }
.work-full-meta .year  { font-size: 11px; color: var(--color-muted); }

/* ============================================================
   PROJECT DETAIL PAGE
============================================================ */
.project-desc {
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--color-border);
}

.project-lead {
  font-size: 14px;
  line-height: 1.65;
  max-width: 100%;
}

.project-images {
  padding: 0 24px 28px;
}

.project-img-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 12px;
}
.project-img-header span { font-size: 12px; font-weight: 500; }
.project-img-header small { font-size: 11px; color: var(--color-muted); }

.project-big-img {
  width: 100%;
  height: 360px;
  overflow: hidden;
  margin-bottom: 10px;
}
.project-big-img img { height: 100%; }

.project-img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.project-img-grid div { height: 180px; overflow: hidden; }
.project-img-grid div img { height: 100%; width: 100%; object-fit: cover; }

.project-sidebar-meta {
  padding: 20px 0;
}
.meta-section { margin-bottom: 16px; }
.meta-label { font-size: 10px; color: var(--color-muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.meta-text { font-size: 12px; line-height: 1.6; }

.next-project {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  text-align: right;
  cursor: pointer;
}
.next-project small { font-size: 10px; color: var(--color-muted); display: block; margin-bottom: 4px; }
.next-project span  { font-size: 13px; font-weight: 500; transition: opacity 0.2s; }
.next-project:hover span { opacity: 0.5; }

/* Left sidebar on project detail — sticks to bottom of scrollable sidebar */
.project-left-meta {
  position: sticky;
  bottom: 0;
  background: var(--color-bg);
  margin-top: 24px;
  padding-top: 8px;
}
.project-left-meta table { width: 100%; border-collapse: collapse; }
.project-left-meta td {
  padding: 10px 0;
  font-size: 12px;
  border-top: 1px solid var(--color-border);
}
.project-left-meta td:first-child { color: var(--color-muted); }
.project-left-meta td:last-child  { text-align: right; font-weight: 500; }

/* Left sidebar description on project detail page */
#left-proj-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--color-text);
  margin-top: 4px;
}
#left-proj-desc p  { margin-bottom: 10px; }
#left-proj-desc ul { padding-left: 16px; margin-bottom: 10px; }
#left-proj-desc li { margin-bottom: 4px; }
#left-proj-desc strong { font-weight: 600; }
#left-proj-desc .proj-cta { font-weight: 600; font-size: 14px; margin-top: 6px; }

/* Make left sidebar scrollable on project page */
#sidebar-left { overflow-y: auto; }
#sidebar-left .sidebar-inner { overflow: visible; }

.project-thumbnail {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  margin-top: 24px;
}
.project-thumbnail img { height: 100%; }
.project-thumb-label { font-size: 11px; color: var(--color-muted); margin-top: 8px; text-align: center; }

/* ============================================================
   CONTACT PAGE
============================================================ */
.contact-page {
  padding: 0 15px;
}

.contact-title {
  font-size: 23px;
  font-weight: 400;
  line-height: 1.30;
  max-width: 580px;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 16px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.contact-row label { font-size: 11px; color: var(--color-muted); }
.contact-row a { font-size: 13px; font-weight: 500; transition: opacity 0.2s; }
.contact-row a:hover { opacity: 0.5; }

.contact-socials {
  display: flex;
  gap: 16px;
}
.contact-socials a {
  font-size: 12px;
  color: var(--color-muted);
  transition: color 0.2s;
}
.contact-socials a:hover { color: var(--color-text); }

/* Section labels for contact page */
.contact-section-label {
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 20px 0 12px;
  border-top: 1px solid var(--color-border);
  margin-top: 24px;
}
.contact-section-heading {
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0;
  text-transform: uppercase;
  padding: 16px 0 12px;
}

/* ── Contact Form ── */
.contact-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 10px 0;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--color-text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  outline: none;
  transition: border-color 0.2s;
}
.form-input::placeholder { color: #bbb; }
.form-input:focus { border-bottom-color: var(--color-text); }

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-submit {
  margin-top: 8px;
  align-self: flex-start;
  padding: 11px 28px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-bg);
  background: var(--color-text);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.form-submit:hover   { opacity: 0.75; }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* Thank you message */
.form-success {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.form-success-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 4px;
}
.form-success h3 { font-size: 18px; font-weight: 500; }
.form-success p  { font-size: 13px; color: var(--color-muted); }

/* Marquee CTA */
.marquee-cta {
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
  margin-top: 0;
  max-width: 100%;
}
.marquee-cta-track {
  display: flex;
  align-items: center;
  animation: marqueeScroll 40s linear infinite;
  width: max-content;
}
.marquee-cta-track span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0 18px;
  color: var(--color-text);
}
.marquee-cta-track .sep { color: var(--color-muted); padding: 0 4px; }

/* ============================================================
   STATIC SIDEBARS — only the home version is ever active
   left-home / right-home keep their active class permanently
============================================================ */
.left-content  { display: none; }
.left-content.active  { display: flex; flex-direction: column; height: 100%; }
.right-content { display: none; }
.right-content.active { display: flex; flex-direction: column; height: 100%; }

/* ============================================================
   COLLAPSIBLE LEFT SIDEBAR
   Strategy: animate width on #sidebar-left (flex child) and
   .header-logo (also a flex child). Width transitions on a
   single flex element are vastly cheaper than grid-template-
   columns transitions (no full grid relayout per frame).
   All inner content uses opacity + transform (GPU composited).
============================================================ */

/* Sidebar: width transition drives the collapse */
#sidebar-left {
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
}

/* Header logo column tracks sidebar width */
.header-logo {
  /* transition already declared in .header-logo base rule */
}

/* Headline — GPU only. Open: delayed reveal after column expands */
.sidebar-headline {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
  will-change: opacity, transform;
}


/* ============================================================
   PROJECT DETAIL — center column layout
============================================================ */
.proj-page-header { padding: 20px 24px 16px; border-bottom: 1px solid var(--color-border); }
.proj-page-cat  { font-size: 11px; color: var(--color-muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.proj-page-title { font-size: 22px; font-weight: 400; letter-spacing: -0.01em; margin-bottom: 10px; }
.proj-page-meta-row { display: flex; gap: 24px; font-size: 12px; color: var(--color-muted); }
.proj-page-meta-row strong { color: var(--color-text); font-weight: 500; margin-left: 4px; }
.proj-page-thumb { padding: 0 24px; margin: 20px 0 0; }
.proj-page-thumb img { width: 100%; max-height: 380px; object-fit: cover; display: block; }

/* YouTube thumbnail player (thumbnail + play overlay → opens YouTube link).
   Avoids Error 153 caused by creator disabling iframe embedding. */
.proj-youtube-wrap {
  padding: 20px 15px;
}
.proj-yt-thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}
.proj-yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}
.proj-yt-thumb:hover img { opacity: 0.75; }

/* Play button circle */
.proj-yt-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}
.proj-yt-play-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}
.proj-yt-thumb:hover .proj-yt-play-circle {
  transform: scale(1.1);
  background: #fff;
}
.proj-yt-play-circle svg {
  width: 26px;
  height: 26px;
  fill: #111;
  margin-left: 4px; /* optical center for play triangle */
}
.proj-yt-label {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Subscribe button */
.proj-subscribe-row {
  margin-top: 18px;
}
.proj-yt-subscribe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: #ff0000;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.proj-yt-subscribe:hover { background: #cc0000; }
.proj-yt-subscribe svg { flex-shrink: 0; }

/* Description with HTML content (bullet lists, paragraphs) */
.project-lead p { font-size: 13px; line-height: 1.75; color: var(--color-muted); margin-bottom: 10px; }
.project-lead p:last-child { margin-bottom: 0; }
.project-lead ul { margin: 8px 0 12px 16px; }
.project-lead ul li { font-size: 13px; line-height: 1.7; color: var(--color-muted); list-style: disc; }
.project-lead .proj-cta { font-size: 14px; font-weight: 600; color: var(--color-text); margin-top: 14px; }

.proj-cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--color-border); }
.proj-cs-block { padding: 20px 24px; }
.proj-cs-block:first-child { border-right: 1px solid var(--color-border); }
.proj-cs-label { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 8px; }
.proj-cs-text  { font-size: 13px; line-height: 1.65; color: var(--color-muted); }

/* Photo gallery grid */
.proj-gallery-section { border-top: 1px solid var(--color-border); }
.proj-gallery-header {
  padding: 16px 15px 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
}
/* ── Masonry gallery — 3 explicit flex columns, images at natural height ── */
.proj-gallery-grid {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 15px 15px;
}
.gal-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.proj-gallery-grid .gal-item {
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 2px;
  display: block;
}
.proj-gallery-grid .gal-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  background: #f0f0f0;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.3s;
}
.proj-gallery-grid .gal-item:hover img {
  transform: scale(1.05);
  opacity: 0.88;
}

/* Same height cycle in every column → columns stay balanced.
   Cycle: landscape → portrait → wide → square → repeat */
.gal-col .gal-item:nth-child(4n+1) img { aspect-ratio: 4/3;  }
.gal-col .gal-item:nth-child(4n+2) img { aspect-ratio: 3/4;  }
.gal-col .gal-item:nth-child(4n+3) img { aspect-ratio: 16/9; }
.gal-col .gal-item:nth-child(4n+4) img { aspect-ratio: 1/1;  }

/* ── Gallery lightbox ── */
#gal-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
#gal-lightbox.open {
  display: flex;
  opacity: 1;
}

#gal-lb-img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  border-radius: 3px;
  user-select: none;
  transition: opacity 0.18s ease;
}

/* Prev / Next arrows */
.gal-lb-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 26px;
  font-family: Arial, sans-serif;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
  z-index: 10000;
  user-select: none;
}
.gal-lb-btn:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-50%) scale(1.08);
}
#gal-lb-prev { left: 24px; }
#gal-lb-next { right: 24px; }

/* Close button */
#gal-lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10000;
}
#gal-lb-close:hover { background: rgba(255,255,255,0.22); }

/* Counter */
#gal-lb-counter {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.12em;
  z-index: 10000;
}

.proj-next { display: block; padding: 20px 15px; border-top: 1px solid var(--color-border); cursor: pointer; }
.proj-next:hover .proj-next-name { text-decoration: underline; }
.proj-next small { font-size: 11px; color: var(--color-muted); display: block; margin-bottom: 4px; }
.proj-next-name { font-size: 14px; font-weight: 500; }

/* ============================================================
   ABOUT LEFT SIDEBAR
============================================================ */
.about-left-photo {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  margin-top: 24px;
}
.about-left-photo img,
.about-left-photo video { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-copyright {
  font-size: 12px;
  color: var(--color-muted);
  text-align: right;
  margin-top: 8px;
}

/* ============================================================
   WORK LEFT SIDEBAR
============================================================ */
.work-intro {
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.7;
}

/* ============================================================
   FOOTER IN CENTER (home)
============================================================ */
.center-footer {
  padding: 24px 32px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.center-footer small { font-size: 11px; color: var(--color-muted); }

/* ============================================================
   RESPONSIVE, tablet/mobile fallback
============================================================ */
@media (max-width: 1024px) {
  :root { --left-w: 220px; --right-w: 220px; }
  .sidebar-headline { font-size: 48px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stats-row .stat-item:nth-child(2) { border-right: none; }
}

@media (max-width: 768px) {
  .header-logo { width: auto; transition: none; }
  .header-cta  { display: none; }
  .header-center { display: none; }
  #sidebar-left { display: none; }            /* left hidden on mobile */
  #live-clock { display: none; }
  .work-full-grid { grid-template-columns: 1fr; }
  .work-full-item { border-right: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .hamburger-btn { display: flex !important; }
  .work-controls { flex-direction: column; align-items: flex-start; gap: 8px; }
  .work-sort { width: 100%; justify-content: flex-end; }

  /* ── Mobile page heading (hidden on desktop) ── */
  .mobile-page-heading {
    display: block;
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 700;
    line-height: 1.15;
    padding: 28px 15px 22px;
    border-bottom: 1px solid var(--color-border);
    letter-spacing: -0.02em;
    color: var(--color-text);
  }

  /* ── Stack layout vertically so right sidebar sits below main content ── */
  #layout {
    flex-direction: column;
    align-items: stretch; /* children must fill full width, not shrink to content */
  }
  #main-content {
    min-height: unset;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  /* ── Right sidebar — compact bottom strip ── */
  #sidebar-right {
    display: block !important;
    width: 100%;
    position: static;   /* no longer sticky */
    height: auto;
    border-left: none;
    border-top: none;
    overflow: visible;
  }
  #sidebar-right .right-content.active {
    height: auto !important;
    padding: 16px 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border-top: 1px solid var(--color-border);
  }
  /* Badge row — wraps so photo (order:-1) floats above it */
  #sidebar-right .right-upper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  #sidebar-right .right-upper-badge {
    padding-top: 0;
  }
  /* Large image — full width, no crop, image only (no video) */
  #sidebar-right .profile-photo {
    width: 100%;
    height: auto;
    border-radius: 0;
    overflow: hidden;
    background: #f0f0f0;
    margin-left: 0;
    order: -1; /* move photo above badge row */
  }
  #sidebar-right .profile-photo video {
    display: none !important; /* hide video on mobile */
  }
  #sidebar-right .profile-photo img {
    display: block !important;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0;
  }
  /* Meta: stacked below badge row */
  #sidebar-right .profile-meta {
    margin-top: 0;
    text-align: left;
    width: 100%;
  }
  #sidebar-right .profile-meta p {
    font-size: 11px;
    line-height: 1.6;
    margin: 0;
  }
  /* Contact: stacked below meta */
  #sidebar-right .sidebar-contact {
    margin-top: 4px !important;
    margin-left: 0;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    text-align: left;
    width: 100%;
    flex-shrink: 0;
  }
  #sidebar-right .sidebar-contact p {
    font-size: 11px;
    line-height: 1.7;
  }
}

/* ============================================================
   HAMBURGER BUTTON
============================================================ */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  margin-right: 12px;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: 0.25s ease;
}

/* ============================================================
   MOBILE DRAWER
============================================================ */
#mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 200;
}
#mobile-overlay.open { display: block; }

#mobile-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 88vw);
  height: 100vh;
  background: var(--color-bg);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
  overflow-y: auto;
  border-left: 1px solid var(--color-border);
}
#mobile-drawer.open { transform: translateX(0); }

.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  padding: 20px;
  min-height: 100%;
}

.mobile-drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-text);
  margin-bottom: 32px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 32px;
}
#mobile-drawer .mobile-nav a {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #b3b3b3 !important;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none !important;
  display: block;
  transition: opacity 0.2s;
}
#mobile-drawer .mobile-nav a:first-child { border-top: 1px solid var(--color-border); }
#mobile-drawer .mobile-nav a:hover { color: #000000 !important; }
#mobile-drawer .mobile-nav a.active { color: #000000 !important; font-weight: 700 !important; }

.mobile-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: auto;
}
.mobile-social-grid a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text) !important;
  padding: 9px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none !important;
  transition: background 0.2s;
  white-space: nowrap;
  overflow: hidden;
}
.mobile-social-grid a:hover { background: #f5f5f5; }
.mobile-social-grid svg { flex-shrink: 0; }

.mobile-drawer-footer {
  margin-top: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  font-size: 11px;
  color: var(--color-muted);
  text-align: center;
}
.mobile-drawer-footer a { color: var(--color-text); }

/* ============================================================
   FEATURED PAGE
============================================================ */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--color-border);
  border-top: 1px solid var(--color-border);
}

.feat-card {
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.2s;
}
.feat-card:hover { background: #fafafa; }

/* Thumbnail area (YouTube or icon placeholder) */
.feat-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: #f0f0f0;
  flex-shrink: 0;
}
.feat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, opacity 0.3s;
}
.feat-thumb:hover img { transform: scale(1.04); opacity: 0.88; }

/* Text/icon thumb for non-YouTube platforms */
.feat-thumb--text {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}
.feat-thumb-icon {
  opacity: 0.28;
  transition: opacity 0.2s;
}
.feat-thumb--text:hover .feat-thumb-icon { opacity: 0.5; }

/* Play overlay on YouTube thumbs */
.feat-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: background 0.2s;
}
.feat-thumb:hover .feat-play { background: rgba(0,0,0,0.18); }
.feat-play svg {
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.55));
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s, transform 0.2s;
}
.feat-thumb:hover .feat-play svg { opacity: 1; transform: scale(1); }

/* Card body */
.feat-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.feat-platform-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.feat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px 3px 6px;
  border: 1px solid;
  border-radius: 2px;
  line-height: 1.3;
}

.feat-date {
  font-size: 10px;
  color: var(--color-muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.feat-channel {
  font-size: 11px;
  color: var(--color-muted);
  line-height: 1.4;
}

.feat-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text);
}

.feat-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text);
  margin-top: auto;
  padding-top: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}
.feat-link:hover { opacity: 0.45; }

/* Mobile: single column */
@media (max-width: 768px) {
  .featured-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   UTILITY
============================================================ */
.hidden { display: none !important; }
.text-muted { color: var(--color-muted); }
.mt-auto { margin-top: auto; }
.mobile-page-heading { display: none; } /* shown only inside @media (max-width: 768px) */
