/* ============================================
   RESET & BASE
==================================================  */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================
   DESIGN TOKENS
==================================================  */
:root {
  --content-max-width: 1360px;
  --side-padding: clamp(20px, 6vw, 80px);

  --bg: #ece5da;
  --bg-raised: #f4efe7;
  --accent: #BF092F;
  --accent-dark: #96072a;

  --text-dark: #21201c;
  --text-body: #57534e;
  --text-faint: #8f897b;
  --text-label: #716b5e;
  --border: #ddd2c1;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 100px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(33, 32, 28, 0.06);
  --shadow-md: 0 12px 32px rgba(33, 32, 28, 0.12);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;
  --font-sans: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;

  --koi-orange: #d65216;
  --pond: #21201c;
  --pond-soft: #2c2a25;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  cursor: none;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.5;
  /* subtle dot-grid texture so empty space reads as intentional, not blank */
  background-image: radial-gradient(rgba(33, 32, 28, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

a, button {
  cursor: none;
}

/* ============================================
   NAVIGATION
==================================================  */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(236, 229, 218, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  animation: nav-line-flash 0.6s var(--ease) forwards;
}

@keyframes nav-line-flash {
  0% {
    border-bottom-color: transparent;
    box-shadow: none;
  }
  30% {
    border-bottom-color: #fff;
    box-shadow: 0 1px 16px rgba(255, 255, 255, 0.9);
  }
  100% {
    border-bottom-color: #fff;
    box-shadow: none;
  }
}

.nav-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--side-padding);
}

.nav-logo {
  justify-self: start;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  text-decoration: none;
}

.nav-logo::after {
  content: '.';
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  justify-self: center;
}

.nav-link {
  text-decoration: none;
  position: relative;
  font-size: 14px;
  color: var(--text-faint);
  background: linear-gradient(var(--accent), var(--accent)) no-repeat right bottom;
  background-size: 0% 2px;
  transition: background-size 0.35s var(--ease), color 0.35s var(--ease);
}

.nav-link:hover {
  color: var(--text-dark);
  background-position: left bottom;
  background-size: 100% 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  padding: 0;
  z-index: 10001;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-dark);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* animates the three lines into an X when open */
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.btn {
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  transition: all 0.3s var(--ease);
}

.btn-secondary {
  color: var(--text-body);
  border: 1px solid var(--border);
  background: transparent;
}

.btn-secondary:hover {
  border-color: var(--text-dark);
  color: var(--text-dark);
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 4px 14px rgba(191, 9, 47, 0.25);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 6px 18px rgba(191, 9, 47, 0.35);
  transform: translateY(-1px);
}

/* ============================================
   SECTION LAYOUT
==================================================  */
section {
  position: relative;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--side-padding);
}

/* position: relative is required now that the fish canvas is
   position: fixed — without it the fish paint on top of the footer */
footer {
  position: relative;
  max-width: 100%;
  padding: 0;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-label);
  margin-bottom: var(--space-sm);
}

.work-heading, .about-heading, #skills h2,
.tabs {
  position: relative;
  z-index: 1;
}

/* sections fade in from below the first time they scroll into view
   (toggled by the IntersectionObserver in Scripts.js) */
.fade-in-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   HERO
==================================================  */
#hero {
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
  width: 100%;
}

#hero h1 {
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
  color: var(--text-dark);
}

#hero-name {
  will-change: transform;
}

.name-accent {
  font-style: italic;
  color: var(--accent);
}

.role-line {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: none;
}

.role-label {
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--text-label);
}

.role-text {
  font-size: clamp(17px, 3vw, 27px);
  color: var(--text-dark);
}

.role-cursor {
  width: 3px;
  height: 26px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

.role-value-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px; /* tight gap so the cursor sits right beside the last letter */
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.hero-desc {
  line-height: 1.7;
  color: var(--text-body);
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.scroll-line-track {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  transform-origin: top;
  animation: breathe 2.5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    opacity: 0.25;
    transform: scaleY(0.85);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.scroll-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-label);
}

/* ============================================
   FISH BACKGROUND
==================================================  */
#boids-canvas {
  transition: opacity 0.6s var(--ease);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* fish dim once you scroll past the hero (class toggled in Scripts.js) */
body.past-hero #boids-canvas {
  opacity: 0.3;
}

/* soft beige halo behind text so it stays readable over the fish */
.section-eyebrow,
.work-heading,
.about-heading,
#skills h2,
.tab-btn {
  text-shadow: 0 0 10px var(--bg), 0 0 4px var(--bg);
}

/* the footer is dark, so a beige halo would look wrong there */
#contact .section-eyebrow {
  text-shadow: none;
}

/* ============================================
   SELECTED WORK
==================================================  */
.work-heading {
  letter-spacing: -0.01em;
}

.tabs {
  display: flex;
  gap: var(--space-lg);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.tab-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: none;
  background: none;
  padding: 0 0 var(--space-sm) 0;
  position: relative;
  transition: color 0.3s var(--ease);
}

.tab-btn:hover {
  color: var(--text-dark);
}

.tab-btn.active {
  color: var(--accent);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

/* fixed 3-column grid: cards stay the same size even when a tab has only 1 or 2 projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .project-grid { grid-template-columns: minmax(0, 1fr); }
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-raised);
}

.project-card:hover {
  border-color: transparent;
}

.project-card.hidden {
  display: none;
}

.project-image-wrap {
  overflow: hidden;
}

.project-image-wrap img {
  width: 100%;
  object-fit: cover;
  display: block;
}

.project-card:hover .project-image-wrap img {
  transform: scale(1.06);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.project-title {
  font-family: var(--font-serif);
  color: var(--text-dark);
  transition: color 0.3s var(--ease);
}

.project-card:hover .project-title {
  color: var(--accent);
}

.project-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 var(--space-sm);
  transition: color 0.3s var(--ease);
}

.project-card:hover .project-link {
  color: var(--accent);
}

/* ============================================
   PROJECT MODAL
==================================================  */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(33, 32, 28, 0.7);
  backdrop-filter: blur(8px);
  z-index: 99999;
}

.modal.open {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.modal-content {
  background: var(--bg);
  width: 90%;
  max-width: 920px;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.modal-close {
  position: relative;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 0;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

/* the two bars that form the X */
.modal-close::before,
.modal-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  margin: -1px 0 0 -8px;
  background: var(--accent);
  transition: background 0.3s var(--ease);
}

.modal-close::before { transform: rotate(45deg); }
.modal-close::after  { transform: rotate(-45deg); }

.modal-close:hover {
  transform: rotate(90deg);
  background: var(--accent);
  border-color: var(--accent);
}

.modal-close:hover::before,
.modal-close:hover::after {
  background: #fff;
}

.modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* the X draws itself in each time the modal opens */
@keyframes x-draw-a {
  from { transform: rotate(45deg) scaleX(0); }
  to   { transform: rotate(45deg) scaleX(1); }
}
@keyframes x-draw-b {
  from { transform: rotate(-45deg) scaleX(0); }
  to   { transform: rotate(-45deg) scaleX(1); }
}

.modal.open .modal-close::before { animation: x-draw-a 0.4s var(--ease) 0.15s both; }
.modal.open .modal-close::after  { animation: x-draw-b 0.4s var(--ease) 0.3s both; }

.modal-scroll {
  overflow-y: auto;
  padding: var(--space-lg);
}

.modal-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: auto;
  align-items: center;
  gap: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  background: var(--bg-raised);
}

.modal-cta {
  white-space: nowrap;
  text-align: center;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-xs);
}

.meta-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dark);
}

.meta-value.accent {
  color: var(--accent);
}

/* section headings: the top level inside a case study */
.modal-section-label {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text-dark);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  margin-bottom: var(--space-sm);
}

.modal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.modal-images img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: var(--space-sm);
}

.modal-cover {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-lg);
}

.modal-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: var(--space-lg);
  max-width: none;
}

/* extra case-study blocks */
.modal-images { margin-bottom: var(--space-lg); }

.modal-images.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.modal-images.two-up img { margin-bottom: 0; }

.modal-video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.modal-video iframe,
.modal-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 768px) {
  .modal-images.two-up { grid-template-columns: 1fr; }
}

/* ---- Case-study blocks: lead, grid of points, figures, image slots ---- */
.modal-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.4;
  color: var(--text-dark);
  border-left: 3px solid var(--accent);
  padding-left: var(--space-md);
  margin-bottom: var(--space-md);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.modal-grid-item {
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
}

.modal-grid-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.modal-grid-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: var(--space-xs);
}

.modal-grid-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-body);
}

.modal-figure {
  margin-bottom: var(--space-lg);
}

.modal-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* captions: quiet, sentence case, clearly below the section headings */
.modal-figure figcaption {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-faint);
  margin-top: var(--space-xs);
}

.modal-figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

/* dashed placeholder: swap for an <img> when you have the image */
.image-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  padding: var(--space-md);
  text-align: center;
  border: 1px dashed var(--text-faint);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
}

.image-slot span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

@media (max-width: 768px) {
  .modal-grid,
  .modal-figure-row {
    grid-template-columns: 1fr;
  }
}

.modal-figure-row.three-up {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .modal-figure-row.three-up {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================
   ABOUT
==================================================  */

.about-heading {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
  color: var(--text-dark);
  margin-bottom: var(--space-md);
}

/* ============================================
   SKILLS
==================================================  */
#skills h2 {
  font-family: var(--font-serif);
  font-size: clamp(38px, 6vw, 60px);
  letter-spacing: -0.01em;
  color: var(--text-dark);
  margin-bottom: var(--space-xl);
}

.skill-tag {
  font-size: 13px;
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dark);
  background: var(--bg-raised);
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   CONTACT / FOOTER
   Padding lives on .footer-inner (not on #contact)
   so the content centers with the same max-width +
   margin:auto + padding pattern as every other section.
==================================================  */
#contact {
  background: var(--text-dark);
}

#contact .section-eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--side-padding) var(--space-xl);
}

.footer-heading {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: var(--space-md);
}

.footer-email {
  display: inline-block;
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-sm);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   FOOTER — the deep end of the pond
   (wave edge, bigger email, copy button, links)
==================================================  */

@keyframes sway {
  from { transform: translateX(-30px); }
  to   { transform: translateX(30px); }
}

@media (max-width: 560px) {
  .footer-links { gap: var(--space-md); }
}

@media (prefers-reduced-motion: reduce) {
  .footer-wave path { animation: none; }
}

/* ============================================
   CUSTOM CURSOR
==================================================  */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 100001;
}

.cursor-dot.hover {
  opacity: 0;
  transition: opacity 0.2s;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.cursor-ring span {
  opacity: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dark);
  transition: opacity 0.2s;
}

.cursor-ring.hover {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-color: var(--accent);
}

.cursor-ring.hover span {
  opacity: 1;
  color: #fff;
}

/* ============================================
   SCROLLBAR
==================================================  */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 0;
}

::-webkit-scrollbar-button {
  display: none;
}

/* ============================================
   RESPONSIVE
==================================================  */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--space-lg) var(--side-padding);
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links .btn {
    text-align: center;
  }

  /* tabs wrap onto a second line instead of overflowing the screen */
  .tabs {
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
  }

  /* modal meta strip: two columns, project button gets its own full-width row */
  .modal-meta {
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: row;
  }

  .modal-cta {
    grid-column: 1 / -1;
  }

  .modal-scroll {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .role-label {
    font-size: 12px;
  }
}

/* ==========================================================
   PART 2 — layered on top of the base styles above: type and
   refinements, hero, work cards, about bento, skills, footer,
   responsive rules and the password gate. Where a selector
   appears in both parts, this part wins.
========================================================== */

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

/* Fraunces looks best slightly tighter, with optical sizing on */
#hero h1,
.work-heading, .about-heading, #skills h2, .footer-heading,
.project-title, .modal-title, .modal-section-label {
  font-variation-settings: 'opsz' 144;
  letter-spacing: -0.012em;
}
.project-title { letter-spacing: 0; font-variation-settings: 'opsz' 36; }

.btn { font-family: var(--font-mono); letter-spacing: 0.04em; }

/* keyboard users get a clear, on-brand focus ring */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================
   HERO
========================================================== */
#hero {
  min-height: 100svh;
  padding: 96px 0 116px;
}

#ripple-canvas {
  filter: blur(0.6px); /* softens the simulation grid into smooth water */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#hero h1 {
  font-size: clamp(56px, 9.4vw, 140px);
  line-height: 0.92;
  font-weight: 600;
}

.name-accent { font-weight: 500; }

.role-line { margin-top: var(--space-md); }
.role-label { font-family: var(--font-mono); }
.role-text { font-family: var(--font-mono); font-weight: 400; letter-spacing: -0.01em; }

.hero-pitch {
  margin-top: var(--space-md);
  max-width: 620px;
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 72;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text-dark);
  text-shadow: 0 0 14px var(--bg), 0 0 6px var(--bg);
}
.hero-pitch em { font-style: italic; color: var(--accent); }

.hero-desc {
  max-width: 520px;
  margin-top: var(--space-sm);
  font-size: 17px;
  text-shadow: 0 0 12px var(--bg), 0 0 4px var(--bg);
}

/* bottom strip: where he is now + the pond hint */
.hero-foot {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: var(--space-lg);
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
  pointer-events: none;
}

.hero-current {
  font-size: 14px;
  color: var(--text-body);
  text-shadow: 0 0 10px var(--bg);
}
.hero-current strong { color: var(--text-dark); font-weight: 600; }
.hero-current-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-right: 8px;
}

.koi-icon {
  width: 22px;
  height: 11px;
  color: var(--koi-orange);
  flex: none;
}

/* the scroll cue moves to the middle of the foot strip */
.scroll-indicator { bottom: var(--space-lg); }

/* ==========================================================
   SHARED SECTION HEAD
========================================================== */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: end;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.work-heading {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 1;
  color: var(--text-dark);
  margin-bottom: 0;
  text-shadow: 0 0 10px var(--bg), 0 0 4px var(--bg);
}

/* ==========================================================
   WORK
========================================================== */
.tab-btn .tab-count {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  color: var(--text-faint);
  vertical-align: super;
}
.tab-btn.active .tab-count { color: var(--accent); }

.project-card {
  display: flex;
  flex-direction: column;
  padding-bottom: var(--space-md);
  transition: transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease-out), border-color 0.4s var(--ease);
}

.project-card:hover {
  transform: translateY(-10px) rotate(-0.4deg);
  box-shadow: 0 24px 48px -18px rgba(33, 32, 28, 0.35);
}

/* cards rise in one after another when the tab changes */
.project-card:not(.hidden) {
  animation: card-in 0.6s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 80ms);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.project-image-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(214, 82, 22, 0.18), transparent 60%),
    linear-gradient(160deg, #2c2a25, #191815);
}
.project-image-wrap img {
  height: 100%;
  transition: transform 0.8s var(--ease-out);
}

/* when an image is missing, show a calm pond tile instead of a broken icon */
.project-image-wrap.img-missing img { display: none; }
.project-image-wrap.img-missing::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Cpath d='M3 12c6-8 19-10 29-4l10-6-3 10 3 10-10-6C22 22 9 20 3 12z' fill='%23d65216'/%3E%3C/svg%3E") center / 72px no-repeat;
  opacity: 0.85;
}

/* "View case study" chip slides up over the image on hover */
.project-image-wrap::before {
  content: 'View case study →';
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(244, 239, 231, 0.95);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dark);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease-out);
}
.project-card[data-category="video"] .project-image-wrap::before { content: 'Watch videos →'; }
.project-card:hover .project-image-wrap::before { opacity: 1; transform: none; }

.project-meta { margin: var(--space-md) var(--space-md) var(--space-xs); font-family: var(--font-mono); }
.project-title {
  margin: 0 var(--space-md);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.15;
}

.project-desc {
  margin: 10px var(--space-md) 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-body);
}

/* the old text link is replaced by the hover chip */
.project-link { display: none; }

/* ==========================================================
   ABOUT (styles for the intro / details layout)
========================================================== */

.about-heading {
  font-weight: 600;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 1;
}

/* ==========================================================
   SKILLS — four groups as cards
========================================================== */
#skills h2 { font-weight: 600; }

#skills {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

#skills > h2 { margin-bottom: var(--space-sm); }

.skill-tag { font-family: var(--font-mono); transition: transform 0.3s var(--ease-out), background 0.3s, color 0.3s, border-color 0.3s; }
.skill-tag:hover { transform: translateY(-2px); }

/* ==========================================================
   FOOTER — the deep end of the pond
========================================================== */
#contact { overflow: hidden; }

.footer-wave {
  display: block;
  width: 100%;
  height: 80px;
  margin-bottom: -1px;
  background: var(--bg);
}
.footer-wave .wave-a { fill: #3a3731; animation: sway 9s ease-in-out infinite alternate; }
.footer-wave .wave-b { fill: var(--pond); animation: sway 7s ease-in-out infinite alternate-reverse; }
@keyframes sway {
  from { transform: translateX(-30px); }
  to   { transform: translateX(30px); }
}

.footer-heading {
  font-weight: 600;
  font-size: clamp(44px, 8vw, 112px);
  line-height: 1;
}
.footer-heading em { font-style: italic; font-weight: 500; color: #f08a4b; }

.footer-sub {
  max-width: 560px;
  margin: var(--space-md) 0 var(--space-lg);
  font-size: 17px;
  line-height: 1.7;
  color: rgba(244, 239, 231, 0.7);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.footer-email {
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 72;
  font-size: clamp(22px, 3vw, 36px);
  letter-spacing: -0.01em;
  color: #f4efe7;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(244, 239, 231, 0.25);
  padding-bottom: 4px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.footer-email:hover { color: #f08a4b; border-color: #f08a4b; }

.copy-email {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 231, 0.3);
  background: transparent;
  color: #f4efe7;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.copy-email:hover { background: #f4efe7; color: var(--pond); border-color: #f4efe7; }
.copy-email.copied { background: #2f9e5b; border-color: #2f9e5b; color: #fff; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: var(--space-xl) 0 var(--space-lg);
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 239, 231, 0.75);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.footer-links a:hover { color: #f08a4b; }

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 231, 0.6);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.back-to-top:hover { color: #f4efe7; }
.koi-up { transform: rotate(90deg); transition: transform 0.4s var(--ease-out); }
.back-to-top:hover .koi-up { transform: rotate(90deg) translateX(-4px); }

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: var(--space-sm); }

  #skills { grid-template-columns: 1fr; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .scroll-indicator { display: none; }
}

@media (max-width: 768px) {
  #hero { padding: 110px 0 140px; }
}

@media (max-width: 560px) {
  .footer-links { gap: var(--space-md); }
}

/* touch screens: real cursor back, custom one hidden */
@media (hover: none) {
  body, a, button { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* people who prefer less motion get a still pond */
@media (prefers-reduced-motion: reduce) {
  .footer-wave path { animation: none; }
  .project-card:not(.hidden) { animation: none; }
}

/* cursor: a softer, smaller swell over links and buttons */
.cursor-ring.link-hover:not(.hover) {
  width: 52px;
  height: 52px;
  background: rgba(191, 9, 47, 0.08);
}

/* ==========================================================
   ABOUT — bento layout
   intro (big) | quote (dark pond) / numbers
   journey timeline           | offline interests
========================================================== */
#about .about-heading { margin-bottom: var(--space-lg); position: relative; z-index: 1; }

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}

.bento-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 40px);
  transition: transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease-out), border-color 0.4s var(--ease);
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -26px rgba(33, 32, 28, 0.4);
}

/* cards surface one after another when the section appears */
#about .bento-card { opacity: 0; transform: translateY(26px); }
#about.visible .bento-card {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), box-shadow 0.55s var(--ease-out);
  transition-delay: calc(var(--i) * 110ms + 120ms), calc(var(--i) * 110ms + 120ms), 0s;
}
#about.visible .bento-card:hover { transform: translateY(-4px); transition-delay: 0s; }

.bento-intro   { grid-column: 1 / 8;  grid-row: 1 / 3; }
.bento-quote   { grid-column: 8 / 13; grid-row: 1; }
.bento-stats   { grid-column: 8 / 13; grid-row: 2; }
.bento-journey { grid-column: 1 / 8;  grid-row: 3; }
.bento-offline { grid-column: 8 / 13; grid-row: 3; }

.bento-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-md);
}

/* --- intro --- */
.bento-intro { display: flex; flex-direction: column; }
.bento-lead {
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 96;
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text-dark);
  margin-bottom: var(--space-md);
}
.bento-lead em { font-style: italic; color: var(--accent); }

.bento-text { font-size: 15.5px; line-height: 1.75; color: var(--text-body); margin-bottom: var(--space-sm); }

/* --- quote: a small dark pond --- */
.bento-quote {
  background: var(--pond);
  border-color: var(--pond);
  color: #f4efe7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
}
.bento-quote .bento-label { color: rgba(244, 239, 231, 0.5); position: relative; z-index: 1; }
.bento-quote-text {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 72;
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.3;
  color: #f4efe7;
}

.quote-pond { position: absolute; inset: 0; pointer-events: none; }
.quote-koi { position: absolute; width: 46px; height: 23px; opacity: 0.9; }
.quote-koi.k1 { color: #d65216; top: 22%; animation: swim 14s linear infinite; }
.quote-koi.k2 { color: #f4efe7; top: 48%; width: 34px; height: 17px; animation: swim 19s linear infinite -7s; opacity: 0.5; }
.quote-koi.k3 { color: #d65216; top: 70%; width: 28px; height: 14px; animation: swim 23s linear infinite -15s; opacity: 0.45; }
/* the icon faces left, so the fish swim right-to-left */
@keyframes swim {
  0%   { left: 105%; transform: translateY(0); }
  25%  { transform: translateY(-8px); }
  50%  { transform: translateY(4px); }
  75%  { transform: translateY(-5px); }
  100% { left: -15%; transform: translateY(0); }
}

/* --- numbers --- */
.bento-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
}
.bento-stat {
  padding: clamp(20px, 2.4vw, 30px);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.bento-stat:nth-child(2n) { border-right: none; }
.bento-stat:nth-child(n+3) { border-bottom: none; }
.bento-stat-num {
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 144;
  font-weight: 600;
  font-size: clamp(40px, 4.4vw, 60px);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
}
.bento-stat:nth-child(2) .bento-stat-num,
.bento-stat:nth-child(3) .bento-stat-num { color: var(--text-dark); }
.bento-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --- journey timeline --- */
.timeline { list-style: none; position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border) 40%);
}
.timeline-item {
  position: relative;
  padding-left: 36px;
  padding-bottom: var(--space-md);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 13px; height: 13px;
  box-sizing: border-box; /* keep the dot centred on the 1px line (both centre at 6.5px) */
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px solid var(--border);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.timeline-title {
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 36;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  color: var(--text-dark);
}
.timeline-place { font-size: 14px; color: var(--text-label); margin-top: 2px; }
.timeline-text { font-size: 14px; line-height: 1.6; color: var(--text-body); margin-top: 8px; max-width: 460px; }

/* --- offline --- */
.bento-offline { display: flex; flex-direction: column; }
.offline-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.offline-tag {
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 36;
  font-style: italic;
  font-size: 19px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-dark);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease-out);
}
.offline-tag:hover { background: var(--pond); border-color: var(--pond); color: #f4efe7; transform: translateY(-2px) rotate(-1.5deg); }

/* --- responsive --- */
@media (max-width: 1000px) {
  .bento-intro   { grid-column: 1 / -1; grid-row: auto; }
  .bento-quote   { grid-column: 1 / 7;  grid-row: auto; }
  .bento-stats   { grid-column: 7 / -1; grid-row: auto; }
  .bento-journey { grid-column: 1 / -1; grid-row: auto; }
  .bento-offline { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 640px) {
  .bento { gap: var(--space-sm); }
  .bento-quote, .bento-stats { grid-column: 1 / -1; }
  .bento-quote { min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .quote-koi { animation: none; }
  .quote-koi.k1 { left: 60%; } .quote-koi.k2 { left: 30%; } .quote-koi.k3 { left: 75%; }
  #about .bento-card { opacity: 1; transform: none; }
}

/* a small pond at the bottom of the offline card */
.mini-pond {
  position: relative;
  margin-top: auto;
  min-height: 130px;
  flex: 1 1 130px;
  margin-top: var(--space-md);
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0 6 Q 15 0 30 6 T 60 6 T 90 6 T 120 6' fill='none' stroke='%23d9cdb9' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x 0 18px / 120px 12px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0 6 Q 15 0 30 6 T 60 6 T 90 6 T 120 6' fill='none' stroke='%23e2d8c6' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x 60px 70% / 160px 12px,
    linear-gradient(180deg, #ebe3d5, #e3d9c7);
  border: 1px solid var(--border);
}
.pond-koi { position: absolute; width: 40px; height: 20px; }
.pond-koi.p1 { color: #d65216; top: 26%; animation: swim 16s linear infinite; }
.pond-koi.p2 { color: #21201c; top: 58%; width: 32px; height: 16px; animation: swim 21s linear infinite -9s; }
.pond-koi.p3 { color: #d65216; top: 72%; width: 26px; height: 13px; animation: swim 26s linear infinite -4s; opacity: 0.8; }
.pond-koi.p4 { color: #ffffff; top: 40%; width: 30px; height: 15px; animation: swim 19s linear infinite -14s; filter: drop-shadow(0 0 0.6px #8f897b); }
@media (prefers-reduced-motion: reduce) {
  .pond-koi { animation: none; }
  .pond-koi.p1 { left: 20%; } .pond-koi.p2 { left: 55%; } .pond-koi.p3 { left: 75%; } .pond-koi.p4 { left: 40%; }
}

/* ==========================================================
   SKILLS — same language as About:
   big heading with an italic accent, bento cards
========================================================== */
#skills { display: block; }
#skills > .section-eyebrow, #skills > h2 { grid-column: auto; }

#skills .skills-heading {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 1;
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
  text-shadow: 0 0 10px var(--bg), 0 0 4px var(--bg);
}
#skills .skills-heading em { font-style: italic; font-weight: 500; color: var(--accent); }

.skills-core  { grid-column: 1 / 8; }
.skills-tools { grid-column: 8 / 13; }
.skills-soft  { grid-column: 1 / 8; }
.skills-lang  { grid-column: 8 / 13; }

/* cards surface one after another, like the About section */
#skills .bento-card { opacity: 0; transform: translateY(26px); }
#skills.visible .bento-card {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), box-shadow 0.55s var(--ease-out);
  transition-delay: calc(var(--i) * 110ms + 120ms), calc(var(--i) * 110ms + 120ms), 0s;
}
#skills.visible .bento-card:hover { transform: translateY(-4px); transition-delay: 0s; }

/* core skills: a large italic list in two columns */
.craft-list {
  list-style: none;
  columns: 2;
  column-gap: var(--space-lg);
}
.craft-list li {
  break-inside: avoid;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 48;
  font-style: italic;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.25;
  color: var(--text-dark);
  transition: color 0.3s var(--ease), padding-left 0.4s var(--ease-out);
}
.craft-list li::before {
  content: '';
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--koi-orange);
  transform: translateY(-3px);
}
.craft-list li:hover { color: var(--accent); padding-left: 6px; }

/* tools: name on the left, what it's for underneath */
.tool-list { list-style: none; }
.tool-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.tool-list li:first-child { padding-top: 0; }
.tool-list li:last-child { border-bottom: none; padding-bottom: 0; }
.tool-name {
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 36;
  font-weight: 600;
  font-size: 20px;
  color: var(--text-dark);
}
.tool-use { font-size: 14px; color: var(--text-label); }

/* soft skills: the dark pond card */
.skills-soft { background: var(--pond); border-color: var(--pond); }
.skills-soft .bento-label { color: rgba(244, 239, 231, 0.5); }
.soft-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.soft-tags span {
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 36;
  font-style: italic;
  font-size: 19px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 231, 0.2);
  color: #f4efe7;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.soft-tags span:hover { background: #f08a4b; border-color: #f08a4b; color: var(--pond); }

/* languages */
.lang-list { list-style: none; }
.lang-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.lang-list li:first-child { padding-top: 0; }
.lang-list li:last-child { border-bottom: none; padding-bottom: 0; }
.lang-name {
  font-family: var(--font-serif);
  font-variation-settings: 'opsz' 36;
  font-weight: 600;
  font-size: 22px;
  color: var(--text-dark);
}
.lang-level {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (max-width: 1000px) {
  .skills-core, .skills-tools, .skills-soft, .skills-lang { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .craft-list { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #skills .bento-card { opacity: 1; transform: none; }
}

/* locked tab: visible but not clickable, marked "coming soon" */
.tab-btn.is-locked,
.tab-btn.is-locked:hover {
  color: var(--text-faint);
  opacity: 0.55;
  cursor: not-allowed;
}
.tab-soon {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: none;
  margin-left: 4px;
}

/* hero foot, right side: location in the same style as "Currently" */
.hero-relocate {
  color: var(--text-faint);
  margin-left: 4px;
}

/* ==============================================
   PASSWORD GATE — shown in the modal before a case study is unlocked
============================================== */
.lock-gate {
  max-width: 460px;
  margin: clamp(24px, 8vh, 80px) auto;
  text-align: center;
}
.lock-icon {
  width: 34px; height: 34px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  margin-bottom: var(--space-sm);
}
.lock-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-label);
  margin-bottom: 10px;
}
.lock-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.1;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
  text-wrap: balance;
}
.lock-title em { color: var(--accent); }
.lock-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: var(--space-md);
  text-wrap: pretty;
}
.lock-text a { color: var(--accent); text-underline-offset: 3px; }
.lock-form {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.lock-input {
  flex: 1;
  min-width: 0;
  max-width: 260px;
  padding: 11px 14px;
  font: 15px var(--font-sans);
  color: var(--text-dark);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.lock-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(191, 9, 47, 0.12);
}
/* the site draws its own cursor, so hide the system one here too */
.lock-input, .lock-submit { cursor: none; }
.lock-submit:disabled { opacity: 0.7; }
.lock-error {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.lock-form.shake { animation: lock-shake 0.4s var(--ease); }
@keyframes lock-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.lock-status {
  margin: clamp(40px, 12vh, 120px) auto;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-label);
}
@media (max-width: 480px) {
  .lock-form { flex-direction: column; align-items: stretch; }
  .lock-input { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lock-form.shake { animation: none; }
}
