/* ================================================
   SASHA OLKHOVYI — PORTFOLIO v2
   style.css
   ================================================ */

/* ===== GOOGLE FONTS (loaded here so no <link> needed in HTML) ===== */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&family=Lexend+Mega:wght@400;500;600;700;800&display=swap');

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

/* ===== VARIABLES ===== */
:root {
  --bg: #EBEAE6;
  --text: #000000;
  --titles: #0C0C0C;
  --secondary: #736B68;
  --accent: #FF752B;
  --accent-hover: #e5621d;
  --secondary-2: #C4C3BD;
  --font-title: 'Lexend Mega', 'Jost', sans-serif;
  --font-body: 'Jost', sans-serif;
  --radius: 999px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); cursor: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button { cursor: none; }
/* ===== HIDE CURSOR ON TOUCH / MOBILE ===== */
@media (hover: none), (pointer: coarse) {
  .cursor { display: none !important; }
  body, a, button, input, textarea, select { cursor: auto !important; }
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
  position: fixed;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease;
  will-change: left, top;
}
.cursor.hovering { width: 28px; height: 28px; }

/* ===== GRAIN OVERLAY ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='0.5' intercept='0'/%3E%3CfeFuncG type='linear' slope='0.5' intercept='0'/%3E%3CfeFuncB type='linear' slope='0.5' intercept='0'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 512px 512px;
}

/* ===== PRELOADER ===== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
}
/* Line bar */
.preloader-line {
  width: clamp(120px, 20vw, 240px);
  height: 8px;
  background: var(--secondary-2);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.preloader-line-fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.preloader-line-fill.filling {
  transform: scaleX(1);
}
/* Phase 2: line collapses into dot */
.preloader.shrinking .preloader-line {
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.4s ease;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
.preloader.shrinking .preloader-line-fill {
  border-radius: 50%;
}
/* Phase 3: dot flies to cursor */
.preloader-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.preloader-dot.visible {
  opacity: 1;
  transition: opacity 0.15s ease;
}
.preloader-dot.flying {
  transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Phase 4: fade out preloader */
.preloader.done {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
/* ===== LANGUAGE SYSTEM ===== */
.lang-en [data-lang]:not([data-lang="en"]),
.lang-ua [data-lang]:not([data-lang="ua"]),
.lang-de [data-lang]:not([data-lang="de"]) { display: none !important; }
html:not(.lang-en):not(.lang-ua):not(.lang-de) [data-lang]:not([data-lang="en"]) { display: none !important; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 { font-family: var(--font-title); color: var(--titles); font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.2; letter-spacing: 0.05em; }
h2 { font-size: 1.1rem; letter-spacing: 0.04em; margin-bottom: 12px; }
h3 { font-size: 0.85rem; letter-spacing: 0.03em; margin-bottom: 4px; }
.secondary-text { color: var(--secondary); }

/* ===== TOP BAR ===== */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 36px;
}

.morse-menu-wrap { position: relative; background: var(--secondary-2); border-radius: var(--radius); padding: 4px; transition: background 0.25s; }
.morse-menu {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--secondary);
  background: none; border: none;
  padding: 7px 18px;
  border-radius: var(--radius);
  transition: color 0.2s;
}
.morse-menu:hover { color: var(--text); }

.menu-dropdown {
  position: absolute;
  top: calc(100% + 12px); left: 0;
  background: var(--titles);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 180px;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(0.55);
  transform-origin: top left;
  transition: opacity 0.35s cubic-bezier(0.22, 1.5, 0.36, 1), visibility 0.35s, transform 0.5s cubic-bezier(0.22, 1.5, 0.36, 1);
  z-index: 101;
}
.menu-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.menu-dropdown a {
  display: block; padding: 10px 24px;
  color: var(--bg); font-size: 0.82rem;
  font-family: var(--font-body);
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.menu-dropdown a:hover { color: var(--accent); }

.lang-toggle { display: flex; gap: 2px; align-items: center; background: var(--secondary-2); border-radius: var(--radius); padding: 4px; position: relative; }
.lang-indicator { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: var(--radius); background: var(--titles); z-index: 0; pointer-events: none; will-change: transform, width; }
.lang-toggle button {
  background: none; border: none;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--secondary);
  padding: 7px 14px;
  border-radius: var(--radius);
  transition: color 0.25s;
  text-transform: lowercase;
  position: relative;
  z-index: 1;
}
.lang-toggle button.active { color: var(--bg); }
.lang-toggle button:hover:not(.active) { color: var(--accent); }

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  width: 100%; height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* overflow removed — body has overflow-x:hidden, letters need to escape upward */
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-left: 28%;
}

.hero-title-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transform-origin: center center;
}

.hero-name {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.4vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--titles);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-right: 0.05em;
  display: flex;
  align-items: baseline;
}
.hero-name-letter {
  display: inline-block;
  will-change: transform, filter;
  transform-origin: center bottom;
}
.hero-name-gap {
  width: 0.3em;
}

.hero-word {
  display: flex;
  align-items: baseline;
  font-family: var(--font-title);
  font-size: clamp(4rem, 10vw, 8.5rem);
  font-weight: 700;
  color: var(--titles);
  line-height: 1;
  letter-spacing: 0.01em;
  user-select: none;
  margin-left: -0.14em; /* compensate Lexend Mega left sidebearing so letters align flush with categories */
}
.hero-word-break {
  display: none;
}
/* Alignment driven by HERO_CONFIG via data-align */
.hero-word[data-align="left"]   { justify-content: flex-start; }
.hero-word[data-align="right"]  { justify-content: flex-end; }
.hero-word[data-align="center"] { justify-content: center; }
.hero-center:has(.hero-word[data-align="left"]) { width: 100%; margin-left: 0; padding-left: 32px; align-items: flex-start; }
.hero-center:has(.hero-word[data-align="center"]) { width: 100%; margin-left: 0; align-items: center; }
.hero-title-wrap:has(.hero-word[data-align="left"]) { align-items: flex-start; }
.hero-title-wrap:has(.hero-word[data-align="center"]) { align-items: center; }
/* Gap span for spaces in multi-word hero titles (ABOUT ME, CONTACT ME) */
.hero-word-gap { display: inline-block; width: 0.3em; }
.hero-word span {
  display: inline-block;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease, opacity 0.4s ease;
  will-change: transform, filter;
  cursor: none;
}

.hero-categories {
  display: flex;
  gap: clamp(24px, 5vw, 64px);
  margin-top: 20px;
  align-items: center;
  will-change: transform, opacity;
  transition: gap 0.3s ease;
}
.hero-cat {
  background: none; border: none;
  font-family: var(--font-body);
  font-size: clamp(0.65rem, 0.95vw, 0.78rem);
  letter-spacing: 0.22em;
  color: var(--secondary);
  text-transform: uppercase;
  padding: 4px 0;
  transition: color 0.25s ease;
}
.hero-cat:hover { color: var(--text); }

.scroll-prompt {
  position: absolute;
  bottom: 48px; left: 50%;
  transform: translateX(-50%);
  background: none; border: none;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--secondary);
  text-transform: uppercase;
  padding: 8px;
  transition: color 0.25s ease, opacity 0.4s ease;
  animation: scrollPulse 2.5s ease-in-out infinite;
}
.scroll-prompt:hover { color: var(--text); }
@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.scroll-prompt.hidden { opacity: 0; pointer-events: none; }

/* ===== CAPSULE HEADER ===== */
.capsule-header {
  position: sticky; top: 72px; z-index: 100;
  display: flex; justify-content: center;
  padding: 0 32px; margin-bottom: 32px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.capsule-header.visible { opacity: 1; transform: translateY(0); }
.capsule-outer {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--secondary-2);
  border-radius: var(--radius);
  padding: 5px;
  pointer-events: all;
  position: relative;
}
.capsule-btn {
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.06em;
  padding: 8px 22px; border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--titles);
  transition: all 0.25s ease;
  white-space: nowrap;
}
.capsule-indicator {
  position: absolute;
  top: 5px; bottom: 5px;
  left: 0;
  border-radius: var(--radius);
  background: var(--titles);
  z-index: 0;
  pointer-events: none;
  will-change: transform, width;
}
.capsule-btn { position: relative; z-index: 1; }
.capsule-btn.active { background: transparent; color: var(--bg); }
.capsule-btn:hover:not(.active) { color: var(--accent); }

/* ===== PORTFOLIO GRIDS ===== */
.portfolio-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 32px 60px;
  overflow: visible;
}
/* -- Shared feed-item base -- */
.feed-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  display: block;
  transition: filter 0.4s ease, opacity 0.4s ease, transform 0.3s ease;
}
.feed-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.feed-item:hover img { transform: scale(1.03); }
.feed-item .item-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.65) 0%, transparent 100%);
  opacity: 0; transition: opacity 0.3s ease;
}
.feed-item:hover .item-overlay { opacity: 1; }
.item-overlay h3 { color: #fff; font-family: var(--font-title); font-size: 0.72rem; letter-spacing: 0.05em; margin: 0; }
.item-overlay p { color: rgba(255,255,255,0.55); font-size: 0.68rem; letter-spacing: 0.03em; margin-top: 2px; }
/* -- Digital Art: Dense mosaic (edge-to-edge, packed) -- */
.mosaic-grid {
  columns: 4;
  column-gap: 4px;
}
.mosaic-grid .feed-item {
  break-inside: avoid;
  margin-bottom: 4px;
  border-radius: 2px;
}
.mosaic-grid .feed-item img {
  aspect-ratio: unset;
  height: auto;
}
/* -- Industrial Design: Product showcase (PNG style) -- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0 32px;
}
.product-grid .feed-item {
  overflow: visible;
  border-radius: 0;
}
.product-grid .feed-item img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: rgba(0,0,0,0.025);
  border-radius: var(--radius-sm);
  padding: 24px;
  transition: transform 0.5s ease, box-shadow 0.3s ease;
}
.product-grid .feed-item:hover img {
  transform: scale(1);
  box-shadow: 0 16px 48px rgba(0,0,0,0.08);
}
.product-grid .item-overlay {
  position: static;
  background: none;
  opacity: 1;
  padding: 14px 2px 0;
}
.product-grid .item-overlay h3 {
  color: var(--titles);
  font-size: 0.78rem;
}
.product-grid .item-overlay p {
  color: var(--secondary);
  font-size: 0.7rem;
}
.product-grid .feed-item:hover .item-overlay { opacity: 1; }
/* -- Music: Coming Soon -- */
.coming-soon {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.coming-soon-text {
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 3vw, 2rem);
  letter-spacing: 0.35em;
  color: var(--secondary);
  text-transform: uppercase;
  cursor: none;
}
.category-content { display: none; }
.category-content.active { display: block; }

/* ===== PAGE LAYOUT ===== */
.page-section { max-width: 760px; margin: 0 auto; padding: 120px 32px 80px; flex: 1 0 auto; }
.portfolio-section { flex: 1 0 auto; }
.page-section h1 { margin-bottom: 40px; }

/* ===== CV ===== */
.cv-block { margin-bottom: 48px; }
.cv-block-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--secondary); font-family: var(--font-body); font-weight: 600; margin-bottom: 20px; }
.cv-item { padding: 20px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.cv-item:last-child { border-bottom: none; }
.cv-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.cv-header h3 { margin: 0; font-size: 0.95rem; }
.cv-date { font-size: 0.72rem; color: var(--secondary); letter-spacing: 0.05em; }
.cv-role { color: var(--accent); font-size: 0.82rem; font-weight: 500; margin-bottom: 8px; }
.cv-desc { font-size: 0.85rem; color: var(--secondary); line-height: 1.7; }
.cv-desc ul { list-style: none; padding: 0; }
.cv-desc li { padding: 2px 0; }
.cv-desc li::before { content: "\2192 "; color: var(--accent); }
.skills-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag { padding: 6px 16px; border-radius: var(--radius); font-size: 0.75rem; color: var(--secondary); border: 1px solid rgba(0,0,0,0.08); background: transparent; letter-spacing: 0.03em; }
.download-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 32px; padding: 12px 28px; background: var(--titles); color: var(--bg); border-radius: var(--radius); font-weight: 500; font-size: 0.82rem; font-family: var(--font-body); letter-spacing: 0.05em; transition: all 0.25s; border: none; text-decoration: none; }
.download-btn:hover { background: var(--accent); color: #fff; }

/* ===== ABOUT ===== */
.about-layout { }
.about-layout.layout-text-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-layout.layout-text-image .about-content { max-width: none; }
.about-layout.layout-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 50vh;
}
.about-layout.layout-split .about-content { max-width: none; padding-right: 48px; }
.about-layout.layout-split .about-image img {
  height: 100%;
  object-fit: cover;
}
.about-layout:not(.layout-text-image):not(.layout-split) .about-image { display: none; }
.about-image img {
  width: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.about-content { font-size: 0.95rem; line-height: 1.85; color: var(--text); max-width: 600px; }
.about-content p { margin-bottom: 20px; }
.accent-text { color: var(--accent); }
@media (max-width: 768px) {
  .about-layout.layout-text-image,
  .about-layout.layout-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-layout.layout-split .about-content { padding-right: 0; }
  .about-layout .about-image { order: -1; }
}

/* ===== CONTACT ===== */
.contact-intro { font-size: 0.92rem; color: var(--secondary); max-width: 520px; margin-bottom: 40px; line-height: 1.7; }
form { display: flex; flex-direction: column; gap: 24px; max-width: 520px; }
label { font-size: 0.68rem; font-weight: 600; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 6px; display: block; }
input, textarea, select { width: 100%; padding: 14px 0; background: transparent; border: none; border-bottom: 1px solid rgba(0,0,0,0.1); color: var(--text); font-size: 0.92rem; font-family: var(--font-body); outline: none; transition: border-color 0.2s; cursor: none; }
input:focus, textarea:focus, select:focus { border-bottom-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--secondary); }
textarea { min-height: 120px; resize: vertical; }
select { -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.submit-btn { padding: 12px 28px; background: var(--titles); color: var(--bg); border: none; border-radius: var(--radius); font-weight: 500; font-size: 0.82rem; font-family: var(--font-body); letter-spacing: 0.05em; transition: all 0.25s; align-self: flex-start; cursor: none; }
.submit-btn:hover { background: var(--accent); color: #fff; }

/* ===== 404 PAGE ===== */
.notfound {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 32px 80px;
}
.notfound-center {
  max-width: 860px;
  width: 100%;
}
.notfound-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--secondary);
  margin-bottom: 18px;
}
.notfound-code {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-title);
  font-size: clamp(4.2rem, 13vw, 9.2rem);
  color: var(--titles);
  line-height: 1;
  user-select: none;
  margin-bottom: 12px;
}
.notfound-code span {
  display: inline-block;
  will-change: transform, filter;
  cursor: none;
}
.notfound-sub {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--secondary);
  max-width: 560px;
}
.notfound-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.nf-btn {
  padding: 12px 22px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: var(--radius);
  background: transparent;
  color: var(--titles);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}
.nf-btn:hover {
  border-color: rgba(0,0,0,0.18);
  color: var(--accent);
}
.nf-btn.primary {
  background: var(--titles);
  color: var(--bg);
  border-color: var(--titles);
}
.nf-btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.notfound-quick {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.nf-chip {
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.015);
  color: var(--secondary);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}
.nf-chip:hover {
  border-color: rgba(0,0,0,0.18);
  color: var(--titles);
}
@media (max-width: 768px) {
  .notfound { padding: 120px 20px 70px; }
  .notfound-sub { max-width: 100%; }
}
/* ===== PROJECT PAGE ===== */
.project-hero { width: 100%; max-height: 70vh; object-fit: cover; color: transparent; font-size: 0; background: rgba(0,0,0,0.025); }
.project-content { max-width: 760px; margin: 0 auto; padding: 48px 32px 80px; }
.project-content h1 { margin-bottom: 8px; }
.project-meta { font-size: 0.75rem; color: var(--secondary); letter-spacing: 0.08em; margin-bottom: 32px; text-transform: uppercase; }
.project-body { font-size: 0.95rem; line-height: 1.85; color: var(--text); }
.project-body p { margin-bottom: 20px; }
.project-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 32px 0; }
.project-gallery img { width: 100%; border-radius: var(--radius-sm); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--secondary); letter-spacing: 0.05em; margin-bottom: 24px; transition: color 0.2s; }
.back-link:hover { color: var(--accent); }

/* ===== FOOTER ===== */
footer { padding: 48px 32px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(0,0,0,0.06); max-width: 1400px; margin: auto auto 0; width: 100%; flex-shrink: 0; }
.footer-copy { font-size: 0.72rem; color: var(--secondary); letter-spacing: 0.05em; }
.footer-socials { display: flex; gap: 16px; align-items: center; }
.footer-socials a { display: block; width: 22px; height: 22px; opacity: 0.45; transition: opacity 0.2s; }
.footer-socials a:hover { opacity: 1; }
.footer-socials img { width: 100%; height: 100%; object-fit: contain; }

/* ===== CMS BLOCK RENDERER ===== */
.cms-block {
  margin: 0 auto;
  width: 100%;
}
.cms-block-text {
  font-size: 0.95rem;
  line-height: 1.85;
}
.cms-block-text p { margin-bottom: 20px; }
.cms-block-text p:last-child { margin-bottom: 0; }
.cms-block-image img {
  width: 100%;
  display: block;
}
.cms-block-spacer { pointer-events: none; }
.cms-block-gallery img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
}
.cms-block-two-column {
  align-items: start;
}
.cms-col-side img {
  width: 100%;
  display: block;
}
.cms-col-side p { margin-bottom: 16px; }
.cms-col-side p:last-child { margin-bottom: 0; }
/* -- Column Group (Notion-style multi-column) -- */
.cms-block-column-group {
  align-items: start;
  width: 100%;
}
.cms-block-column-group .cms-col {
  min-width: 0;
}
.cms-block-column-group .cms-col img {
  width: 100%;
  display: block;
}
.cms-block-column-group .cms-col p { margin-bottom: 16px; }
.cms-block-column-group .cms-col p:last-child { margin-bottom: 0; }
#blockContainer {
  display: flex;
  flex-direction: column;
  gap: 0;
}
@media (max-width: 768px) {
  .cms-block-column-group { grid-template-columns: 1fr !important; }
  .cms-block-two-column { grid-template-columns: 1fr !important; }
  .cms-block-gallery { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .mosaic-grid { columns: 3; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .mosaic-grid { columns: 2; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .top-bar { display: none; }
  .morse-menu { padding: 5px 14px; font-size: 0.75rem; }
  .menu-dropdown { transition: opacity 0.15s ease-out, visibility 0.15s, transform 0.2s cubic-bezier(0.22, 1.5, 0.36, 1); }
  .feed-item { transition-duration: 0.25s; }
  .capsule-header { top: 16px; opacity: 1 !important; }
  .capsule-wrap { display: inline-flex; align-items: center; pointer-events: none; position: relative; }
  .capsule-menu-pill { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; background: var(--secondary-2); border-radius: var(--radius); padding: 0 5px; pointer-events: all; white-space: nowrap; overflow: hidden; }
  .capsule-menu-pill .morse-menu { font-size: 0.7rem; letter-spacing: 0.15em; padding: 6px 14px; }
  .capsule-menu-pill .menu-dropdown { left: 0; top: calc(100% + 12px); }
  .portfolio-section { padding: 30px 20px 40px; }
  .page-section { padding: 100px 20px 60px; }
  .capsule-header { padding: 0 20px; }
  .hero-center { margin-left: 10%; }
  .hero-categories { gap: 20px; flex-wrap: wrap; justify-content: center; }
  .hero-word { font-size: clamp(2.8rem, 12vw, 5rem); flex-wrap: wrap; justify-content: flex-end; width: 100%; }
  .hero-word-break { display: block; flex-basis: 100%; height: 0; }
  .hero-center { margin-left: 0; padding: 0 20px; align-items: flex-end; }
  .hero-name { font-size: 0.65rem; }
  /* Hide gap after line break on mobile (e.g. ABOUT | ME) */
  .hero-word-break + .hero-word-gap { display: none; }
  .hero-center:has(.hero-word[data-align="left"]) { width: 100%; margin-left: 0; padding: 0 20px; align-items: flex-start; }
  .hero-center:has(.hero-word[data-align="center"]) { width: 100%; margin-left: 0; padding: 0 20px; align-items: center; }
  .hero-title-wrap:has(.hero-word[data-align="left"]) { align-items: flex-start; }
  .hero-title-wrap:has(.hero-word[data-align="center"]) { align-items: center; }
  footer { padding: 32px 20px; flex-direction: column; gap: 20px; text-align: center; }
  .project-gallery { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .mosaic-grid { columns: 2; column-gap: 3px; }
  .mosaic-grid .feed-item { margin-bottom: 3px; }
  .product-grid { grid-template-columns: 1fr; gap: 28px; }
  .capsule-btn { padding: 6px 14px; font-size: 0.7rem; }
  .capsule-outer { gap: 2px; padding: 4px; }
  .hero-center { margin-left: 5%; }
  .hero-categories { gap: 14px; }
  .hero-cat { font-size: 0.6rem; letter-spacing: 0.15em; }
  .scroll-prompt { bottom: 32px; }
}