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

:root {
  --text:      #1a1a1a;
  --muted:     #909090;
  --border:    #e8e8e8;
  --bg:        #F0F0F0;
  --max-w:     680px;
  --header-h:  6rem;
  --strip-w:   140px;
  --strip-gap: 16px;
  --gap:       2.75rem;
  --font:      system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  /* Hide native scrollbar — replaced by Möbius indicator */
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE / legacy Edge */
}

html::-webkit-scrollbar {
  display: none;               /* Chrome / Safari / Chromium Edge */
}

body {
  font-family: var(--font);
  line-height: 1.65;
  padding-top: 6rem;
}


/* ─── Page layout (content + Möbius strip side by side) ─────────────── */

#page-layout {
  display: flex;
  align-items: flex-start;
  gap: var(--strip-gap);
  max-width: calc(var(--max-w) + var(--strip-gap) + var(--strip-w));
  margin: 0 auto;
}

#content-col {
  flex: 1;
  min-width: 0;
  padding: 0 1.5rem 6rem;
}


/* ─── Header ─────────────────────────────── */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: calc(var(--max-w) + var(--strip-gap) + var(--strip-w));
  margin: 0 auto;
  padding: 0.9rem 1.5rem 0.75rem;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.role {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}


/* ─── Section labels ─────────────────────── */

h2 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}


/* ─── Public sections ────────────────────── */

main > section {
  margin-bottom: var(--gap);
  padding-bottom: var(--gap);
  border-bottom: 1px solid var(--border);
}

main > section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}


/* ─── Work history ───────────────────────── */

.project-list {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
  margin-bottom: 0.3rem;
}

.project-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.project-role {
  color: var(--muted);
  font-size: 0.83rem;
}

.project-duration {
  color: var(--muted);
  font-size: 0.78rem;
  margin-left: auto;
}

.project-stack {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.025em;
  margin-bottom: 0.45rem;
}

.project-desc {
  font-size: 0.87rem;
  color: #555;
  line-height: 1.6;
  list-style: none;
  padding: 0;
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.project-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s;
}

.project-title a:hover {
  border-bottom-color: var(--text);
}


/* ─── Tech stack ─────────────────────────── */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 480px) {
  .stack-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.stack-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.stack-group li {
  font-size: 0.87rem;
  color: #444;
}


/* ─── Contact ────────────────────────────── */

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.contact-label {
  width: 4rem;
  flex-shrink: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.contact-list a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s;
}

.contact-list a:hover {
  border-bottom-color: var(--text);
}


/* ─── Hidden layer ───────────────────────── */

#hidden-wrapper {
  position: relative;
  margin-top: var(--gap);
}

#hidden-sections > section {
  margin-bottom: var(--gap);
  padding-bottom: var(--gap);
  border-bottom: 1px solid var(--border);
}

#hidden-sections > section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 3rem;
}

#hidden-sections ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#hidden-sections li {
  font-size: 0.9rem;
  color: #444;
}

/* Album art rows in the music section */
.album {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.album-art {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}


/* ─── Möbius scroll indicator ───────────── */

#mobius-container {
  width: var(--strip-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  opacity: 0.92;
  pointer-events: none;
}

#mobius-container canvas {
  display: block;
}

@media (max-width: 600px) {
  #mobius-container { display: none; }
}


/* ─── Fog overlay ────────────────────────── */

#cloud-container {
  position: absolute;
  top:    -3rem;
  left:   -3rem;
  right:  -3rem;
  bottom: -2rem;
  z-index: 10;
  cursor: pointer;
  background: rgba(240, 240, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  mask: url('#fog-mask');
  -webkit-mask: url('#fog-mask');
  transition: opacity 1.5s ease-out;
}

#cloud-container.dissolving {
  opacity: 0;
}

#fog-hint {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(115, 115, 135, 0.65);
  font-family: system-ui, -apple-system, sans-serif;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
