/* ═══════════════════════════════════════════════════════════════════
   CSS Custom Properties — Themes
   ═══════════════════════════════════════════════════════════════════ */

/* Engineer: dark, monospaced, structured */
.theme-engineer {
  --bg:           #101010;
  --bg-surface:   #1a1a1a;
  --bg-hover:     #242424;
  --border:       #333333;
  --text:         #e2e4ed;
  --text-muted:   #8f9299;
  --accent:       #d6d7da;
  --accent-hover: #ffffff;
  --stack-color:  #a8abb1;
  --heading-font: 'Courier New', Courier, monospace;
  --body-font:    ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
  --header-bg:          rgba(16, 16, 16, 0.92);
  --shadow:       0 1px 3px rgba(0,0,0,.6), 0 4px 16px rgba(0,0,0,.4);
  --radius:       4px;
}

/* Artist: high-fashion — pure white, charcoal, editorial */
.theme-artist {
  --bg:           #ffffff;
  --bg-surface:   #ffffff;
  --bg-hover:     #f5f5f5;
  --border:       #1a1a1a;
  --text:         #1a1a1a;
  --text-muted:   #555555;
  --accent:       #1a1a1a;
  --accent-hover: #555555;
  --stack-color:  #555555;
  --heading-font: 'Times New Roman', Georgia, serif;
  --body-font:    'Helvetica Neue', Helvetica, Arial, sans-serif;
  --header-bg:          rgba(255, 255, 255, 0.95);
  --shadow:       none;
  --radius:       0px;
}

/* ═══════════════════════════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 1rem;
  line-height: 1.65;
  transition:
    background-color 0.45s ease,
    color 0.45s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover, a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

/* ═══════════════════════════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 2rem;
  transition: background 0.45s ease, border-color 0.45s ease;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  transition: border-color 0.45s ease, color 0.45s ease;
}

.choosing-persona .site-header,
.choosing-persona main,
.choosing-persona .site-footer {
  display: none;
}

.choosing-persona:not(.previewing-persona) {
  background-color: #c6c6c6;
  color: #3f3f3f;
}

.persona-chooser {
  display: none;
}

.choosing-persona .persona-chooser {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 2rem;
  text-align: center;
}

.persona-chooser h1 {
  max-width: 34rem;
  color: var(--text);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 500;
  line-height: 1.35;
  transition: color 0.45s ease;
}

.choosing-persona:not(.previewing-persona) .persona-chooser h1 {
  color: #3f3f3f;
}

.chooser-toggle {
  display: flex;
  align-items: center;
  gap: 0.24em;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1;
}

.chooser-toggle .persona-separator {
  order: initial;
}

.chooser-btn {
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: inherit;
  line-height: 1;
  opacity: 0.58;
  transform: scale(0.84);
  transition:
    color 0.3s ease,
    opacity 0.3s ease,
    transform 0.28s ease;
}

.choosing-persona:not(.previewing-persona) .chooser-btn {
  color: #555555;
}

.chooser-btn:hover,
.chooser-btn:focus-visible {
  color: var(--text);
  opacity: 1;
  transform: scale(1);
}

.chooser-btn-dev {
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-weight: 650;
  transform-origin: right center;
}

.chooser-btn-art {
  font-family: Didot, 'Bodoni 72', 'Bodoni MT', 'Times New Roman', serif;
  font-weight: 400;
  transform-origin: left center;
}

/* ═══════════════════════════════════════════════════════════════════
   Persona Toggle
   ═══════════════════════════════════════════════════════════════════ */

.persona-toggle {
  display: flex;
  align-items: center;
  gap: 0.24em;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.header-contact {
  margin-left: auto;
}

.header-contact-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem 1.25rem;
}

.header-contact-list a {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.header-contact-list a:hover,
.header-contact-list a:focus-visible {
  color: var(--text);
}

.persona-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.42em;
  color: var(--text-muted);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1;
  opacity: 0.55;
  order: 2;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.toggle-btn {
  padding: 0;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  opacity: 0.46;
  transform: scale(0.72);
  transition:
    color 0.3s ease,
    opacity 0.3s ease,
    transform 0.28s ease;
}

#btn-engineer {
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-weight: 650;
  order: 1;
  transform-origin: right center;
}

#btn-artist {
  font-family: Didot, 'Bodoni 72', 'Bodoni MT', 'Times New Roman', serif;
  font-style: normal;
  font-weight: 400;
  order: 3;
  transform-origin: left center;
}

.toggle-btn.active {
  color: var(--text);
  opacity: 1;
  transform: scale(1);
}

.toggle-btn:hover {
  color: var(--text);
  opacity: 0.8;
}

.toggle-btn:not(.active):hover {
  transform: scale(0.94);
}

.toggle-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   Persona Sections
   ═══════════════════════════════════════════════════════════════════ */

.persona-section {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hidden {
  display: none;
}

.persona-section.fade-in {
  animation: fadeUp 0.35s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.persona-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.8fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  padding-top: 3.5rem;
}

.profile-column {
  position: sticky;
  top: 6.5rem;
}

.content-column {
  min-width: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════════════════════════ */

.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.35rem;
  padding: 0;
}

.hero-avatar {
  width: 110px;
  height: 110px;
  align-self: center;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: border-color 0.45s ease;
  background: var(--bg-surface);
}

.hero-text h1 {
  font-family: var(--heading-font);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  color: var(--text);
  transition: font-family 0.45s ease, color 0.45s ease;
}

.theme-engineer .hero-text h1 {
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-weight: 650;
}

.theme-engineer .content-section h2,
.theme-engineer .card h3 {
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

.hero-title {
  margin-top: 0.3rem;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--body-font);
  transition: color 0.45s ease;
}

.hero-tagline {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  font-style: italic;
  transition: color 0.45s ease;
}

/* ═══════════════════════════════════════════════════════════════════
   Content Sections
   ═══════════════════════════════════════════════════════════════════ */

.content-section {
  margin-top: 3rem;
}

.profile-column .content-section,
.content-column > .content-section:first-child {
  margin-top: 0;
}

.content-section h2 {
  font-family: var(--heading-font);
  font-size: 1.35rem;
  color: var(--text);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  transition: font-family 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}

/* ═══════════════════════════════════════════════════════════════════
   Project Cards (Engineer)
   ═══════════════════════════════════════════════════════════════════ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-surface);
  border: none;
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.card:hover {
  background: var(--bg-surface);
}

.card h3 {
  font-family: var(--heading-font);
  font-size: 1rem;
  color: var(--text);
}

.card-stack {
  font-size: 0.8rem;
  color: var(--stack-color);
  letter-spacing: 0.02em;
}

.card p:not(.card-stack) {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.experience-list {
  display: grid;
  gap: 1.4rem;
}

.experience-item {
  background: transparent;
  color: var(--text-muted);
}

.experience-item h3 {
  color: var(--text);
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.experience-item h3 span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 400;
  margin-left: 0.45rem;
}

.experience-item p {
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════════
   Gallery Grid (Artist)
   ═══════════════════════════════════════════════════════════════════ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--shadow);
  background: var(--bg-surface);
  transition: opacity 0.25s ease;
}

.gallery-item:hover {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-hover);
  display: block;
  transition: filter 0.4s ease, transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.015);
}

.gallery-placeholder {
  min-height: 260px;
  background:
    linear-gradient(135deg, transparent calc(50% - 1px), var(--text-muted) 50%, transparent calc(50% + 1px)),
    var(--bg-hover);
  opacity: 0.28;
}

/* ═══════════════════════════════════════════════════════════════════
   About
   ═══════════════════════════════════════════════════════════════════ */

.about-text {
  max-width: 620px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
}

.theme-engineer .about-section {
  margin-top: 1.2rem;
}

.theme-engineer .about-text {
  max-width: 27rem;
  color: var(--text-muted);
  font-size: clamp(0.9rem, 1.05vw, 0.98rem);
  line-height: 1.52;
}

.theme-engineer .about-text + .about-text {
  margin-top: 0.65rem;
}

/* ═══════════════════════════════════════════════════════════════════
   Artist theme overrides — editorial / high-fashion
   ═══════════════════════════════════════════════════════════════════ */

/* Sparse, asymmetric gallery layout */
.theme-artist .gallery-grid {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 0;
}

.theme-artist .gallery-item {
  border: none;
}

.theme-artist .gallery-item:nth-child(1) { grid-column: 1 / 8; }
.theme-artist .gallery-item:nth-child(2) { grid-column: 8 / 13; }
.theme-artist .gallery-item:nth-child(3) { grid-column: 1 / 5; }
.theme-artist .gallery-item:nth-child(4) { grid-column: 5 / 10; }
.theme-artist .gallery-item:nth-child(5) { grid-column: 10 / 13; }
.theme-artist .gallery-item:nth-child(6) { grid-column: 1 / 13; }
.theme-artist .gallery-item:nth-child(7) { grid-column: 1 / 7; }
.theme-artist .gallery-item:nth-child(8) { grid-column: 7 / 13; }
.theme-artist .gallery-item:nth-child(9) { grid-column: 1 / 13; }
.theme-artist .gallery-item:nth-child(10) { grid-column: 1 / 7; }
.theme-artist .gallery-item:nth-child(11) { grid-column: 7 / 13; }
.theme-artist .gallery-item:nth-child(12) { grid-column: 1 / 13; }

.theme-artist .gallery-item img {
  aspect-ratio: unset;
  min-height: 220px;
  max-height: 480px;
  height: 100%;
  filter: grayscale(15%);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.theme-artist .gallery-item:nth-child(9) img,
.theme-artist .gallery-item:nth-child(12) img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: contain;
}

.theme-artist .gallery-grid > .gallery-item-full {
  grid-column: 1 / -1 !important;
  display: block;
  width: 100%;
  justify-self: stretch;
}

.theme-artist .gallery-grid > .gallery-item-full img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
}

.theme-artist .gallery-item:hover img {
  filter: grayscale(0%);
}

/* Large editorial hero headline */
.theme-artist .hero {
  gap: 1.5rem;
}

.theme-artist .hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.0;
}

.theme-artist .hero-title {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1rem;
}

.theme-artist .hero-tagline {
  font-size: 0.95rem;
  font-style: normal;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
}

.theme-artist .hero-avatar {
  border-radius: 0;
  border: none;
  width: 130px;
  height: 170px;
  object-fit: cover;
  object-position: top;
  filter: grayscale(20%);
}

/* Uppercase section headings with wide tracking */
.theme-artist .content-section h2 {
  font-family: var(--body-font);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* About text — larger, editorial */
.theme-artist .about-section {
  margin-top: 1.25rem;
}

.theme-artist .about-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(0.92rem, 1.15vw, 1rem);
  line-height: 1.78;
  letter-spacing: 0.01em;
  color: #3f3f3f;
  max-width: 24rem;
}

.theme-artist .about-text + .about-text {
  margin-top: 1rem;
}

.theme-artist .header-contact-list a {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #777777;
}

.theme-artist .header-contact-list a:hover {
  color: #444444;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
  }

  .header-contact {
    margin-left: 0;
  }

  .header-contact-list {
    justify-content: flex-start;
  }

  main {
    padding: 0 1rem 3rem;
  }

  .persona-toggle {
    font-size: clamp(1.5rem, 10vw, 2.4rem);
  }

  .persona-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 2rem;
  }

  .profile-column {
    position: static;
  }

  .hero {
    align-items: flex-start;
    gap: 1.25rem;
  }

  .hero-avatar {
    width: 80px;
    height: 80px;
  }

  .card-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .theme-artist .gallery-grid {
    grid-template-columns: 1fr;
  }

  .theme-artist .gallery-item:nth-child(n) {
    grid-column: 1 / -1;
  }
}
