/* ============================================================
   V3 PORTFOLIO — DESIGN SYSTEM & STYLES
   'Arkitect' Style — Architectural Frame Layout
   Typography: Instrument Serif (headers) + Inter (body)
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-bg: #EBEBEA;
  --color-outer: #111111;
  --color-text: #1A1A1A;
  --color-text-secondary: #6B6B6B;
  --color-surface: #F5F5F5;
  --color-border: #E8E8E8;
  --color-notch-bg: rgba(20, 20, 20, 0.90);
  --color-notch-text: #FFFFFF;
  --color-accent: #0044FF;

  /* Typography */
  --font-heading: 'Instrument Serif', serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;

  /* Layout */
  --max-width: 1200px;
  --media-max-width: 1280px;
  --card-radius: 16px;
  --notch-radius: 50px;
  --frame-radius: 32px;
  --grid-item-radius: 24px;
  --frame-padding: 18px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.6s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-outer);
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   ARCHITECTURAL FRAME LAYOUT
   ============================================================ */

/* Outer container — the dark background "border" */
.viewport-outer {
  position: relative;
  min-height: 100vh;
  background-color: var(--color-outer);
  padding: var(--frame-padding);
  display: flex;
}

/* Inner frame — the white content area */
.site-frame {
  flex: 1;
  background: var(--color-bg);
  border-radius: var(--frame-radius);
  overflow: visible;
  position: relative;
  transition:
    transform 0.42s var(--ease-out),
    opacity 0.28s var(--ease-out),
    filter 0.28s var(--ease-out);
}

/* Body fade-in on load */
.site-frame > * {
  animation: bodyFadeIn 0.5s ease forwards;
}

@keyframes bodyFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-outer);
  color: #F5F1E8;
  padding: 0 var(--frame-padding) calc(var(--space-md) + 20px);
}

.site-footer-inner {
  max-width: min(1400px, calc(100vw - (var(--frame-padding) * 2)));
  margin: 0 auto;
  padding: 0;
  position: relative;
}

.site-footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding-top: 64px;
  max-width: 980px;
  margin: 0 auto;
}

.site-footer-brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 0;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: opacity var(--duration-fast) ease;
}

.site-footer-brand:hover {
  opacity: 0.82;
}

.site-footer-logo-mark {
  width: min(100%, 260px);
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.94;
}

.site-footer-wordmark {
  font-family: var(--font-heading);
  font-size: clamp(88px, 16vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.site-footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  padding-bottom: 0;
}

.site-footer-kicker {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.96);
  margin: 0 0 8px;
}

.site-footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  padding: 0 0 12px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  font-family: var(--font-heading);
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 0.95;
  white-space: nowrap;
  transition: border-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-out);
}

.site-footer-link--secondary {
  font-size: clamp(17px, 2vw, 29px);
}

.site-footer-link:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

.site-footer-toplink {
  position: absolute;
  top: -56px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 250px;
  min-height: 56px;
  padding: 0 28px;
  border: none;
  border-radius: 0 0 28px 28px;
  color: #111111;
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 1;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -18px);
  transition: background var(--duration-fast) ease,
    transform 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
}

.site-footer.footer-reveal-active .site-footer-toplink {
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 10px);
}

.site-footer-toplink:hover {
  color: #3a3a3a;
}

/* ============================================================
   SITE HEADER (3-part: Logo | Nav-Pill | Spacer)
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 32px;
  background: transparent; /* No more white rectangle */
  border-bottom: 1px solid transparent;
  transition: transform var(--duration-normal) var(--ease-out);
}

/* Class to hide the header on scroll down */
.site-header.header-hidden {
  transform: translateY(-100%);
}

/* Logo in header (inside nav pill) */
.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  cursor: pointer;
  user-select: none;
  padding-left: 22px;
  padding-right: 14px;
  margin-right: 8px;
  transition: opacity var(--duration-fast) ease;
}

.site-logo-mark {
  display: block;
  height: 24px;
  width: auto;
  max-width: 128px;
  object-fit: contain;
  opacity: 0.98;
  filter: brightness(0) invert(1) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.14));
}

.site-logo:hover {
  opacity: 0.6;
}

/* Right spacer */
.site-header-right {
  justify-self: end;
}

/* ============================================================
   NOTCH NAV (Pill — center of header)
   ============================================================ */
.notch-nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px;
  background: var(--color-outer);
  border-radius: var(--notch-radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -2px 8px rgba(0, 0, 0, 0.28),
    0 4px 20px rgba(0, 0, 0, 0.12);
}

.notch-links-shell {
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.notch-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.notch-active-pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 50px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 244, 244, 0.98) 100%);
  transition: transform 0.65s var(--ease-out),
              width 0.65s var(--ease-out),
              opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.notch-active-pill.is-returning {
  transition: transform 0.8s var(--ease-out),
              width 0.8s var(--ease-out),
              opacity 0.2s ease;
}

.notch-link {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-notch-text);
  padding: 7px 16px;
  border-radius: 50px;
  transition: color var(--duration-fast) ease,
              opacity var(--duration-fast) ease;
  cursor: pointer;
  user-select: none;
  opacity: 0.75;
  white-space: nowrap;
}

.notch-link:hover {
  opacity: 1;
}

.notch-link.active {
  opacity: 1;
}

.notch-link.is-highlighted {
  color: var(--color-text);
  opacity: 1;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  text-align: center;
  padding: 40px var(--space-md) 60px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

/* Hero entrance animation */
.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: heroLineIn 0.7s var(--ease-out) forwards;
}

.about-hero-headline .line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: heroLineIn 0.7s var(--ease-out) forwards;
}

.hero-title .line:nth-child(2) {
  animation-delay: 0.12s;
}

.about-hero-headline .line:nth-child(2) {
  animation-delay: 0.12s;
}

@keyframes heroLineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   PROJECT CARDS GRID — Flush Architectural Layout
   ============================================================ */
.projects-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: 0 0 var(--space-xl);
}

.project-card {
  position: relative;
  width: min(calc(100% - (var(--space-md) * 2)), var(--media-max-width));
  max-width: var(--media-max-width);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  display: block;
  border-radius: var(--frame-radius);
}

@media (hover: hover) and (pointer: fine) {
  .has-custom-view-cursor .project-card,
  .has-custom-view-cursor .project-card * {
    cursor: none !important;
  }
}

/* BG image — fills full card */
.project-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: inherit;
  transition: transform 0.7s var(--ease-out);
}

.project-card:hover .project-card-bg {
  transform: scale(1.03);
}

.project-view-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.92);
  color: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  pointer-events: none;
  z-index: 2100;
  transition:
    opacity 0.18s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-view-cursor.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.project-view-cursor__label {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}

/* Brand tag — minimalist white pill on top-left */
.project-brand-tag {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.brand-pill {
  display: inline-block;
  background: #FFFFFF;
  color: #1A1A1A;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 50px;
  pointer-events: none;
  /* Subtle shadow for readability on dark images */
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: opacity var(--duration-fast) ease;
}

/* Click-to-nav overlay */
.project-card-click-area {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ============================================================
   PROJECT DETAIL PAGE
   ============================================================ */
.project-hero {
  position: relative;
  width: 100%;
  margin-top: 0;
  padding: 0 var(--space-md);
  max-width: var(--media-max-width);
  margin: 40px auto 0;
}

.project-hero-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--frame-radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.project-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-hero-label {
  font-family: var(--font-heading);
  font-size: clamp(32px, 6vw, 56px);
  color: #FFFFFF;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.project-info {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
  text-align: center;
}

.project-info-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 400;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.project-info-description {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

.project-info-description span {
  font-size: inherit !important;
}

.project-info-description p {
  margin-bottom: var(--space-sm) !important;
}

.project-info-description p:last-child {
  margin-bottom: 0 !important;
}

/* Base styles for user-generated inline links */
[data-editable] a,
.content-blocks a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: opacity 0.2s ease;
}

[data-editable] a:hover,
.content-blocks a:hover {
  opacity: 0.6;
}

.project-meta {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-top: var(--space-lg);
}

.project-meta span {
  white-space: nowrap;
}

/* --- Content Blocks --- */
.content-blocks {
  max-width: var(--media-max-width);
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.block-full-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--frame-radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.block-full-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.block-full-image-label {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 48px);
  color: #FFFFFF;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.block-image-grid {
  display: grid;
  gap: var(--space-sm);
}

.block-two-image {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.block-two-image-item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--frame-radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.block-image-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.block-image-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.block-image-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.block-grid-item {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--grid-item-radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.block-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumbnail-drag-handle {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: grab;
  z-index: 21;
  backdrop-filter: blur(4px);
  user-select: none;
  -webkit-user-select: none;
}

body.edit-mode .thumbnail-drag-handle {
  display: flex;
}

body.edit-mode .thumbnail-drag-handle:active {
  cursor: grabbing;
}

.block-text {
  text-align: center;
  padding: var(--space-md) 0;
}

.block-text p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

.block-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--frame-radius);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.block-video iframe,
.block-video video {
  width: 100%;
  height: 100%;
  border: none;
}

.block-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: start;
}

.block-two-column .col-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text-secondary);
  padding: var(--space-sm) 0;
}

.block-two-column .col-image {
  border-radius: var(--frame-radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.block-two-column .col-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ============================================================
   EDIT MODE
   ============================================================ */
.sync-toggle {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-md) + 56px);
  right: max(var(--space-md), env(safe-area-inset-right, 0px));
  z-index: 99999;
  width: 38px;
  height: 38px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 18px;
  line-height: 1;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast) var(--ease-spring),
    background var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}

.sync-toggle:hover {
  transform: scale(1.1) rotate(20deg);
  background: var(--color-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.sync-toggle.syncing {
  animation: syncSpin 0.8s linear infinite;
  opacity: 0.6;
  pointer-events: none;
}

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

.edit-toggle {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-md));
  right: max(var(--space-md), env(safe-area-inset-right, 0px));
  z-index: 99999;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast) var(--ease-spring),
    background var(--duration-fast) ease;
}

.edit-toggle:hover {
  transform: scale(1.05);
}

.edit-toggle.active {
  background: var(--color-accent);
}

body.editor-enabled .sync-toggle {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.editor-enabled .edit-toggle {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Editable elements in edit mode */
body.edit-mode [data-editable] {
  outline: 2px dashed rgba(0, 68, 255, 0.3);
  outline-offset: 4px;
  cursor: text;
  border-radius: 4px;
  transition: outline-color var(--duration-fast) ease;
}

body.edit-mode [data-editable]:hover {
  outline-color: var(--color-accent);
}

body.edit-mode [data-editable]:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* Drag handle for cards and blocks in edit mode */
body.edit-mode .project-card,
body.edit-mode #contentBlocks > div[data-block-index] {
  cursor: grab;
}

body.edit-mode .project-card.dragging,
body.edit-mode #contentBlocks > div[data-block-index].dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.drag-placeholder {
  border: 2px dashed var(--color-border);
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
}

.drag-placeholder-block {
  border: 2px dashed var(--color-border);
  border-radius: var(--card-radius);
  min-height: 120px;
  background: var(--color-surface);
}

.drag-placeholder-thumb {
  border: 2px dashed var(--color-border);
  border-radius: var(--card-radius);
  min-height: 120px;
  background: var(--color-surface);
}

/* Disable overlays during card drag */
#projectsGrid.is-card-dragging .image-upload-overlay {
  pointer-events: none;
}

/* Image upload overlay */
.image-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  cursor: pointer;
  z-index: 5;
  transition: opacity var(--duration-fast) ease;
}

body.edit-mode .image-upload-overlay {
  display: flex;
}

.image-upload-overlay span {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 24px;
  border-radius: 50px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Delete Element Button */
.delete-element-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(20, 20, 20, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  backdrop-filter: blur(4px);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}

body.edit-mode .delete-element-btn {
  display: flex;
}

.delete-element-btn:hover {
  transform: scale(1.1);
  background: #d93025;
}

.block-drag-handle {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: grab;
  z-index: 20;
  backdrop-filter: blur(4px);
  user-select: none;
  -webkit-user-select: none;
}

body.edit-mode .block-drag-handle {
  display: flex;
}

body.edit-mode .block-drag-handle:active {
  cursor: grabbing;
}

.block-move-controls {
  position: absolute;
  top: 12px;
  left: 52px;
  display: none;
  gap: 8px;
  z-index: 20;
}

body.edit-mode .block-move-controls {
  display: flex;
}

.block-move-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.block-move-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.block-move-btn:not(:disabled):hover {
  transform: scale(1.06);
}

/* Ensure parents of delete buttons establish containing block */
body.edit-mode .block-image-grid,
body.edit-mode .block-text,
body.edit-mode .block-two-image,
body.edit-mode .block-two-column,
body.edit-mode .block-video,
body.edit-mode .block-full-image {
  position: relative;
}

.delete-image-btn {
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  font-size: 18px;
  z-index: 21;
}

/* Edit toolbar */
.edit-toolbar {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-md));
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 99998;
  display: none !important;
  gap: var(--space-xs);
  background: var(--color-notch-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 8px;
  border-radius: var(--notch-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  transition: transform var(--duration-normal) var(--ease-out);
  pointer-events: none;
  opacity: 0;
}

body.editor-enabled .edit-toolbar {
  display: flex !important;
}

body.edit-mode .edit-toolbar {
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
  opacity: 1;
}

.edit-toolbar button {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  color: var(--color-notch-text);
  background: transparent;
  transition: background var(--duration-fast) ease;
}

.edit-toolbar button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.edit-toolbar button.primary {
  background: var(--color-accent);
  color: #FFFFFF;
}

.edit-toolbar button.primary:hover {
  background: #0033CC;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --frame-padding: 10px;
    --frame-radius: 24px;
  }

  body {
    overflow-x: hidden;
  }

  .site-header {
    padding: 16px 20px;
  }

  .site-logo {
    min-height: 34px;
    padding-left: 8px;
    padding-right: 14px;
    margin-right: 0;
  }

  .site-logo-mark {
    height: 20px;
    max-width: 108px;
  }

  .notch-links-shell {
    padding: 3px;
  }

  .notch-links {
    gap: 4px;
  }

  .notch-link {
    font-size: 10px;
    padding: 6px 12px;
  }

  .about-exp-brand {
    width: 20px;
    height: 20px;
    font-size: 8px;
  }

  .about-exp-brand--logo {
    width: 24px;
    height: 24px;
  }

  .hero {
    padding: 30px var(--space-sm) 40px;
  }

  .project-meta {
    gap: var(--space-sm);
    font-size: 12px;
  }

  .block-two-column {
    grid-template-columns: 1fr;
  }

  .block-two-image {
    grid-template-columns: 1fr;
  }

  .block-image-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .block-image-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .content-blocks {
    padding: 0 var(--space-sm) var(--space-xl);
  }

  .about-intro {
    flex-direction: column;
    gap: var(--space-md);
  }

  .about-hero-headline {
    max-width: 100%;
    font-size: clamp(32px, 5vw, 48px);
  }

  .about-two-col {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about-side-projects {
    grid-template-columns: 1fr;
  }

  .about-contact-links {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .about-container {
    padding-top: 30px;
  }

  .site-footer {
    padding-bottom: calc(var(--space-md) + 40px);
  }

  .site-footer-top {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding-top: 68px;
    max-width: none;
  }

  .site-footer-brand {
    min-height: 0;
    justify-content: center;
    order: 2;
  }

  .site-footer-logo-mark {
    width: min(100%, 220px);
  }

  .site-footer-meta {
    align-items: center;
    padding-bottom: 0;
    order: 1;
  }

  .site-footer-link {
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .site-footer-toplink {
    min-width: 190px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 0 0 22px 22px;
    top: -44px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .site-footer.footer-reveal-active .site-footer-toplink {
    transform: translate(-50%, 18px);
  }

  .site-footer-logo-mark {
    width: min(100%, 260px);
  }
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
  padding-top: 0;
}

.about-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px var(--space-md) var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

/* Section label */
.about-section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

/* Divider */
.about-divider {
  border: none;
  border-top: 1px solid rgba(26, 26, 26, 0.12);
}

/* --- Intro --- */
.about-intro {
  display: flex;
  gap: var(--space-2xl);
  align-items: flex-start;
}

.about-intro-full {
  width: 100%;
}

.about-hero-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.about-hero-copy {
  max-width: 1120px;
}

.about-hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-text);
  max-width: none;
}

















.about-intro-left {
  flex: 0 0 40%;
}

.about-bio {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--color-text);
  margin-top: 0;
  max-width: 50rem;
}

.about-bio--intro {
  max-width: 56rem;
  margin-top: var(--space-lg);
}

.about-bio p {
  margin-bottom: var(--space-md);
}

.about-bio p:last-child {
  margin-bottom: 0;
}

.about-philosophy {
  flex: 1;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.4;
  color: var(--color-text);
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-md);
  margin: 0;
  align-self: center;
}

/* --- Experience & Awards --- */
.about-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(36px, 5vw, var(--space-2xl));
  align-items: start;
}

.about-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.about-section-group {
  display: flex;
  flex-direction: column;
}

.about-experience,
.about-awards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.about-exp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
  align-items: start;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.about-exp-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.about-exp-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  text-transform: uppercase;
}

.about-exp-brand--digitas {
  background: #FF6A00;
}

.about-exp-brand--goodstuph {
  background: #E11D48;
}

.about-exp-brand--snackereco {
  background: #4A7B32;
}

.about-exp-brand--meta {
  background: #0A66FF;
}

.about-exp-brand--freelance {
  background: #7A7A7A;
}

.about-exp-brand--default {
  background: #9C9C9C;
}

.about-exp-brand--logo {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.about-exp-brand-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
  transform: scale(var(--brand-logo-scale, 1));
  transform-origin: center;
}

.about-exp-agency {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.about-exp-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.about-exp-role {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-secondary);
  text-align: right;
}

.about-exp-year {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  text-align: right;
}

.about-award-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.about-award-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-award-medal {
  flex: 0 0 auto;
  width: 20px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.about-award-medal svg {
  display: block;
  width: 100%;
  height: 100%;
}

.about-award-medal--gold {
  --medal-ribbon: #9C7B1F;
  --medal-face: #D7B24A;
  --medal-highlight: #F4E7B3;
}

.about-award-medal--silver {
  --medal-ribbon: #8E95A3;
  --medal-face: #C7CCD4;
  --medal-highlight: #F4F6FA;
}

.about-award-medal--bronze {
  --medal-ribbon: #9E5F32;
  --medal-face: #C88753;
  --medal-highlight: #F0CFB0;
}

.medal-ribbon {
  fill: var(--medal-ribbon);
}

.medal-face {
  fill: var(--medal-face);
}

.medal-highlight {
  fill: var(--medal-highlight);
  opacity: 0.68;
}

.about-award-name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

  .about-award-meta {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--color-text-secondary);
  }

  .about-award-medal {
    width: 18px;
    height: 22px;
  }

/* --- Capabilities & Clients --- */
.about-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.about-pill {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  padding: 6px 16px;
  cursor: text;
  transition: background var(--duration-fast) ease;
}

.about-clients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 18px;
  align-items: stretch;
}

.about-client {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  transition: border-color var(--duration-fast) ease,
              background var(--duration-fast) ease;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  text-align: center;
}

.about-client:hover {
  border-color: rgba(17, 17, 17, 0.18);
  background: rgba(255, 255, 255, 0.8);
}

.about-client--logo {
  border-bottom: none;
}

.about-client--logo:hover {
  border-bottom-color: transparent;
}

.about-client-logo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, var(--logo-width, 132px));
  height: var(--logo-height, 30px);
}

.about-client-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.78;
  filter: brightness(0) saturate(100%);
  transition: opacity var(--duration-fast) ease;
}

.about-client--logo:hover .about-client-logo {
  opacity: 1;
}

/* --- Side Projects --- */
.about-side-projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.about-project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  text-decoration: none;
  color: var(--color-text);
  transition: background var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-out);
}

.about-project-card:hover {
  background: var(--color-surface);
  border-color: var(--color-text);
  transform: translateY(-2px);
}

.about-project-card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-project-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 400;
  color: var(--color-text);
}

.about-project-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.about-project-arrow {
  font-size: 20px;
  color: var(--color-text-secondary);
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-spring),
    color var(--duration-fast) ease;
}

.about-project-card:hover .about-project-arrow {
  transform: translate(2px, -2px);
  color: var(--color-text);
}

/* --- Contact --- */
.about-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
}

.about-contact-links {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.about-contact-link {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(20px, 3vw, 32px);
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 4px;
  transition: border-color var(--duration-fast) ease,
    color var(--duration-fast) ease;
}

.about-contact-link:hover {
  border-bottom-color: var(--color-text);
  color: var(--color-accent);
}

.about-footer-note {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: var(--space-md);
}

@media (max-width: 980px) {
  .about-two-col {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    gap: 28px;
  }

  .about-col {
    gap: var(--space-lg);
  }

  .about-clients {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .about-client {
    min-height: 66px;
  }
}

@media (max-width: 900px) {
  .about-exp-row {
    grid-template-columns: minmax(0, 1.15fr) minmax(170px, auto);
  }
}

@media (max-width: 820px) {
  .about-two-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
  }

  .about-col {
    display: contents;
    gap: 0;
  }

  .about-section-group--experience {
    order: 1;
  }

  .about-section-group--recognition {
    order: 2;
  }

  .about-section-group--press {
    order: 3;
  }

  .about-section-group--capabilities {
    order: 4;
  }

  .about-section-group--clients {
    order: 5;
  }
}

@media (max-width: 640px) {
  .about-exp-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .about-exp-branding {
    gap: 12px;
  }

  .about-exp-meta {
    align-items: flex-end;
    padding-left: 0;
  }

  .about-exp-role,
  .about-exp-year {
    text-align: right;
  }

  .about-clients {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .about-client {
    min-height: 64px;
    padding: 10px;
  }

  .about-client-logo-stage {
    width: min(100%, var(--logo-width, 112px));
    height: min(28px, var(--logo-height, 28px));
  }
}

/* ============================================================
   SCROLLED HEADER SHADOW (JS-driven class)
   ============================================================ */
.site-header.scrolled {
  box-shadow: 0 1px 0 var(--color-border);
}



