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

/* ── THEME VARIABLES ── */
:root {
  --bg:        #000000;
  --bg2:       #0f0f0f;
  --bg3:       #161616;
  --fg:        #e8e6e0;
  --fg2:       #aaa;
  --fg3:       #777;
  --fg4:       #555;
  --fg5:       #333;
  --border:    #252422;
  --border2:   #2e2c2a;
  --border3:   #1e1e1c;
  --foot-link: #e8e6e0;
  --grid-w:    830px;
  --gap:       8px;
}

.light-mode,
body.light-mode {
  --bg:        #f2f0eb;
  --bg2:       #f2f0eb;
  --bg3:       #e4e1d9;
  --fg:        #111110;
  --fg2:       #444;
  --fg3:       #666;
  --fg4:       #888;
  --fg5:       #bbb;
  --border:    #d8d5cf;
  --border2:   #ccc9c1;
  --border3:   #ddd;
  --foot-link: #111110;
  --gap:       8px;
}

/* ── BASE ── */
body {
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  color: var(--fg);
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.light-mode {
  background: #f2f0eb;
}

/* ── OUTER SHELL ── */
.pf {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1400px;
  position: relative;
  transition: background 0.3s, color 0.3s;
  padding: 3rem 0 0;
}

/* ── TOPROW ── */
.toprow {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-bottom: 1.4rem;
  width: var(--grid-w);
  margin-left: auto;
  margin-right: auto;
}

.greeting {
  font-size: 1rem;
  font-weight: 300;
  color: var(--fg3);
  margin-bottom: 0.25rem;
  min-height: 1.3rem;
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

.big-name {
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.bio {
  font-size: 0.68rem;
  color: var(--fg3);
  line-height: 1.85;
  max-width: 400px;
  font-weight: 300;
  transition: color 0.3s;
}

/* top-right: aligned to sit beside the greeting line */
.topright {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 6px;
  padding-top: 0.15rem;
}

.location-clock {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.63rem;
  color: var(--fg4);
  letter-spacing: 0.08em;
  transition: color 0.3s;
}

.loc-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid var(--fg4);
  flex-shrink: 0;
}

.location-text {
  letter-spacing: 0.12em;
  font-size: 0.6rem;
  color: var(--fg3);
}

.loc-divider {
  color: var(--fg5);
}

.clock {
  font-size: 0.63rem;
  color: var(--fg4);
  letter-spacing: 0.06em;
  transition: color 0.3s;
}

/* ── SUN TOGGLE ── */
.sun-toggle {
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: block;
  opacity: 0.6;
  transition: opacity 0.2s, filter 0.2s;
  border: none;
  background: none;
  outline: none;
  filter: invert(1) sepia(1) saturate(2) hue-rotate(5deg) brightness(1.1);
}
.sun-toggle:hover { opacity: 1; }

.light-mode .sun-toggle,
body.light-mode .sun-toggle {
  filter: invert(1) brightness(0);
  opacity: 0.7;
}
body.light-mode .sun-toggle:hover { opacity: 1; }

/* ── BENTO GRID ── */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--gap);
  width: var(--grid-w);
  margin: 0 auto;
  min-height: 0;
}

.box {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 140px;
  transition: background 0.15s, border-color 0.3s;
}
.box:hover { background: var(--bg3); transition: background 0.15s; }

.box.guest {
  grid-column: 3;
  grid-row: 1 / 3;
  cursor: default;
}
.box.guest:hover { background: var(--bg2); }

.box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.box-title {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  font-weight: 700;
  transition: color 0.3s;
}

.box-badge {
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 1px;
}

.badge-green {
  background: rgba(90, 170, 124, 0.1);
  color: #5aaa7c;
  border: 1px solid rgba(90, 170, 124, 0.2);
  cursor: pointer;
}

.badge-gray {
  background: rgba(128, 128, 128, 0.08);
  color: var(--fg4);
  border: 1px solid var(--border2);
}

.box-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── ROW ITEMS ── */
.row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border3);
  font-size: 0.63rem;
  color: var(--fg3);
  cursor: pointer;
  transition: color 0.12s;
  gap: var(--gap);
}
.row-item:last-child { border-bottom: none; }
.row-item:hover { color: var(--fg); }

.arr {
  color: var(--fg5);
  flex-shrink: 0;
}
.row-item:hover .arr { color: var(--fg3); }
.course-section-row:hover .arr { color: var(--fg3); }

.ri-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── SKILLS ── */
.chip-group { margin-bottom: 0.45rem; }

.chip-group-label {
  font-size: 0.52rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg5);
  margin-bottom: 0.25rem;
  transition: color 0.3s;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.chip {
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border: 1px solid var(--border2);
  color: var(--fg4);
  border-radius: 1px;
  transition: border-color 0.3s, color 0.3s;
}
.chip.hi {
  border-color: var(--fg5);
  color: var(--fg3);
}

/* ── GUESTBOOK ── */
.g-notes-area {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
}

.g-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  font-size: 0.65rem;
  color: var(--fg5);
  font-style: italic;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 1rem;
  border-radius: 1px;
  transition: border-color 0.3s, color 0.3s;
}

/* sticky notes as scattered squares */
.sticky-wall {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.sticky-note {
  position: absolute;
  width: 72px;
  height: 72px;
  background: #1e1c12;
  border: 1px solid #35321a;
  border-radius: 1px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}
.sticky-note::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
}
.sticky-note:hover {
  transform: scale(1.12) !important;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.7);
  z-index: 10;
}

.sticky-note-inner {
  padding: 6px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sticky-note-name {
  font-size: 0.42rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a09a5a;
  margin-bottom: 3px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-note-msg {
  font-family: 'Caveat', cursive;
  font-size: 0.58rem;
  color: #c8c090;
  line-height: 1.3;
  overflow: hidden;
  flex: 1;
}

.sticky-sketch-thumb {
  width: 100%;
  flex: 1;
  object-fit: cover;
  display: block;
  opacity: 0.85;
}

/* lightbox for full view */
.note-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 200;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.note-lightbox.open { display: flex; }

.note-lightbox-card {
  background: #1e1c12;
  border: 1px solid #35321a;
  padding: 1.25rem;
  max-width: 420px;
  width: 90%;
  position: relative;
}
.note-lightbox-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
}

.note-lightbox-name {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a09a5a;
  margin-bottom: 0.75rem;
}

.note-lightbox-msg {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  color: #d0c898;
  line-height: 1.6;
}

.note-lightbox-img {
  width: 100%;
  display: block;
  border-radius: 1px;
}

.note-lightbox-close {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: #555;
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
  transition: color 0.15s;
}
.note-lightbox-close:hover { color: #ccc; }



/* ── COURSES ── */
.course-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--border3);
  font-size: 0.63rem;
  color: var(--fg3);
  cursor: pointer;
  transition: color 0.15s;
}
.course-section-row:last-child { border-bottom: none; }
.course-section-row:hover { color: var(--fg); }

/* ── MODALS ── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 50;
  align-items: center;
  justify-content: center;
}
.overlay.open { display: flex; }

.cmodal {
  background: #181716;
  width: 580px;
  max-width: 90%;
  height: 460px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.cmodal-header { padding: 1.5rem 1.75rem 1.1rem; }

.cmodal-super {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 0.55rem;
}

.cmodal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f0ede8;
  letter-spacing: -0.01em;
}

.cmodal-body {
  flex: 1;
  padding: 0 1.75rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a2826 transparent;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cmodal-body::-webkit-scrollbar { width: 3px; }
.cmodal-body::-webkit-scrollbar-thumb { background: #2a2826; border-radius: 2px; }

.cmodal-footer {
  padding: 0.9rem 1.75rem;
  border-top: 1px solid #1e1e1c;
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
}

.btn-bare {
  appearance: none;
  -webkit-appearance: none;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
  font-family: 'DM Mono', monospace;
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  color: #555;
  cursor: pointer;
  transition: color 0.15s;
}
.btn-bare:hover { color: #ccc; }

.btn-bare.close-btn {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  font-size: 0.8rem;
  color: #444;
}

.btn-bare.right { text-align: right; }

.mpager {
  font-size: 0.63rem;
  color: #444;
  text-align: center;
  letter-spacing: 0.06em;
}

.ctags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.ctag {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  padding: 7px 12px;
  border: 1px solid #2e2c2a;
  color: #b0aea8;
  background: #1f1e1c;
  letter-spacing: 0.02em;
  cursor: default;
  border-radius: 1px;
  transition: border-color 0.15s, color 0.15s;
}
.ctag:hover { border-color: #4a4845; color: #e8e6e0; }

.g-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #252422;
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
}

.g-name-label {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #444;
  flex-shrink: 0;
}

.g-name-input {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  background: transparent;
  border: none;
  outline: none;
  color: #ccc;
  flex: 1;
  letter-spacing: 0.03em;
}
.g-name-input::placeholder { color: #333; }

/* ── GUESTBOOK MODAL LAYOUT ── */
/* fixed-height container so note and sketch are always the same size */
.guest-cmodal {
  height: 460px;
}

.guest-input-area {
  flex: 1;
  min-height: 0;
  padding: 0 1.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.guest-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 0;
  flex-shrink: 0;
  flex: 1;
}

.g-msg-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0d0d0d;
  border: 1px solid #252422;
  padding: 0.75rem;
  border-radius: 1px;
  overflow: hidden;
}

.g-msg-textarea {
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: #aaa;
  width: 100%;
  height: 100%;
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.g-msg-textarea::placeholder { color: #333; }


/* ── NAME FIELD REQUIRED WARNING ── */
.g-name-row.name-warn .g-name-input {
  border-bottom: 1px solid #c0392b;
}

.name-warn-badge {
  display: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: #c0392b;
  border: 1px solid #c0392b;
  padding: 2px 6px;
  border-radius: 1px;
  flex-shrink: 0;
  white-space: nowrap;
}

.g-name-row.name-warn .name-warn-badge {
  display: inline;
}

/* ── SKETCH PAD ── */
.sketch-canvas {
  flex: 1;
  width: 100%;
  display: block;
  border: 1px solid #252422;
  border-radius: 1px;
  cursor: crosshair;
  background: #0d0d0d;
  touch-action: none;
  min-height: 0;
}

.light-mode .sketch-canvas,
body.light-mode .sketch-canvas {
  background: #faf8f4;
  border-color: #d8d5cf;
}

.guest-footer {
  grid-template-columns: auto 1fr auto !important;
  gap: 12px;
  margin-top: auto;
}

/* green mode toggle — same style as badge-green but as a button */
.guest-mode-btn {
  cursor: pointer;
  font-size: 0.52rem !important;
  letter-spacing: 0.1em !important;
  font-weight: 400;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.guest-mode-btn:hover {
  background: rgba(90, 170, 124, 0.2);
}


/* ── PROJECT MODAL ── */
.proj-slideshow {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  width: 100%;
  position: relative;
}

/* 800x600 native, scales down responsively while keeping 4:3 */
.proj-slide-wrap {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: unset;
  margin: 0 auto;
  background: transparent;
  border: 1px solid #2a2826;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proj-slide {
  display: none;
  width: 100%;
  height: auto;
  max-width: 100%;
  vertical-align: top;
}

.proj-slide.active {
  display: block;
}

/* Writing portfolio — links mode: no fixed aspect ratio box */
.proj-slide-wrap.links-mode {
  aspect-ratio: unset;
  height: auto;
  min-height: 80px;
  align-items: stretch;
  border: none;
  background: transparent;
}



.proj-slide-placeholder {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}
.proj-slide-placeholder.active { display: flex; }

.proj-slide-placeholder-text {
  font-size: 0.65rem;
  color: #444;
  letter-spacing: 0.08em;
}

.slide-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15,15,15,0.82);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ddd;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
  z-index: 5;
  padding: 0 0 1px 0;
  letter-spacing: 0;
}
.slide-arrow:hover { background: rgba(40,40,40,0.95); color: #fff; }
.slide-arrow.left  { left:  8px; }
.slide-arrow.right { right: 8px; }
.slide-arrow:disabled { opacity: 0.12; cursor: default; }

.proj-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
  flex-shrink: 0;
}

.proj-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #333;
  cursor: pointer;
  transition: background 0.15s;
}
.proj-dot.active { background: #888; }

.proj-desc {
  padding: 0.6rem 0 0.1rem;
  font-size: 0.62rem;
  color: #777;
  line-height: 1.6;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}


/* ── WRITING PORTFOLIO LINKS ── */
.proj-link-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.proj-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #1e1e1c;
  font-size: 0.65rem;
  color: #888;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.12s, background 0.12s;
  gap: 8px;
}
.proj-link-item:first-child { border-top: 1px solid #1e1e1c; }
.proj-link-item:hover { color: #e8e6e0; background: rgba(255,255,255,0.03); }

.proj-link-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proj-link-arr {
  color: #444;
  flex-shrink: 0;
  font-size: 0.7rem;
  transition: color 0.12s;
}
.proj-link-item:hover .proj-link-arr { color: #888; }

/* ── EXPERIENCE MODAL ── */
.exp-meta {
  font-size: 0.58rem;
  color: #555;
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0;
}

.exp-bullets li {
  font-size: 0.65rem;
  color: #b0aea8;
  line-height: 1.7;
  letter-spacing: 0.02em;
  padding-left: 1rem;
  position: relative;
}

.exp-bullets li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: #555;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ── FOOTER ── */
.foot {
  width: var(--grid-w);
  margin-left: auto;
  margin-right: auto;
  padding: 0.45rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.foot-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.foot-link {
  font-size: 0.62rem;
  color: var(--foot-link);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.15s;
  font-weight: 400;
}
.foot-link:hover { color: var(--fg3); }

.foot-sep {
  color: var(--fg5);
  font-size: 0.62rem;
}

.foot-r {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

/* ── FOOTER ICONS ── */
.foot-icon-link {
  display: flex;
  align-items: center;
  opacity: 0.55;
  transition: opacity 0.2s;
}
.foot-icon-link:hover { opacity: 1; transition: opacity 0.15s; }

.foot-icon {
  width: 15px;
  height: 15px;
  display: block;
  /* dark mode: white icons */
  filter: invert(1) brightness(2);
  transition: filter 0.2s;
}

.light-mode .foot-icon,
body.light-mode .foot-icon {
  /* light mode: black icons */
  filter: invert(1) brightness(0);
}

/* ── GLITCH ANIMATION ── */
@keyframes glitch-skew {
  0%   { transform: skewX(0deg); }
  20%  { transform: skewX(-2deg); }
  40%  { transform: skewX(1.5deg); }
  60%  { transform: skewX(-1deg); }
  80%  { transform: skewX(0.5deg); }
  100% { transform: skewX(0deg); }
}

.glitching {
  animation: glitch-skew 0.35s steps(1) forwards;
  position: relative;
}

.glitching::before,
.glitching::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  overflow: hidden;
  font-family: 'DM Mono', monospace;
}

.glitching::before {
  color: #0ff;
  opacity: 0.5;
  clip: rect(0, 9999px, 4px, 0);
  animation: gc1 0.35s steps(1) forwards;
}

.glitching::after {
  color: #f0f;
  opacity: 0.4;
  clip: rect(0, 9999px, 4px, 0);
  animation: gc2 0.35s steps(1) forwards;
}

@keyframes gc1 {
  0%   { clip: rect(20px,9999px,24px,0); transform: translateX(-3px); }
  25%  { clip: rect(5px,9999px,9px,0);   transform: translateX(2px); }
  50%  { clip: rect(14px,9999px,18px,0); transform: translateX(-2px); }
  75%  { clip: rect(2px,9999px,6px,0);   transform: translateX(3px); }
  100% { clip: rect(0,0,0,0);            transform: none; }
}

@keyframes gc2 {
  0%   { clip: rect(8px,9999px,12px,0);  transform: translateX(3px); }
  25%  { clip: rect(18px,9999px,22px,0); transform: translateX(-3px); }
  50%  { clip: rect(3px,9999px,7px,0);   transform: translateX(2px); }
  75%  { clip: rect(12px,9999px,16px,0); transform: translateX(-2px); }
  100% { clip: rect(0,0,0,0);            transform: none; }
}



/* ── MODAL LIGHT MODE ── */
.light-mode .badge-green,
body.light-mode .badge-green {
  background: rgba(160, 40, 40, 0.07);
  color: #a02828;
  border: 1px solid rgba(160, 40, 40, 0.22);
}
.light-mode .badge-green:hover,
body.light-mode .badge-green:hover {
  background: rgba(160, 40, 40, 0.13);
}

.light-mode .guest-mode-btn,
body.light-mode .guest-mode-btn {
  background: rgba(160, 40, 40, 0.07);
  color: #a02828;
  border: 1px solid rgba(160, 40, 40, 0.22);
}
.light-mode .guest-mode-btn:hover,
body.light-mode .guest-mode-btn:hover {
  background: rgba(160, 40, 40, 0.13);
}
.light-mode .g-name-label,
body.light-mode .g-name-label {
  color: #666;
}

.light-mode .g-name-input,
body.light-mode .g-name-input {
  color: #222;
}
.light-mode .g-name-input::placeholder,
body.light-mode .g-name-input::placeholder {
  color: #999;
}

.light-mode .g-msg-textarea,
body.light-mode .g-msg-textarea {
  color: #333;
}
.light-mode .g-msg-textarea::placeholder,
body.light-mode .g-msg-textarea::placeholder {
  color: #aaa;
}
.light-mode .chip-group-label,
body.light-mode .chip-group-label {
  color: #777;
}

.light-mode .overlay,
body.light-mode .overlay {
  background: rgba(0, 0, 0, 0.55);
}

.light-mode .cmodal,
body.light-mode .cmodal {
  background: #f2f0eb;
  border: 1px solid #d8d5cf;
}

.light-mode .cmodal-super,
body.light-mode .cmodal-super {
  color: #999;
}

.light-mode .cmodal-title,
body.light-mode .cmodal-title {
  color: #111110;
}

.light-mode .cmodal-footer,
body.light-mode .cmodal-footer {
  border-top-color: #d8d5cf;
}

.light-mode .btn-bare,
body.light-mode .btn-bare {
  color: #888;
}
.light-mode .btn-bare:hover,
body.light-mode .btn-bare:hover {
  color: #111110;
}

.light-mode .btn-bare.close-btn,
body.light-mode .btn-bare.close-btn {
  color: #aaa;
}

.light-mode .mpager,
body.light-mode .mpager {
  color: #aaa;
}

/* experience bullets */
.light-mode .exp-meta,
body.light-mode .exp-meta {
  color: #aaa;
}

.light-mode .exp-bullets li,
body.light-mode .exp-bullets li {
  color: #555;
}

.light-mode .exp-bullets li::before,
body.light-mode .exp-bullets li::before {
  color: #bbb;
}

/* course tags */
.light-mode .ctag,
body.light-mode .ctag {
  background: #f2f0eb;
  border-color: #ccc9c1;
  color: #555;
}
.light-mode .ctag:hover,
body.light-mode .ctag:hover {
  border-color: #777;
  color: #111110;
}

/* project desc */
.light-mode .proj-desc,
body.light-mode .proj-desc {
  color: #888;
}

/* project slide wrap */
.light-mode .proj-slide-wrap,
body.light-mode .proj-slide-wrap {
  background: #f2f0eb;
  border-color: #ccc9c1;
}

.light-mode .proj-slide-placeholder-text,
body.light-mode .proj-slide-placeholder-text {
  color: #bbb;
}

.light-mode .proj-dots .proj-dot,
body.light-mode .proj-dots .proj-dot {
  background: #ccc;
}
.light-mode .proj-dots .proj-dot.active,
body.light-mode .proj-dots .proj-dot.active {
  background: #777;
}

.light-mode .slide-arrow,
body.light-mode .slide-arrow {
  background: rgba(200,198,193,0.9);
  border-color: #ccc;
  color: #444;
}
.light-mode .slide-arrow:hover,
body.light-mode .slide-arrow:hover {
  background: rgba(170,168,163,0.95);
  color: #111;
}

/* writing links */
.light-mode .proj-link-item,
body.light-mode .proj-link-item {
  color: #666;
  border-bottom-color: #ddd;
}
.light-mode .proj-link-item:first-child,
body.light-mode .proj-link-item:first-child {
  border-top-color: #ddd;
}
.light-mode .proj-link-item:hover,
body.light-mode .proj-link-item:hover {
  color: #111110;
}
.light-mode .proj-link-arr,
body.light-mode .proj-link-arr {
  color: #bbb;
}
.light-mode .proj-link-item:hover .proj-link-arr,
body.light-mode .proj-link-item:hover .proj-link-arr {
  color: #777;
}

/* guestbook modal */
.light-mode .guest-cmodal,
body.light-mode .guest-cmodal {
  background: #f2f0eb;
  border: 1px solid #d8d5cf;
}

.light-mode .g-name-row,
body.light-mode .g-name-row {
  border-bottom-color: #d8d5cf;
}

.light-mode .g-name-label,
body.light-mode .g-name-label {
  color: #aaa;
}

.light-mode .g-name-input,
body.light-mode .g-name-input {
  color: #333;
}
.light-mode .g-name-input::placeholder,
body.light-mode .g-name-input::placeholder {
  color: #bbb;
}

.light-mode .g-msg-area,
body.light-mode .g-msg-area {
  background: #faf8f4;
  border-color: #d8d5cf;
}

.light-mode .g-msg-textarea,
body.light-mode .g-msg-textarea {
  color: #444;
}
.light-mode .g-msg-textarea::placeholder,
body.light-mode .g-msg-textarea::placeholder {
  color: #ccc;
}

.light-mode .guest-footer,
body.light-mode .guest-footer {
  border-top-color: #d8d5cf;
}

/* sketch canvas already handled via existing rule */



.light-mode .g-placeholder,
body.light-mode .g-placeholder {
  border-color: #c8c5be;
  color: #888;
}

.light-mode .box:hover,
body.light-mode .box:hover {
  background: var(--bg2);
}

/* name warn badge same in both modes — red is intentional */
.light-mode .g-name-row.name-warn .g-name-input,
body.light-mode .g-name-row.name-warn .g-name-input {
  border-bottom-color: #c0392b;
}

/* ── LIGHT MODE ROW ITEMS / ARROWS ── */
.light-mode .row-item,
body.light-mode .row-item {
  border-bottom-color: #ccc;
  color: #555;
}
.light-mode .row-item:hover,
body.light-mode .row-item:hover {
  color: #000000;
  font-weight: 500;
}
.light-mode .arr,
body.light-mode .arr {
  color: #888;
}
.light-mode .row-item:hover .arr,
body.light-mode .row-item:hover .arr {
  color: #333;
}
.light-mode .course-section-row,
body.light-mode .course-section-row {
  border-bottom-color: #ccc;
  color: #555;
}
.light-mode .course-section-row:hover,
body.light-mode .course-section-row:hover {
  color: #111;
}
.light-mode .course-section-row:hover .arr,
body.light-mode .course-section-row:hover .arr {
  color: #333;
}



/* ── DARK MODE STICKY NOTE COLORS ── */
/* Yellow */
.sticky-note.sn-yellow {
  background: #1e1c12;
  border: 1px solid #6b6330;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}
.sticky-note.sn-yellow::before { background: #8a7a20; }
.sticky-note.sn-yellow .sticky-note-name { color: #a09a5a; }
.sticky-note.sn-yellow .sticky-note-msg  { color: #c8c090; }

/* Pink */
.sticky-note.sn-pink {
  background: #1e0f12;
  border: 1px solid #6b2030;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}
.sticky-note.sn-pink::before { background: #8a2840; }
.sticky-note.sn-pink .sticky-note-name { color: #b06070; }
.sticky-note.sn-pink .sticky-note-msg  { color: #c89090; }

/* Blue */
.sticky-note.sn-blue {
  background: #0f141e;
  border: 1px solid #203060;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}
.sticky-note.sn-blue::before { background: #2848a0; }
.sticky-note.sn-blue .sticky-note-name { color: #6080b8; }
.sticky-note.sn-blue .sticky-note-msg  { color: #8aaae0; }

/* Dark mode lightbox card colors */
.note-lightbox-card.sn-yellow {
  background: #1e1c12;
  border-color: #6b6330;
}
.note-lightbox-card.sn-yellow .note-lightbox-name { color: #a09a5a; }
.note-lightbox-card.sn-yellow .note-lightbox-msg  { color: #d0c898; }

.note-lightbox-card.sn-pink {
  background: #1e0f12;
  border-color: #6b2030;
}
.note-lightbox-card.sn-pink .note-lightbox-name { color: #b06070; }
.note-lightbox-card.sn-pink .note-lightbox-msg  { color: #c89090; }

.note-lightbox-card.sn-blue {
  background: #0f141e;
  border-color: #203060;
}
.note-lightbox-card.sn-blue .note-lightbox-name { color: #6080b8; }
.note-lightbox-card.sn-blue .note-lightbox-msg  { color: #8aaae0; }

/* ── LIGHT MODE STICKY NOTES — neon sticky note colors ── */
/* Yellow */
.light-mode .sticky-note.sn-yellow,
body.light-mode .sticky-note.sn-yellow {
  background: #fef08a;
  border: 1px solid #d4c034;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.12);
}
.light-mode .sticky-note.sn-yellow::before,
body.light-mode .sticky-note.sn-yellow::before { background: #c8b800; }
.light-mode .sticky-note.sn-yellow .sticky-note-name { color: #5a4e00; }
.light-mode .sticky-note.sn-yellow .sticky-note-msg  { color: #3a3400; }

/* Pink */
.light-mode .sticky-note.sn-pink,
body.light-mode .sticky-note.sn-pink {
  background: #fda4ba;
  border: 1px solid #e06080;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.12);
}
.light-mode .sticky-note.sn-pink::before,
body.light-mode .sticky-note.sn-pink::before { background: #c84060; }
.light-mode .sticky-note.sn-pink .sticky-note-name { color: #7a1830; }
.light-mode .sticky-note.sn-pink .sticky-note-msg  { color: #4a0820; }

/* Blue */
.light-mode .sticky-note.sn-blue,
body.light-mode .sticky-note.sn-blue {
  background: #93c5fd;
  border: 1px solid #4898e0;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.12);
}
.light-mode .sticky-note.sn-blue::before,
body.light-mode .sticky-note.sn-blue::before { background: #2860b0; }
.light-mode .sticky-note.sn-blue .sticky-note-name { color: #0a3060; }
.light-mode .sticky-note.sn-blue .sticky-note-msg  { color: #082040; }

/* Lightbox adapts to the note color — set via JS inline style */
.light-mode .note-lightbox-card,
body.light-mode .note-lightbox-card {
  border-color: #d4c034;
}
.light-mode .note-lightbox-name,
body.light-mode .note-lightbox-name {
  color: #5a4e00;
}
.light-mode .note-lightbox-msg,
body.light-mode .note-lightbox-msg {
  color: #3a3400;
}
.light-mode .note-lightbox-close,
body.light-mode .note-lightbox-close {
  color: #888;
}
.light-mode .note-lightbox-close:hover,
body.light-mode .note-lightbox-close:hover {
  color: #222;
}



/* ── LIGHTBOX CARD COLOR CLASSES (light mode) ── */
.light-mode .note-lightbox-card.sn-yellow,
body.light-mode .note-lightbox-card.sn-yellow {
  background: #fef9c3;
  border-color: #d4c034;
}
.light-mode .note-lightbox-card.sn-yellow .note-lightbox-name { color: #5a4e00; }
.light-mode .note-lightbox-card.sn-yellow .note-lightbox-msg  { color: #3a3400; }

.light-mode .note-lightbox-card.sn-pink,
body.light-mode .note-lightbox-card.sn-pink {
  background: #fde8ee;
  border-color: #e06080;
}
.light-mode .note-lightbox-card.sn-pink .note-lightbox-name { color: #7a1830; }
.light-mode .note-lightbox-card.sn-pink .note-lightbox-msg  { color: #4a0820; }

.light-mode .note-lightbox-card.sn-blue,
body.light-mode .note-lightbox-card.sn-blue {
  background: #e0eeff;
  border-color: #4898e0;
}
.light-mode .note-lightbox-card.sn-blue .note-lightbox-name { color: #0a3060; }
.light-mode .note-lightbox-card.sn-blue .note-lightbox-msg  { color: #082040; }

/* ── DELETE BUTTON ON LIGHTBOX ── */
.lightbox-delete-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: #444;
  background: none;
  border: 1px solid #333;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 1px;
  transition: color 0.15s, border-color 0.15s;
  margin-top: 2px;
}
.lightbox-delete-btn:hover {
  color: #c0392b;
  border-color: #c0392b;
}

.delete-prompt {
  display: none;
  background: #181716;
  border: 1px solid #2e2c2a;
  padding: 1rem 1.25rem;
  width: 260px;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  bottom: 60px;
  z-index: 210;
}
.delete-prompt.open { display: flex; }

.delete-prompt-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: #666;
  text-transform: uppercase;
}

.delete-prompt-input {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  background: #111;
  border: 1px solid #2e2c2a;
  color: #ccc;
  padding: 5px 8px;
  outline: none;
  letter-spacing: 0.08em;
  width: 100%;
}
.delete-prompt-input:focus { border-color: #555; }
.delete-prompt-input::placeholder { color: #333; }

.delete-prompt-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.delete-confirm-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  background: none;
  border: 1px solid #c0392b;
  color: #c0392b;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 1px;
  transition: background 0.15s;
}
.delete-confirm-btn:hover { background: rgba(192,57,43,0.12); }

.delete-cancel-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  background: none;
  border: 1px solid #333;
  color: #555;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 1px;
}
.delete-cancel-btn:hover { color: #aaa; border-color: #555; }

.delete-error {
  font-size: 0.58rem;
  color: #c0392b;
  letter-spacing: 0.04em;
  display: none;
}
.delete-error.show { display: block; }

.light-mode .delete-prompt,
body.light-mode .delete-prompt {
  background: #f2f0eb;
  border-color: #d8d5cf;
}
.light-mode .delete-prompt-input,
body.light-mode .delete-prompt-input {
  background: #fff;
  border-color: #ccc;
  color: #333;
}

/* ────────────────────────────────────────────
   RESPONSIVE — tablet & mobile
──────────────────────────────────────────── */

/* Tablet: shrink grid width */
@media (max-width: 900px) {
  :root { --grid-w: 96vw; }

  .pf { padding: 2rem 0 0; }

  .toprow {
    width: 96vw;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
  }

  .bento {
    width: 96vw;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .box.guest {
    grid-column: 1 / 3;
    grid-row: auto;
  }

  .foot { width: 96vw; }
}

/* Mobile: single column */
@media (max-width: 600px) {
  :root { --grid-w: 94vw; --gap: 8px; }

  body { justify-content: flex-start; }

  .pf { padding: 1.5rem 0 0; }

  .toprow {
    width: 94vw;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .topright {
    align-items: flex-start;
    padding-top: 0;
  }

  .big-name { font-size: 1.25rem; }
  .bio { font-size: 0.65rem; max-width: 100%; }

  .bento {
    width: 94vw;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 10px;
  }

  .box { min-height: 120px; padding: 0.75rem 0.85rem; }

  .box.guest {
    grid-column: 1;
    grid-row: auto;
    min-height: 180px;
  }

  .foot {
    width: 94vw;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.65rem 0;
  }

  .foot-r { width: 100%; justify-content: flex-end; }

  .cmodal {
    width: 96vw;
    max-width: 96vw;
    height: 85vh;
    max-height: 85vh;
  }

  .guest-cmodal { height: 85vh; }

  .guest-input-area {
    flex: 1;
    min-height: 0;
  }

  .guest-panel {
    flex: 1;
    min-height: 0;
    height: 100%;
  }

  .cmodal-header { padding: 1.1rem 1.25rem 0.8rem; }
  .cmodal-body   { padding: 0 1.25rem; }
  .cmodal-footer { padding: 0.75rem 1.25rem; }

  .ctag { font-size: 0.6rem; padding: 5px 10px; }

  .note-lightbox-card { max-width: 94vw; }
}

/* Very small screens */
@media (max-width: 380px) {
  .big-name { font-size: 1.1rem; }
  .box-title { font-size: 0.55rem; letter-spacing: 0.14em; }
  .row-item  { font-size: 0.6rem; }
  .chip      { font-size: 0.5rem; }
}