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

:root {
  --bg: #FBFAF6;
  --ink: #16140E;
  --ink2: #2b271f;
  --muted: #6a6557;
  --faint: #a8a395;
  --line: #1c1a13;
  --line2: #ddd7c7;
  --hoverbg: #16140E;
  --hovertext: #FBFAF6;
  --accent: #5b3d8a;
}

body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 48px 48px;
  transition: background 0.4s, color 0.4s;
}

/* ─── Layout ─── */

.portfolio {
  position: relative;
  width: 100%;
  max-width: 1180px;
  min-height: 768px;
  background: var(--bg);
  color: var(--ink);
  padding: 8px 8px 0;
  display: flex;
  flex-direction: column;
  font-family: 'Spectral', serif;
  transition: background 0.4s, color 0.4s;
}

/* ─── Header bar ─── */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 26px;
  border-bottom: 1px solid #a8a090;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  transition: border-color 0.4s, color 0.4s;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.header-link:hover {
  color: var(--ink);
}

.header-sep {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
}

/* ─── Main grid ─── */

.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  margin-top: 112px;
  flex: 1;
  align-items: start;
}

/* ─── Name / left column ─── */

.name-col {
  display: flex;
  flex-direction: column;
}

.name {
  font-family: 'Spectral', serif;
  font-weight: 300;
  font-size: clamp(64px, 8.8vw, 104px);
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 0;
  color: var(--ink);
  transition: color 0.4s, font-family 0.2s;
}

.mask-wrap {
  display: block;
  overflow: hidden;
}

@keyframes maskrise {
  from { transform: translateY(80%); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

.mask-inner {
  display: block;
  opacity: 0;
}

.mask-inner.revealed {
  animation: maskrise 1200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 30px;
  transition: color 0.4s;
}

/* ─── Bio / right column ─── */

.bio-col {
  display: flex;
  flex-direction: column;
}

.bio {
  font-size: 21px;
  line-height: 1.62;
  margin: 0;
  color: var(--ink2);
  animation: rise 0.8s cubic-bezier(0.2, 0.6, 0, 1) both;
  animation-delay: 0.15s;
  text-wrap: pretty;
  transition: color 0.4s;
}

.bio em {
  font-style: italic;
  color: var(--muted);
}

.work-samples {
  font-style: italic;
  color: #000;
}

.highlight-yellow {
  background-image: linear-gradient(#E9C46A99, #E9C46A99);
  background-repeat: no-repeat;
  background-position: 0 14px;
  background-size: 0% 1.5em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 2px;
  animation: markerIn 0.7s cubic-bezier(0.2, 0.6, 0, 1) both;
  animation-delay: 0.9s;
}

.highlight-green {
  background-image: linear-gradient(#9DBF9EAA, #9DBF9EAA);
  background-repeat: no-repeat;
  background-position: 0 14px;
  background-size: 0% 1.5em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 2px;
  animation: markerIn 0.7s cubic-bezier(0.2, 0.6, 0, 1) both;
  animation-delay: 1.15s;
}

/* ─── Animations ─── */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@keyframes markerIn {
  from { background-size: 0% 1.5em; }
  to   { background-size: 100% 1.5em; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
  body {
    padding: 32px 24px;
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 64px;
  }
}
