/* ============================================================
   LUCAS FARIAS — PORTFOLIO CLONE
   Complete CSS Design System
   ============================================================ */

/* ----- Custom Properties ----- */
:root {
  --ink: #0e0e0e;
  --muted: #ece9e4;
  --accent: #7c6aff;
  --font-sans: 'Rubik', system-ui, -apple-system, sans-serif;
  --radius-card: 12px;
  --dur-hover: 280ms;
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--ink);
  color: var(--muted);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

::selection {
  background: var(--accent);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
ol, ul { list-style: none; }

/* ----- Accessibility ----- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 4px;
  left: 4px;
  z-index: 10000;
  background: var(--accent);
  color: var(--ink);
  padding: 8px 16px;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: translateY(0); }

/* ----- Typography ----- */
.hud-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

/* Type scale matched to reference (lucasfarias.com) */
.text-display-xl { font-size: clamp(4.5rem, 1rem + 19vw, 19rem); line-height: 0.84; }
.text-h2 { font-size: clamp(2rem, 1.2rem + 3.4vw, 4.25rem); line-height: 1; }
.text-h3 { font-size: clamp(2rem, 1.2rem + 3.4vw, 4.25rem); line-height: 1.25; }
.text-lead { font-size: clamp(1.05rem, 0.82rem + 1.05vw, 1.75rem); line-height: 1.3; }
.text-body { font-size: clamp(0.875rem, 0.85rem + 0.12vw, 1rem); line-height: 1.55; }
.text-caption { font-size: clamp(0.8125rem, 0.79rem + 0.16vw, 0.875rem); line-height: 1.45; }

.text-ink { color: var(--ink); }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }

/* ----- Noise Overlay ----- */
.noise {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ----- Dashed Lines ----- */
.dash-v {
  position: fixed;
  top: 56px;
  bottom: 48px;
  width: 1px;
  z-index: 40;
  opacity: 0.2;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--muted) 0, var(--muted) 4px,
    transparent 4px, transparent 12px
  );
}
.dash-v-left { left: 8px; }
.dash-v-right { right: 8px; }

.dash-h {
  height: 1px;
  background-image: repeating-linear-gradient(
    to right,
    currentColor 0, currentColor 4px,
    transparent 4px, transparent 12px
  );
}

@media (max-width: 767px) {
  .dash-v { display: none; }
}

/* ----- Header ----- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  border-bottom: 1px solid rgba(236,233,228,0.15);
  background: var(--ink);
}

.header-inner {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .header-inner { padding: 0 24px; }
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: opacity var(--dur-hover);
}
.logo-link:hover { opacity: 0.75; }
.logo-svg { height: 16px; width: auto; }
.logo-text { white-space: nowrap; }
.logo-text .sub { color: rgba(236,233,228,0.75); }

/* ----- Navigation ----- */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 4px;
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 4px 12px;
  color: rgba(236,233,228,0.8);
  transition: color var(--dur-hover);
}
.nav-link:hover { color: var(--muted); }

.nav-bracket {
  height: 14px;
  width: 5px;
  opacity: 0;
  transition: opacity var(--dur-hover);
  flex-shrink: 0;
}
.nav-link:hover .nav-bracket { opacity: 1; }

.header-right {
  display: flex;
  align-items: center;
}

/* ----- Chamfered Button ----- */
.btn-chamfer {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--accent);
  color: var(--ink);
  border: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: filter var(--dur-hover) var(--ease-soft), transform var(--dur-hover) var(--ease-soft);
}
.btn-chamfer:hover { filter: brightness(1.1); }
.btn-chamfer:active { transform: scale(0.96); }
.btn-chamfer-sm { padding: 6px 12px; }
.btn-chamfer-md { padding: 12px 24px; }

@media (max-width: 767px) {
  .btn-chamfer-header { display: none; }
}

/* ----- Hamburger ----- */
.hamburger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.hamburger-line {
  display: block;
  height: 1px;
  width: 20px;
  background: var(--muted);
}
.hamburger-line:nth-child(2) { background: var(--accent); }

@media (min-width: 768px) {
  .hamburger { display: none; }
}

/* ----- Mobile Menu ----- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0.3s, opacity 0.3s;
}
.mobile-menu.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .mobile-menu { display: none !important; }
}

.mobile-menu-header {
  display: flex;
  height: 70px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--muted);
  position: relative;
}
.close-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 2px;
  margin-left: -12px;
  margin-top: -1px;
}
.close-line:first-child {
  transform: rotate(45deg);
  background: var(--muted);
}
.close-line:last-child {
  transform: rotate(-45deg);
  background: var(--accent);
}

.mobile-menu-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 32px;
}

.mobile-menu-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
}
.mobile-menu-link-num {
  color: var(--accent);
}
.mobile-menu-link-text {
  font-weight: 900;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--dur-hover);
}
.mobile-menu-link:hover .mobile-menu-link-text { color: var(--accent); }

.mobile-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px 40px;
}

/* ----- Bottom HUD Bar ----- */
.hud-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-top: 1px solid rgba(236,233,228,0.15);
  background: var(--ink);
}

.hud-bottom-inner {
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .hud-bottom-inner { padding: 0 24px; }
}

.hud-left { display: flex; gap: 20px; }
.hud-cursor-info { display: none; }
@media (min-width: 1024px) {
  .hud-cursor-info { display: inline; }
}
.hud-section-info { display: none; }
@media (min-width: 640px) {
  .hud-section-info { display: inline; }
}

.hud-right { display: flex; align-items: center; gap: 20px; }

.theme-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: none;
  border: none;
  color: rgba(236,233,228,0.8);
  transition: opacity var(--dur-hover);
}
.theme-btn:hover { opacity: 0.75; }

.theme-label { display: none; }
@media (min-width: 640px) {
  .theme-label { display: inline; }
}

.accent-swatch {
  display: block;
  width: 10px;
  height: 10px;
  background: var(--accent);
}

/* ----- Main Content ----- */
main {
  padding-top: 56px;
  padding-bottom: 128px;
}

/* ----- Hero Section ----- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 104px);
  overflow: clip;
  background: var(--ink);
  padding-bottom: 32px;
  padding-top: 48px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hero-portrait-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  margin: 0 auto;
  width: 100%;
  max-width: 1700px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .hero-content { padding: 0 40px; }
}

.hero-top { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; }

.hero-subtitle {
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-size: clamp(16px, 4.6vw, 24px);
}

.hero-bottom { pointer-events: auto; }

.hero-name {
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
}

.hero-name-line {
  display: block;
  white-space: nowrap;
}

.hero-firstname {
  font-size: clamp(2.3rem, 0.5rem + 10.3vw, 10.3rem);
  color: var(--muted);
  letter-spacing: -0.01em;
  line-height: 0.86;
  font-weight: 320;
}

.hero-lastname {
  font-size: clamp(3.5rem, 0.8rem + 14.8vw, 14.8rem);
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 0.84;
  font-weight: 900;
}

.hero-char {
  display: inline-block;
  will-change: font-variation-settings;
  transition: font-variation-settings 0.3s ease;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 24px;
}

.hero-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(236,233,228,0.8);
}

.hero-tag-dot {
  display: block;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

/* ----- Scroll Cue ----- */
.scroll-cue {
  position: absolute;
  bottom: 32px;
  right: 24px;
  z-index: 10;
}
@media (min-width: 768px) {
  .scroll-cue { right: 40px; }
}
@media (max-width: 767px) {
  .scroll-cue { display: none; }
}

.blink { animation: blink 1.2s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ----- Companies Strip ----- */
.companies-strip {
  overflow: hidden;
  background: var(--muted);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
  padding-top: clamp(1.5rem, 3.5vw, 2.75rem);
}

.companies-title {
  text-align: center;
  font-weight: 300;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(14,14,14,0.7);
  padding: 0 24px;
}

.marquee-wrap {
  overflow: hidden;
  margin-top: clamp(1.5rem, 3.5vw, 3rem);
}

.marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: marquee var(--marquee-duration, 40s) linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

.marquee-item {
  display: flex;
  align-items: center;
}

.marquee-logo {
  height: clamp(30px, 3.5vw + 18px, 55px);
  width: auto;
  opacity: 0.82;
}

.marquee-diamond {
  display: inline-block;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: rgba(14,14,14,0.3);
  margin: 0 clamp(1.6rem, 4vw, 3.25rem);
  flex-shrink: 0;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ----- Section Header with Marquee ----- */
.section-bar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-num { flex-shrink: 0; }
.section-count { flex-shrink: 0; color: rgba(236,233,228,0.75); }
.section-dash { width: 100%; min-width: 0; flex: 1; opacity: 0.4; color: rgba(236,233,228,0.45); }

.section-marquee-wrap {
  margin-left: calc(50% - 50vw);
  width: 100vw;
  overflow: hidden;
  margin-top: 16px;
}

.section-marquee {
  display: flex;
  width: max-content;
  align-items: center;
  white-space: nowrap;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.01em;
  will-change: transform;
}

@keyframes section-marquee-roll {
  to { transform: translateX(-12.5%); }
}

.section-marquee .stroke {
  margin-right: 0.18em;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}

.section-marquee .fill {
  margin-right: 0.18em;
  color: var(--accent);
}

/* Compact marquee used only for the pinned work deck header, so the
   headline and the fixed-size cards fit on screen together when pinned.
   This one auto-scrolls continuously (decoupled from page scroll) because it
   stays pinned; -12.5% == one of the 8 identical copies, so the loop is
   seamless. Duration is set from one copy's width in animations.js. */
.section-marquee-compact {
  font-size: clamp(2.5rem, 7.5vw, 6rem);
  line-height: 0.84;
  animation: section-marquee-roll 20s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .section-marquee-compact { animation: none; }
}

/* ----- Section Wrapper ----- */
.section-wrap {
  max-width: 1700px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 24px;
}

@media (min-width: 768px) {
  .section-wrap { padding-left: 40px; padding-right: 40px; }
}

/* ----- Work Section ----- */
.work-section { position: relative; background: var(--ink); }

.work-top-bar {
  max-width: 1700px;
  margin: 0 auto;
  padding: 24px 24px 0;
}
@media (min-width: 768px) {
  .work-top-bar { padding: 24px 40px 0; }
}

.work-deck { position: relative; }

.work-deck-track {
  position: relative;
  /* Scroll distance was tuned for 4 cards (195vh scrollable = ~49vh/card).
     3 cards now, so scaled proportionally to keep the same pace per card. */
  height: 246svh;
}

.work-deck-sticky {
  position: sticky;
  top: 56px;
  height: calc(100vh - 64px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Breathing room between the big headline and the cards below it. */
  gap: clamp(20px, 3.5vh, 44px);
}

.work-deck-header {
  max-width: 1700px;
  margin: 0 auto;
  padding: 8px 24px;
  width: 100%;
}
@media (min-width: 768px) {
  .work-deck-header { padding: 8px 40px; }
}

.work-cards-container {
  position: relative;
  flex: 1;
}

.work-card-slot {
  position: absolute;
  inset: 0;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-card-slot[data-state="below"] {
  transform: translateY(105%);
}
.work-card-slot[data-state="active"] {
  transform: translateY(0);
}
.work-card-slot[data-state="above"] {
  transform: translateY(-8%) scale(0.96);
  opacity: 0.4;
}

/* ----- Work Card ----- */
.work-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
  background: var(--ink);
  border-radius: var(--radius-card);
  border: 1px solid rgba(236,233,228,0.15);
  overflow: hidden;
  color: inherit;
  transition: border-color var(--dur-hover);
}
.work-card:hover { border-color: var(--accent); }

@media (max-width: 767px) {
  .work-card {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
}

/* Card sizing matched to reference: centered, max 1620x560, 42/58 split */
@media (min-width: 768px) {
  /* Size the card area to the fixed card height so the pinned block
     (compact headline + cards) stays vertically centered with balanced
     spacing instead of pooling empty space below the card on tall screens. */
  .work-cards-container {
    flex: none;
    height: calc(min(65vh, 560px) + clamp(12px, 2.5vh, 28px));
  }
  .work-card-slot {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(12px, 2.5vh, 28px);
  }
  .work-card {
    width: min(100vw - 80px, 1620px);
    height: min(65vh, 560px);
    grid-template-columns: 42% 58%;
  }
}

.work-card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 3vw, 40px);
}

.work-card-top {}

.work-card-company {
  color: rgba(236,233,228,0.75);
}

.work-card-sep {
  display: inline-block;
  width: 1px;
  height: 10px;
  background: rgba(236,233,228,0.3);
  margin: 0 10px;
  vertical-align: middle;
}

.work-card-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  color: var(--muted);
  margin-top: 8px;
}

.work-card-desc {
  font-weight: 300;
  color: rgba(236,233,228,0.65);
  margin-top: 12px;
  max-width: 38ch;
  line-height: 1.5;
}

.work-card-bottom { margin-top: auto; padding-top: 24px; }

.work-card-metrics {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  flex-wrap: wrap;
}

.work-metric {}
.work-metric-val { font-size: clamp(1.6rem, 1rem + 1.6vw, 2.75rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1; color: var(--accent); }
.work-metric-lbl { color: rgba(236,233,228,0.6); margin-top: 4px; }

.work-card-visual { position: relative; overflow: hidden; }
.work-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Card hover: visual scales up + dims slightly (matches reference .fw-cinema-img) */
.work-card-visual svg,
.work-card-visual .work-card-img {
  transition: transform 0.5s var(--ease-soft), filter 0.5s var(--ease-soft);
  transform-origin: center;
}
.work-card:hover .work-card-visual svg,
.work-card:hover .work-card-visual .work-card-img {
  transform: scale(1.05);
  filter: brightness(0.95);
}

.cinema-frame { position: relative; height: 100%; }
.cinema-corners { position: absolute; inset: 0; pointer-events: none; }
.cinema-corners::before,
.cinema-corners::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
}
.cinema-corners::before {
  top: 12px;
  left: 12px;
  border-top: 1px solid rgba(236,233,228,0.3);
  border-left: 1px solid rgba(236,233,228,0.3);
}
.cinema-corners::after {
  bottom: 12px;
  right: 12px;
  border-bottom: 1px solid rgba(236,233,228,0.3);
  border-right: 1px solid rgba(236,233,228,0.3);
}

/* ----- Work Progress Ticks ----- */
.work-progress {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}
@media (max-width: 767px) {
  .work-progress { right: 12px; }
}

.work-tick {
  display: block;
  width: 2px;
  height: 32px;
  background: rgba(236,233,228,0.3);
  transition: background-color 0.3s;
}
.work-tick.active { background: var(--accent); }

/* ----- Log List (Articles / Lab) ----- */
.log-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: clamp(1.5rem, 3vw, 3rem);
}

.log-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid rgba(236,233,228,0.2);
  transition: border-color var(--dur-hover) var(--ease-soft);
  transform: translateZ(0);
}
.log-item:hover { border-color: rgba(195,255,252,0.5); }

.log-item-fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  border-radius: inherit;
  transition: transform var(--dur-hover) var(--ease-soft);
}
.log-item:hover .log-item-fill { transform: scaleX(1); }

.log-item-content {
  position: relative;
  z-index: 10;
  display: grid;
  align-items: start;
  gap: 8px;
  padding: 20px;
  transition: color var(--dur-hover);
}
@media (min-width: 768px) {
  .log-item-content {
    grid-template-columns: 8rem 1fr auto;
    gap: 32px;
    padding: 32px;
  }
}

.log-meta { display: flex; flex-direction: column; gap: 4px; }
.log-meta-num { color: var(--accent); }
.log-meta-sub { color: rgba(236,233,228,0.75); }

.log-item:hover .log-meta-num { color: var(--ink); }
.log-item:hover .log-meta-sub { color: rgba(14,14,14,0.6); }

.log-title {
  font-weight: 900;
  line-height: 1.2;
  max-width: 34ch;
  transition: color var(--dur-hover) var(--ease-soft);
}
.log-item:hover .log-title { color: var(--ink); }

.log-desc {
  font-weight: 300;
  line-height: 1.5;
  color: rgba(236,233,228,0.65);
  margin-top: 8px;
  max-width: 44ch;
  transition: color var(--dur-hover) var(--ease-soft);
}
.log-item:hover .log-desc { color: rgba(14,14,14,0.7); }

.log-action {
  color: rgba(236,233,228,0.8);
  justify-self: start;
  transition: color var(--dur-hover) var(--ease-soft);
}
@media (min-width: 768px) {
  .log-action { justify-self: end; }
}
.log-item:hover .log-action { color: var(--ink); }

/* ----- Coming Soon Items ----- */
.log-coming-soon {
  display: grid;
  align-items: baseline;
  gap: 8px;
  border-radius: var(--radius-card);
  border: 1px dashed rgba(236,233,228,0.15);
  padding: 20px;
}
@media (min-width: 768px) {
  .log-coming-soon {
    grid-template-columns: auto 1fr auto;
    gap: 32px;
    padding: 32px;
  }
}
.coming-soon-num { color: rgba(236,233,228,0.4); }
.coming-soon-title {
  font-weight: 900;
  line-height: 1.2;
  color: rgba(236,233,228,0.45);
  max-width: 46ch;
}
.coming-soon-badge { color: rgba(236,233,228,0.4); }
@media (min-width: 768px) {
  .coming-soon-badge { justify-self: end; }
}

/* ----- All Code Link ----- */
.all-code-link {
  display: grid;
  align-items: baseline;
  gap: 8px;
  border-radius: var(--radius-card);
  border: 1px dashed rgba(236,233,228,0.25);
  padding: 20px;
  transition: border-color var(--dur-hover) var(--ease-soft);
}
@media (min-width: 768px) {
  .all-code-link {
    grid-template-columns: 1fr auto;
    gap: 32px;
    padding: 32px;
  }
}
.all-code-link:hover { border-color: rgba(195,255,252,0.5); }
.all-code-link-text { color: rgba(236,233,228,0.8); transition: color var(--dur-hover); }
.all-code-link:hover .all-code-link-text { color: var(--accent); }

/* ----- About Section ----- */
.about-grid {
  display: grid;
  gap: 48px;
  margin-top: clamp(2rem, 4vw, 4rem);
}
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 64px;
  }
}

.about-portrait-wrap {
  overflow: hidden;
  border-radius: var(--radius-card);
}

.about-portrait {
  position: relative;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, rgba(195,255,252,0.12) 0%, rgba(14,14,14,0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-portrait-halftone {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.2);
  mix-blend-mode: luminosity;
  opacity: 0.7;
}

.about-portrait-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(195,255,252,0.15), transparent 50%);
  mix-blend-mode: screen;
}

.about-portrait-caption {
  margin-top: 12px;
  text-align: right;
  color: rgba(236,233,228,0.75);
}

.about-quote {
  margin-top: clamp(2rem, 4vw, 3rem);
  max-width: 32ch;
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
}

.about-meta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.about-meta-item { color: rgba(236,233,228,0.8); }
.about-meta-val { color: var(--muted); }

/* ----- Timeline ----- */
.timeline-label {
  margin-bottom: 8px;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 24px 0;
  border-bottom: 1px dashed rgba(236,233,228,0.25);
}
.timeline-item:first-child { border-top: 1px dashed rgba(236,233,228,0.25); }

.timeline-company {
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-role {
  font-weight: 300;
  font-style: italic;
  color: rgba(236,233,228,0.8);
}

.timeline-year { color: var(--accent); }

/* ----- Core Foundations Grid ----- */
.foundations-label { margin-bottom: 24px; }

.foundations-grid {
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .foundations-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .foundations-grid { grid-template-columns: repeat(4, 1fr); }
}

.foundation-card {
  border-radius: var(--radius-card);
  border: 1px solid rgba(236,233,228,0.2);
  padding: 24px;
  transition: border-color var(--dur-hover);
}
.foundation-card:hover { border-color: rgba(195,255,252,0.45); }

.foundation-num { color: var(--accent); }
.foundation-title {
  margin-top: 12px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.2;
}
.foundation-desc {
  margin-top: 8px;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(236,233,228,0.75);
}

/* ----- Competencies ----- */
.competency-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px dashed rgba(236,233,228,0.25);
}
.competency-item:first-child { border-top: 1px dashed rgba(236,233,228,0.25); }

.competency-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--accent);
}

.competency-title {
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.2;
}

/* ----- Toolkit Grid ----- */
.toolkit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}
@media (min-width: 1024px) {
  .toolkit-grid { grid-template-columns: repeat(4, 1fr); }
}

.toolkit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(236,233,228,0.2);
  padding: 40px 24px;
  text-align: center;
  transition: border-color var(--dur-hover);
}
.toolkit-card:hover { border-color: rgba(195,255,252,0.45); }

.toolkit-icon { width: 28px; height: 28px; }
.toolkit-name { font-weight: 900; text-transform: uppercase; }
.toolkit-role { margin-top: 6px; color: rgba(236,233,228,0.55); }

/* ----- Contact Section ----- */
.contact-section {
  background: var(--ink);
}

.contact-heading {
  font-size: clamp(3rem, 1rem + 10vw, 10rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.9;
}

.contact-heading .stroke {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}
.contact-heading .fill {
  color: var(--accent);
}

.contact-links {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-email-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(236,233,228,0.8);
  transition: color var(--dur-hover);
  margin-top: 16px;
}
.contact-email-link:hover { color: var(--accent); }

/* ----- Reveal Animation (Scroll) ----- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft);
}

/* ----- Hero Page Load Animation ----- */
@keyframes heroLoad {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
.hero-anim {
  opacity: 0;
  animation: heroLoad 0.9s var(--ease-soft) forwards;
}
.hero-anim-1 { animation-delay: 0.1s; }
.hero-anim-2 { animation-delay: 0.2s; }
.hero-anim-3 { animation-delay: 0.3s; }
.hero-anim-4 { animation-delay: 0.45s; }
.hero-anim-5 { animation-delay: 0.6s; }

/* ----- Spacing helpers ----- */
.mt-section { margin-top: clamp(3.5rem, 7vw, 6rem); }
.mt-sub { margin-top: clamp(2rem, 4vw, 3rem); }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-7 { margin-top: 28px; }

/* ----- Work Card Visual Placeholder Colors ----- */
.work-visual-1 { background: linear-gradient(135deg, #1a3a2a, #0d1f15); }
.work-visual-2 { background: linear-gradient(135deg, #0a2a4a, #051525); }
.work-visual-3 { background: linear-gradient(135deg, #060a14, #1a1030); }

/* ----- Lenis smooth scroll ----- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-anim { animation: none !important; opacity: 1 !important; transform: none !important; }
  .blink { animation: none !important; }
}
