/* ── FONT FACE ── */
@font-face {
  font-family: 'BOTCH';
  src: url('fonts/BOTCH.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.botch-font {
  font-family: 'BOTCH', 'Montserrat', sans-serif;
  letter-spacing: -0.02em;
}

/* ── CSS CUSTOM PROPERTIES ── */
:root {
  --pink:         #ff2d78;
  --sidebar-w:    220px;
  --subtab-w:     240px;
  --transition:   0.2s ease;
  --pill-radius:  9px;
}

/* ── DARK MODE (2 colours) ── */
[data-theme="dark"] {
  --c1:         #1a1a1a;   /* background everywhere */
  --c2:         #2e2e2e;   /* hover, borders, cards */
  --text:       #f0ece4;
  --text-muted: rgba(240, 236, 228, 0.42);
}

/* ── LIGHT MODE (2 colours) ── */
[data-theme="light"] {
  --c1:         #f0ece4;   /* background everywhere */
  --c2:         #dbd7cf;   /* hover, borders, cards */
  --text:       #1a1a1a;
  --text-muted: rgba(26, 26, 26, 0.42);
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--c1);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}

ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ── LAYOUT ── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── PRIMARY SIDEBAR ── */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--c1);
  border-right: 1px solid var(--c2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
  z-index: 10;
}

#sidebar-top {
  padding: 32px 24px 20px;
  flex-shrink: 0;
}

#logo {
  color: var(--text);
  transition: color var(--transition);
}

#epsoya-logo {
  width: 100%;
  max-width: 160px;
  height: auto;
  display: block;
  fill: currentColor;
  transition: fill var(--transition);
}

/* ── MAIN NAV ── */
#main-nav {
  padding: 8px 0;
  flex-shrink: 0;
}

/* ── PILL BLOCK — reusable floating pill shape ── */
.pill-block {
  margin: 3px 8px;
  border-radius: var(--pill-radius);
  position: relative;
}

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  margin: 3px 8px;
  border-radius: var(--pill-radius);
  position: relative;
  transition: background var(--transition);
  overflow: hidden;
}

/* Pink accent bar inside the pill */
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 58%;
  background: var(--pink);
  border-radius: 0 2px 2px 0;
  transition: transform 0.2s ease;
}

.nav-item:hover        { background: var(--c2); }
.nav-item.active       { background: var(--c2); }
.nav-item.active::before { transform: translateY(-50%) scaleY(1); }

.nav-num {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.28;
  transition: opacity var(--transition);
  min-width: 24px;
}

.nav-item:hover .nav-num,
.nav-item.active .nav-num { opacity: 1; }

.nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── SIDEBAR BOTTOM — combined pill ── */
#sidebar-bottom {
  margin-top: auto;
  padding: 0 0 16px;
  flex-shrink: 0;
}

.bottom-pill {
  background: var(--c2);
  overflow: hidden;
}

#theme-toggle {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px;
  display: block;
  width: 100%;
  text-align: left;
  transition: color var(--transition);
}

#theme-toggle:hover { color: var(--text); }

.bottom-pill-sep {
  height: 1px;
  background: var(--c1);
  margin: 0 14px;
  opacity: 0.5;
}

.shortcuts-list {
  padding: 8px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcut-key {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--pink);
  min-width: 28px;
}

.shortcut-desc {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ── SUBTAB PANEL (second column) ── */
#subtab-panel {
  width: var(--subtab-w);
  min-width: var(--subtab-w);
  height: 100vh;
  background: var(--c1);
  border-right: 1px solid var(--c2);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  transition: background var(--transition), border-color var(--transition);
}

#subtab-panel:empty { display: none; }

/* Content wrapper — animated via GSAP marginTop */
.subtab-content-wrap {
  padding: 0;
}

.subtab-items {
  padding: 0 0 24px;
}

.subtab-item {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin: 3px 8px;
  border-radius: var(--pill-radius);
  transition: color var(--transition), background var(--transition);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtab-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 58%;
  background: var(--pink);
  border-radius: 0 2px 2px 0;
  transition: transform 0.2s ease;
}

.subtab-item:hover        { color: var(--text); background: var(--c2); }
.subtab-item.active       { color: var(--text); background: var(--c2); font-weight: 600; }
.subtab-item.active::before { transform: translateY(-50%) scaleY(1); }

.subtab-item.focused {
  outline: 1px solid var(--pink);
  outline-offset: -1px;
  color: var(--text);
}

/* ── MAIN CONTENT ── */
#main {
  flex: 1;
  height: 100vh;
  overflow: hidden;
  position: relative;
  min-width: 0;
}

#content {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--c2) transparent;
}

#content::-webkit-scrollbar       { width: 4px; }
#content::-webkit-scrollbar-track { background: transparent; }
#content::-webkit-scrollbar-thumb { background: var(--c2); border-radius: 2px; }

/* ── HOME ── */
#home-content {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.home-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110vw;
  max-width: 1800px;
  z-index: 0;
  color: var(--text);
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

.home-bg-svg {
  width: 100%;
  height: auto;
  display: block;
}

[data-theme="light"] .home-bg { opacity: 0.06; }

.home-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 64px 72px;
}

.home-hero-name {
  font-size: clamp(72px, 10vw, 140px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 24px;
}

.home-tagline {
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 12px;
  max-width: 520px;
}

.home-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.65;
  margin-bottom: 56px;
}

.home-instructions {
  border: 1px solid var(--c2);
  background: var(--c2);
  padding: 24px 28px;
  max-width: 400px;
  border-radius: 12px;
}

.home-instructions h3 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 14px;
  font-family: 'Montserrat', sans-serif;
}

.home-instructions ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.home-instructions li {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.home-instructions li .key {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--pink);
  min-width: 28px;
}

/* ── PROJECTS – PREVIEW PANEL ── */
#projects-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.tab-header {
  padding: 48px 56px 32px;
  flex-shrink: 0;
}

.tab-title {
  font-size: clamp(36px, 4.5vw, 68px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}

.tab-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview-panel {
  flex: 1;
  overflow-y: auto;
  padding: 0 56px 48px;
  scrollbar-width: thin;
  scrollbar-color: var(--c2) transparent;
}

.preview-panel::-webkit-scrollbar       { width: 4px; }
.preview-panel::-webkit-scrollbar-thumb { background: var(--c2); border-radius: 2px; }

.preview-empty-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  max-width: 360px;
}

.preview-empty-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 12px;
}

.preview-empty-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.preview-empty-keys {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-key {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--pink);
  min-width: 28px;
  letter-spacing: 0.02em;
}

.preview-key-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.preview-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--c2);
  border-radius: 12px;
  overflow: hidden;
  max-width: 820px;
  background: var(--c2);
}

.preview-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--c2);
}

.preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.preview-info {
  padding: 32px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--c1);
}

.preview-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.preview-meta span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.preview-title {
  font-size: clamp(20px, 2.6vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 14px;
  color: var(--text);
}

.preview-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 28px;
  font-weight: 400;
}

.preview-btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  flex-wrap: wrap;
}

.btn-view-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c1);
  background: var(--text);
  padding: 11px 20px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition), transform 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-view-more:hover {
  background: var(--pink);
  color: #fff;
  transform: translateY(-1px);
}

.btn-visit-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  padding: 10px 19px;
  border-radius: 6px;
  border: 1px solid var(--c2);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), transform 0.15s ease;
}

.btn-visit-site:hover {
  border-color: var(--pink);
  color: var(--pink);
  transform: translateY(-1px);
}

/* ── ARCHIVE — work in progress ── */
#archive-content {
  position: relative;
  min-height: 100vh;
}

.wip-badge {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink);
  border: 1px solid var(--pink);
  border-radius: 20px;
  padding: 6px 14px;
  margin-bottom: 20px;
}

.wip-title {
  font-size: clamp(40px, 6vw, 90px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 24px;
  max-width: 700px;
}

.btn-goto-projects {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c1);
  background: var(--text);
  padding: 11px 20px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition), transform 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-goto-projects:hover {
  background: var(--pink);
  color: #fff;
  transform: translateY(-1px);
}

/* ── PROJECT DETAIL (inline) ── */
.project-detail-inline {
  min-height: 100vh;
  padding: 48px 56px 96px;
  max-width: 860px;
  margin: 0 auto;
}

.project-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 48px;
  padding: 0;
  transition: color var(--transition);
}

.project-back-btn:hover { color: var(--text); }
.project-back-btn::before { content: '←'; font-size: 14px; }

.project-detail-hero {
  width: 100%;
  aspect-ratio: 16/7;
  background: var(--c2);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
  border: 1px solid var(--c2);
}

.project-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-detail-hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-detail-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 14px;
}

.project-detail-meta span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-detail-title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 32px;
  color: var(--text);
}

.project-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c1);
  background: var(--text);
  padding: 11px 20px;
  border-radius: 6px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), transform 0.15s ease;
  margin-bottom: 32px;
}

.project-detail-link:hover {
  background: var(--pink);
  color: #fff;
  transform: translateY(-1px);
}

.project-detail-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 600px;
  font-weight: 400;
}

.project-detail-body p + p { margin-top: 20px; }

/* ── ABOUT ── */
#about-content {
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--c2) transparent;
}

#about-content::-webkit-scrollbar       { width: 4px; }
#about-content::-webkit-scrollbar-thumb { background: var(--c2); border-radius: 2px; }

.about-panel {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 64px;
}

.about-section-title {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 40px;
  color: var(--text);
}

.about-intro {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  align-items: start;
}

.about-intro-text p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
  font-weight: 400;
}

.about-intro-text p + p { margin-top: 16px; }

.about-photo {
  aspect-ratio: 3/4;
  background: var(--c2);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

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

.education-timeline {
  display: flex;
  flex-direction: column;
  max-width: 660px;
}

.edu-block {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--c2);
}

.edu-block:first-child { padding-top: 0; }
.edu-block:last-child  { border-bottom: none; }

.edu-year {
  font-size: 11px;
  font-weight: 700;
  color: var(--pink);
  letter-spacing: 0.06em;
  padding-top: 3px;
}

.edu-name        { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.edu-institution { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.edu-desc        { font-size: 12px; color: var(--text-muted); line-height: 1.65; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  max-width: 740px;
}

.skill-item { display: flex; flex-direction: column; gap: 8px; }

.skill-header { display: flex; justify-content: space-between; align-items: center; }

.skill-name  { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.skill-level { font-size: 10px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.06em; }

.skill-bar-track {
  height: 3px;
  background: var(--c2);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--pink);
  border-radius: 2px;
  transform-origin: left;
}

.future-text { max-width: 600px; }

.future-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
  font-weight: 400;
}

.future-text p + p { margin-top: 20px; }

/* ── PROJECT DETAIL PAGE – project.html standalone ── */
body.project-page { overflow-y: auto; height: auto; }

body.project-page #app {
  height: auto;
  min-height: 100vh;
  display: block;
}

body.project-page .project-detail-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 48px 96px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  :root { --subtab-w: 200px; }
  .preview-card  { grid-template-columns: 1fr; }
  .about-intro   { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  :root { --sidebar-w: 180px; --subtab-w: 170px; }
  .home-text             { padding: 48px 28px; }
  .home-bg               { width: 160vw; }
  .tab-header            { padding: 32px 28px 24px; }
  .preview-panel         { padding: 0 28px 40px; }
  .about-panel           { padding: 40px 28px; }
  .project-detail-inline { padding: 36px 24px 64px; }
}
