/* bugni.cc /cv/ and /sound/ — the detail pages, on the same wall as the home
   page (loads after base.css). Cards are sheets of frosted glass. */

:root {
  --accent: #4b47c9;
  --accent-warm: #c2702a;
  /* names the inline styles in these pages still use */
  --text: var(--ink);
  --text-secondary: var(--ink-2);
  --border: var(--line);
  --surface: var(--glass);
}
[data-theme="dark"] {
  --accent: #b3afff;
  --accent-warm: #f0b27a;
}

strong { font-weight: 500; color: var(--ink); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 80vh;
  min-height: 80svh;
  padding: 8rem 0 clamp(2.5rem, 7vh, 4.5rem);
  display: flex;
  align-items: flex-end;
}
.hero .glass { left: 55%; right: 7%; top: 12vh; height: 22vh; }
.hero-content { position: relative; display: flex; align-items: flex-end; gap: 3rem; width: 100%; }
.hero-text { flex: 1; min-width: 0; }
.hero-photo {
  width: 210px;
  aspect-ratio: 4 / 5;
  border-radius: 3px;
  object-fit: cover;
  object-position: 60% center;
  flex-shrink: 0;
  box-shadow: 0 40px 70px -50px var(--glass-shadow);
}
.hero-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hero-label::before { content: ''; width: 24px; height: 1px; background: var(--ink-2); }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 6.4vw, 5.4rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 0.9rem;
}
.hero h1 span { font-weight: 500; letter-spacing: 0.02em; }
.hero-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-2);
  margin-bottom: 1.6rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.hero-meta a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 0.4rem; transition: color 0.2s; }
.hero-meta a:hover { color: var(--ink); }
.meta-dot { color: var(--line); }
.waveform { position: absolute; bottom: 0; left: 0; width: 100%; height: 60px; opacity: 0.3; }
@media (max-width: 768px) {
  .hero { min-height: auto; padding-top: 44vh; }
  .hero .glass { left: 10%; right: 10%; top: 12vh; height: 22vh; }
  .hero-content { flex-direction: column-reverse; align-items: flex-start; gap: 1.5rem; }
  .hero-photo { width: 132px; }
}

/* ===== SECTIONS ===== */
section { position: relative; padding: clamp(2.8rem, 8vh, 4.5rem) 0; }
.section-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ===== GLASS SHEETS ===== */
.about-card,
.work-card,
.experience-card,
.project-card,
.stat {
  position: relative;
  overflow: hidden;
  background: var(--noise), var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
  border: 1px solid var(--glass-edge);
  border-radius: 3px;
  box-shadow: 0 30px 50px -44px var(--glass-shadow);
}
/* the polished, coloured edge of the sheet */
.about-card::before,
.work-card::before,
.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, hsl(var(--h1, 176), 85%, 66%), hsl(var(--h2, 328), 95%, 74%));
  opacity: 0.75;
}
.about-card:nth-child(3n + 2), .work-card:nth-child(3n + 2), .experience-card:nth-of-type(3n + 2) { --h1: 226; --h2: 22; }
.about-card:nth-child(3n), .work-card:nth-child(3n), .experience-card:nth-of-type(3n) { --h1: 104; --h2: 262; }

/* ===== ABOUT / FACETS ===== */
.intro {
  font-size: clamp(1.05rem, 1.45vw, 1.25rem);
  line-height: 1.9;
  max-width: 46rem;
  margin-bottom: 2.2rem;
}
.intro strong { font-weight: 500; }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.facet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 860px) { .about-grid, .facet-grid { grid-template-columns: 1fr; } }
.about-card { padding: 1.5rem 1.5rem 1.5rem 1.7rem; }
.about-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; line-height: 1.3; margin-bottom: 0.7rem; }
html[data-lang="en"] .about-card h3 { font-weight: 400; font-size: 1.6rem; }
.about-card p { font-size: 0.95rem; color: var(--ink-2); line-height: 1.8; }
.facet-en { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--ink-2); margin-bottom: 0.6rem; }
.facet-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.facet-list a { color: inherit; text-decoration: none; }

/* ===== QUOTES (/sound/ about) ===== */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3.5rem; }
@media (max-width: 760px) { .quotes { grid-template-columns: 1fr; } }
.quotes p { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 3.3vw, 2.7rem); line-height: 1.3; }
html[data-lang="en"] .quotes p { font-weight: 400; font-style: italic; line-height: 1.1; }
.quote-note { margin-top: 2rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-2); }

/* ===== TAGS & CHIPS ===== */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
@media (max-width: 640px) { .skills-grid { grid-template-columns: 1fr; } }
.skill-category h3 { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.75rem; }
.skill-category ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skill-tag {
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-2);
  background: var(--glass);
  transition: border-color 0.2s, color 0.2s;
}
.skill-tag:hover { border-color: var(--ink); color: var(--ink); }
.skill-tag.learning { border-style: dashed; opacity: 0.75; }
.skill-tag.learning::after { content: ' ⟡'; font-size: 0.6rem; }
.tools-label { font-size: 0.8rem; color: var(--ink-2); margin-top: 1.25rem; }
.tools-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tools-label + .tools-row { margin-top: 0.5rem; }
.tool-chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-2);
  background: var(--glass);
}
.tool-chip.primary { border-color: var(--ink); color: var(--ink); }

/* ===== SELECTED WORK ===== */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 768px) { .work-grid { grid-template-columns: 1fr; } }
.work-card { padding: 1.5rem 1.5rem 1.5rem 1.7rem; scroll-margin-top: 2rem; }
.work-tag { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; color: var(--ink-2); margin-bottom: 0.6rem; }
.work-card h4 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; line-height: 1.3; margin-bottom: 0.6rem; }
html[data-lang="en"] .work-card h4 { font-weight: 400; font-size: 1.55rem; line-height: 1.15; }
.work-card p { font-size: 0.9rem; color: var(--ink-2); line-height: 1.8; }
.sound-note { margin-top: 1.5rem; font-size: 0.85rem; color: var(--ink-2); }
.sound-note a { color: var(--accent); text-decoration: none; }

/* ===== EXPERIENCE ===== */
.experience-card { padding: 1.75rem 1.75rem 1.75rem 2rem; margin-bottom: 1rem; }
.exp-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.exp-role { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; line-height: 1.25; }
.exp-date { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-2); white-space: nowrap; padding-top: 0.5rem; }
.exp-company { color: var(--ink-2); margin-bottom: 0.25rem; }
.exp-trajectory { font-size: 0.9rem; color: var(--accent); font-style: italic; margin-bottom: 1rem; }
.exp-section { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.exp-section-title { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.exp-list { list-style: none; padding: 0; }
.exp-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.75;
}
.exp-list li::before { content: '›'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.exp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
  margin-top: 0.6rem;
  transition: opacity 0.2s;
}
.exp-link:hover { opacity: 0.65; }

/* ===== PROJECT GRID ===== */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
@media (max-width: 640px) { .project-grid { grid-template-columns: 1fr; } }
.project-card { padding: 1.25rem; }
.project-num { font-family: var(--mono); font-size: 0.66rem; color: var(--ink-2); margin-bottom: 0.5rem; }
.project-card h4 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; line-height: 1.3; margin-bottom: 0.35rem; }
.project-card p { font-size: 0.82rem; color: var(--ink-2); line-height: 1.6; }

/* ===== STATS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; }
@media (max-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; padding: 1.4rem 1rem; }
.stat-value { font-family: var(--serif); font-size: 2.8rem; line-height: 1; margin-bottom: 0.5rem; }
.stat-label { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.08em; }

/* ===== PHOTOS / VIDEO ===== */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
  border-radius: 3px;
  overflow: hidden;
}
.photo-gallery img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.4s var(--ease); cursor: pointer; }
.photo-gallery img:hover { transform: scale(1.04); }
@media (max-width: 640px) {
  .photo-gallery { grid-template-columns: 1fr 1fr !important; }
  .photo-gallery img { height: 120px; }
}
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 1rem;
  background: #000;
}
.video-embed iframe { width: 100%; height: 100%; border: 0; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  cursor: zoom-out;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 3px; transform: scale(0.94); transition: transform 0.3s ease; }
.lightbox.active img { transform: scale(1); }

/* ===== EDUCATION ===== */
.edu-item { display: flex; gap: 1.5rem; align-items: baseline; margin-bottom: 0.75rem; }
.edu-year { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-2); white-space: nowrap; min-width: 90px; }
.edu-details h4 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; line-height: 1.3; }
.edu-details p { font-size: 0.88rem; color: var(--ink-2); }

/* ===== FOOTER ===== */
.footer { position: relative; padding: 2.5rem 0 2.2rem; border-top: 1px solid var(--line); text-align: center; }
.footer p { font-size: 0.8rem; color: var(--ink-2); }
.footer a { color: var(--accent); text-decoration: none; }

/* ===== /sound/: the Noise Maker block is laid out with inline grids ===== */
@media (max-width: 768px) {
  #noise-maker [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  #noise-maker [style*="grid-template-columns: repeat(4"] img { height: 120px !important; }
  #noise-maker [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-gallery img, .lightbox, .lightbox img { transition: none; }
}

/* ===== PRINT (the CV gets printed) ===== */
@page { size: A4; margin: 1cm; }
@media print {
  :root, [data-theme="dark"] {
    --wall: #fff; --ink: #111; --ink-2: #444; --line: #ddd;
    --glass: #f8f8fa; --glass-edge: #ddd; --glass-shadow: transparent; --accent: #4338ca;
  }
  #light, .grain, .top, .lightbox, .waveform, .video-embed { display: none !important; }
  html { font-size: 13px; }
  body { background: #fff; line-height: 1.45; }
  .container { max-width: 100%; padding: 0 0.5cm; }
  .hero { min-height: auto; padding: 0.8rem 0 0.5rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero-photo { width: 110px; box-shadow: none; }
  section { padding: 0.5rem 0; }
  .section-title { margin-bottom: 0.4rem; }
  .about-card, .work-card, .experience-card, .project-card, .stat {
    -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; break-inside: avoid;
  }
  .about-card, .work-card { padding: 0.5rem 0.7rem; }
  .experience-card { padding: 0.5rem 0.8rem; margin-bottom: 0.35rem; }
  .facet-grid { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
  .work-grid, .about-grid, .project-grid { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .intro, .about-card p, .work-card p { font-size: 0.78rem; line-height: 1.4; }
  .about-card h3, .work-card h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
  .exp-role { font-size: 1.1rem; }
  .exp-list li { font-size: 0.82rem; line-height: 1.4; margin-bottom: 0.1rem; }
  .skill-tag, .tool-chip { font-size: 0.7rem; padding: 0.12rem 0.4rem; }
  .photo-gallery img { height: 70px; }
  .footer { padding: 0.4rem 0; }
  a { text-decoration: none; }
}
