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


:root {
  --green: #58d164;
  --inactive: #f5f5f5;
  --base: #2e2e2e;
  --muted: #888;
  --subtle: #5c5c5c;
  --border: #a8b6a8;
  --bg: #fff;
}

html {
  height: 100%;
  background: var(--bg);
}

body {
  height: 100%;
  background: var(--bg);
  font-family: 'Geist Mono', monospace;
  color: var(--base);
  overflow: hidden;
}

/* ── Layout ─────────────────────────────────── */
.page {
  display: grid;
  grid-template-columns: 380px 1fr 380px;
  height: 100vh;
  overflow: hidden;
}

/* Full-height dashed dividers via fixed overlay */
.divider-left, .divider-right {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  z-index: 10;
  border-right: 1px dashed var(--border);
}
.divider-left  { left: 380px; }
.divider-right { right: 380px; }

/* ── Left Sidebar ───────────────────────────── */
.sidebar {
  padding: 52px 26px 80px 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  animation: fadeUp 0.6s ease both;
}

.sidebar::-webkit-scrollbar,
.right-panel::-webkit-scrollbar { display: none; }
.sidebar, .right-panel { scrollbar-width: none; }

.sidebar-header { display: flex; flex-direction: column; gap: 4px; }

.name {
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  text-transform: uppercase;
  letter-spacing: 0;
  margin: 0;
}

.title {
  font-size: 10px;
  font-weight: 300;
  line-height: 16px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0;
}

.email {
  font-size: 10px;
  font-weight: 300;
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: transparent;
  text-decoration: none;
  background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  transition: background 0.3s ease;
}

.email:hover {
  background: linear-gradient(90deg, #5c5c5c, #a78bfa, #60a5fa, #34d399, #fbbf24, #f87171, #5c5c5c, #a78bfa, #60a5fa);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: rainbowSweep 3s ease infinite;
}

.bio {
  font-size: 11px;
  font-weight: 300;
  line-height: 22px;
  letter-spacing: 0.4px;
  color: var(--subtle);
  text-transform: uppercase;
}

.tagline {
  font-size: 10px;
  font-weight: 300;
  line-height: 20px;
  color: var(--subtle);
  letter-spacing: 0.5px;
}

.currently {
  font-size: 11px;
  font-weight: 300;
  line-height: 22px;
  letter-spacing: 0.4px;
  color: var(--subtle);
  text-transform: uppercase;
}

.contact-link {
  font-weight: 400;
  color: transparent;
  text-decoration: none;
  background: linear-gradient(90deg, var(--base) 0%, var(--base) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-link:hover {
  background: linear-gradient(90deg, #5c5c5c, #a78bfa, #60a5fa, #34d399, #fbbf24, #f87171, #5c5c5c, #a78bfa, #60a5fa);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbowSweep 3s ease infinite;
}

.nav-links {
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  font-family: 'Geist Mono', 'Noto Sans', sans-serif;
  font-size: 10px;
  font-weight: 300;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--subtle);
  text-decoration: none;
  background: linear-gradient(90deg, var(--subtle) 0%, var(--subtle) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  transition: background 0.3s ease;
}

.nav-link:hover {
  background: linear-gradient(90deg, #5c5c5c, #a78bfa, #60a5fa, #34d399, #fbbf24, #f87171, #5c5c5c, #a78bfa, #60a5fa);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: rainbowSweep 3s ease infinite;
}

/* ── Center ─────────────────────────────────── */
.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 53px 48px 0;
  gap: 18px;
  min-width: 0;
  animation: fadeUp 0.6s 0.18s ease both;
}

.cal-label {
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  color: var(--base);
  white-space: nowrap;
}


.calendar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 400px;
}

.cal-row {
  display: flex;
  gap: 5px;
  width: 100%;
}

.day {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}

.day-num {
  position: absolute;
  top: 5px;
  right: 6px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1px;
  line-height: 1;
}

.day.inactive .day-num { color: var(--base); }
.day.active   .day-num { color: #fafafa; }
.day.extra    .day-num { color: #fafafa; }
.day.empty    .day-num { display: none; }

/* Stagger entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ripple {
  to { transform: scale(2.5); opacity: 0; }
}

@keyframes dayIn {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.day {
  animation: dayIn 0.3s ease both;
}

.day:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

.day.inactive { background: var(--inactive); color: var(--base); }
.day.active   { background: var(--green); color: #fafafa; }
.day.empty    { background: var(--inactive); visibility: hidden; }
.day.extra    { background: var(--green); color: var(--base); }

/* Selected day ring */
.day.selected-day {
  outline: 2px solid var(--base);
  outline-offset: 2px;
}


/* Tooltip */
.day-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1a1a1a;
  color: #fff;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.3px;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
}

.day:hover .day-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Legend */
.legend {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  max-width: 400px;
  justify-content: flex-start;
  padding-top: 8px;
}

.legend-item {
  display: flex;
  gap: 4px;
  align-items: center;
}

.legend-dot {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-dot.active   { background: var(--green); }
.legend-dot.inactive { background: #e8eaee; }

.legend-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* ── Right Panel ────────────────────────────── */
.right-panel {
  padding: 24px 20px 80px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  transition: opacity 0.2s ease;
  animation: fadeUp 0.6s 0.36s ease both;
}

.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex: 1;
}

.panel-empty-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-empty-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.panel-empty-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: -0.3px;
}

body.dark .panel-empty-text { color: #555; }

.panel-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-image {
  width: 100%;
  height: 320px;
  min-height: 320px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  background: var(--inactive);
  flex-shrink: 0;
}

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.media-loading {
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease infinite;
}

.toggle-switch {
  display: flex;
  background: #f0f0f0;
  border-radius: 999px;
  padding: 4px;
  align-self: center;
  gap: 0;
}

.toggle-btn {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  padding: 8px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  letter-spacing: -0.5px;
  text-align: center;
  transition: background 0.2s ease;
  color: #000;
}

.toggle-btn.selected { background: #fff; }
.toggle-btn:not(.selected) { background: transparent; }

.project-info {
  border-top: 1px dashed var(--border);
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-title-block { display: flex; flex-direction: column; gap: 2px; }

.project-title {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #000;
  letter-spacing: -1px;
  overflow-wrap: break-word;
}

.project-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: -0.5px;
}

.project-desc {
  font-size: 11px;
  font-weight: 300;
  line-height: 22px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--subtle);
  width: 100%;
  max-width: 313px;
}

.live-link-btn {
  background: var(--green);
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  width: 100%;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 300;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.live-link-btn:hover { background: #46c152; }


/* ── Footer ─────────────────────────────────── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: #fff;
  display: grid;
  grid-template-columns: 380px 1fr 380px;
  align-items: center;
  padding-bottom: 12px;
  animation: fadeUp 0.6s 0.35s ease both;
}

.footer-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding: 0 26px;
  border-top: 1px dashed var(--border);
  height: 100%;
}

.footer-center { display: flex; justify-content: center; }

.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: flex-end;
  padding: 0 20px;
}

@keyframes rainbowSweep {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.spotify-widget {
  display: flex;
  align-items: center;
  gap: 0;
  background: #ebebef;
  border-radius: 64px;
  padding: 3px 10px 3px 3px;
  cursor: default;
  transition: gap 0.3s ease, padding 0.25s ease, box-shadow 0.3s ease;
}

.spotify-widget:hover {
  gap: 2px;
  padding: 3px 10px 3px 6px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.10);
}

.sp-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: #82879e;
  line-height: 1;
  width: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  transition: width 0.3s ease, opacity 0.25s ease, color 0.15s;
  flex-shrink: 0;
}

.sp-btn:hover { color: #2e2e2e; }

.spotify-widget:hover .sp-btn {
  width: 14px;
  opacity: 1;
}

.spotify-art {
  width: 28px;
  height: 28px;
  border-radius: 100px;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.spotify-art:hover { transform: scale(1.1); }

.spotify-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 100px;
  animation: vinylSpin 10s linear infinite;
  animation-play-state: paused;
}

.spotify-art.playing img {
  animation: vinylSpin 3s linear infinite;
  animation-play-state: running;
}

.spotify-center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #ebebef;
  border-radius: 100px;
  pointer-events: none;
  z-index: 2;
  transition: background 0.3s;
}

.spotify-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  width: 90px;
  margin-left: 6px;
}

@keyframes spTicker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.spotify-text {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #82879e;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.spotify-text.ticker {
  display: inline-block;
  overflow: visible;
  text-overflow: clip;
  width: max-content;
  animation: spTicker 8s linear infinite;
}

.spotify-progress-track {
  height: 2px;
  background: #d8d8e1;
  border-radius: 12px;
  width: 100%;
  cursor: pointer;
}

.spotify-progress-fill {
  height: 2px;
  width: 0%;
  background: #7a7f97;
  border-radius: 12px;
  transition: width 0.4s linear;
}

/* ── Theme toggle ───────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-label {
  font-size: 10px;
  font-weight: 300;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 16px;
}

.toggle-pill {
  width: 28px;
  height: 16px;
  background: var(--subtle);
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 2px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle-pill.dark-mode { background: #111; }

.toggle-thumb {
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background: #e5e5e5;
  transition: transform 0.3s ease;
}

.toggle-pill.dark-mode .toggle-thumb { transform: translateX(12px); }

/* ── Dark mode ──────────────────────────────── */
body.dark {
  --bg: #111;
  --base: #f0f0f0;
  --subtle: #aaa;
  --muted: #666;
  --border: #333;
  --inactive: #222;
  background: #111;
}

body.dark .footer                       { background: #111; }
body.dark .toggle-btn                   { color: #f0f0f0; }
body.dark .toggle-btn.selected          { background: #333; color: #f0f0f0; }
body.dark .toggle-switch                { background: #222; }
body.dark .live-link-btn                { background: var(--green); color: #fff; }
body.dark .live-link-btn:hover          { background: #46c152; }
body.dark .spotify-widget               { background: #222; }
body.dark .spotify-widget .sp-btn       { color: #888; }
body.dark .spotify-widget .sp-btn:hover { color: #f0f0f0; }
body.dark .spotify-center-dot           { background: #222; }
body.dark .spotify-progress-track       { background: #333; }
body.dark .spotify-progress-fill        { background: #888; }
body.dark .project-title                { color: #f0f0f0; }
body.dark .media-loading { background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%); background-size: 800px 100%; animation: shimmer 1.4s ease infinite; }
body.dark .name                         { color: #f0f0f0; }
body.dark .day.inactive                 { background: #222; color: #aaa; }
body.dark .legend-dot.inactive          { background: #333; }
body.dark .day.selected-day             { outline-color: #f0f0f0; }
body.dark .project-image                { background: #1a1a1a; }
body.dark .day.extra                    { background: var(--green); }
body.dark .legend-dot.extra             { background: var(--green); }
body.dark .mobile-header                { background: #111; }
body.dark .mobile-brand                 { color: rgba(240,240,240,0.7); }
body.dark .mobile-nav-item              { color: rgba(240,240,240,0.7); }

/* ── Mobile header ──────────────────────────── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg);
  z-index: 100;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mobile-brand {
  font-size: 12px;
  font-weight: 400;
  line-height: 24px;
  color: rgba(17,17,17,0.7);
  text-transform: uppercase;
}

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

.mobile-nav-item {
  font-size: 11px;
  font-weight: 400;
  line-height: 24px;
  color: rgba(17,17,17,0.7);
  cursor: pointer;
  text-transform: uppercase;
}

.mobile-theme-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(17,17,17,0.7);
}

.mobile-theme-icon .icon-moon { display: none; }

body.dark .mobile-theme-icon { color: rgba(240,240,240,0.7); }
body.dark .mobile-theme-icon .icon-sun  { display: none; }
body.dark .mobile-theme-icon .icon-moon { display: block; }

/* ── Mobile footer nav ──────────────────────── */
.footer-mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 16px 20px;
  border-top: 1px dashed var(--border);
}

/* ── Responsive ─────────────────────────────── */

/* Medium: reduce column widths */
@media (max-width: 1200px) {
  .page                { grid-template-columns: 280px 1fr 280px; }
  .footer              { grid-template-columns: 280px 1fr 280px; }
  .divider-left        { left: 280px; }
  .divider-right       { right: 280px; }
  .sidebar             { padding: 40px 20px 80px; }
  .center              { padding: 60px 10px 0; }
  .right-panel         { padding: 40px 16px 80px; }
  .cal-label           { white-space: normal; }
  .calendar            { max-width: 320px; }
  .legend              { max-width: 320px; }
}

/* Small tablet */
@media (max-width: 900px) {
  .page                { grid-template-columns: 180px 1fr 260px; }
  .footer              { grid-template-columns: 180px 1fr 260px; }
  .divider-left        { left: 180px; }
  .divider-right       { right: 260px; }
  .sidebar             { padding: 32px 12px 80px; gap: 14px; }
  .center              { padding: 60px 8px 0; }
  .right-panel         { padding: 32px 16px 80px; }
  .cal-row             { gap: 4px; }
  .cal-label           { white-space: normal; font-size: 11px; }
  .calendar            { max-width: 260px; }
  .legend              { max-width: 260px; }
  .panel-empty-text    { font-size: 11px; }
  .panel-empty-row     { align-items: flex-start; }
  .project-title       { font-size: 12px; }
  .project-image       { height: 200px; min-height: 200px; }
  .name                { font-size: 13px; }
  .bio                 { font-size: 10px; }
}

/* Mobile */
@media (max-width: 680px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    width: 100%;
  }

  .mobile-header       { display: flex; }

  .page {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    height: auto;
    overflow: hidden;
    padding-top: 56px;
    min-width: 0;
  }

  .divider-left,
  .divider-right       { display: none; }

  .sidebar {
    order: 3;
    padding: 32px 20px 120px;
    overflow: visible;
    min-width: 0;
  }
  .sidebar .nav-links  { display: none; }

  .center {
    order: 1;
    padding: 32px 20px 40px;
    overflow: visible;
    align-items: flex-start;
    min-width: 0;
  }
  .cal-label           { font-size: 11px; white-space: normal; }
  .calendar            { max-width: 100%; }
  .cal-row             { gap: 5px; }
  .legend              { max-width: 100%; }
  .legend-label        { font-size: 10px; }
  .legend-other        { display: none; }

  .right-panel {
    order: 2;
    padding: 24px 20px 40px;
    overflow: visible;
    border-top: 1px dashed var(--border);
    min-width: 0;
  }
  .project-image       { height: 220px; min-height: 220px; }
  .project-desc        { width: 100%; max-width: 100%; }
  .toggle-switch       { align-self: flex-start; }
  .live-link-btn       { align-self: flex-start; }

  .footer {
    position: static;
    display: block;
    height: auto;
    padding: 0;
    animation: none;
    transform: none;
  }
  .footer-nav          { display: none; }
  .footer-center {
    position: fixed;
    bottom: 16px;
    right: 16px;
    left: auto;
    z-index: 200;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    background: transparent;
    pointer-events: none;
  }
  .spotify-widget {
    pointer-events: all;
    width: auto;
    border-radius: 64px;
    padding: 5px 10px 5px 3px;
    box-shadow: none;
    background: rgba(235, 235, 239, 0.6);
  }
  .sp-btn              { width: 14px; opacity: 1; }
  .spotify-widget:hover .sp-btn { width: 14px; }
  .spotify-info        { width: 90px; margin-left: 6px; }
  .footer-right        { display: none; }
  .name                { font-weight: 500; font-size: 16px; }
  .title               { font-size: 12px; }
  .email               { font-size: 12px; }
  .bio                 { font-size: 13px; line-height: 22px; }
  .currently           { font-size: 13px; }
  .cal-label           { font-size: 12px; white-space: normal; }
  .legend-label        { font-size: 11px; }
  .project-title       { font-size: 14px; }
  .project-desc        { font-size: 13px; line-height: 22px; }
  .project-meta        { font-size: 12px; }
  .toggle-btn          { font-size: 12px; }
  .footer-mobile-nav   { display: flex; gap: 0; }
  .footer-mobile-nav .nav-link {
    font-size: 12px;
    display: flex;
    align-items: center;
    min-height: 44px;
    letter-spacing: 0.5px;
    line-height: 1.2;
  }
}
