:root{
  --bg: #0a0a0a;
  --panel: #111112;
  --text: #ececec;
  --muted: #9a9a9a;
  --line: rgba(255,255,255,0.06);
  --brand: #f5f5f5;
  --radius: 14px;
  --container: 1100px;
}
@media (prefers-color-scheme: light){
  :root{
    --bg:#f7f7f8; --panel:#fff; --text:#0b0b0c; --muted:#5c5c5c; --line:rgba(0,0,0,0.08);
    --brand:#0b0b0c;
  }
}
*{ box-sizing: border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% -10%, #101012, transparent 60%),
              linear-gradient(#0a0a0a, #0a0a0a);
  min-height:100dvh;
}
.container{ width: min(100% - 32px, var(--container)); margin-inline: auto; }
.section{ padding: 80px 0; }
.section--home{ padding-top: 120px; }
.section__title{ font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing:.2px; margin:0 0 16px; }

/* grid overlay */
.grid-overlay{
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(to right, var(--line), var(--line) 1px, transparent 1px, transparent 96px),
    repeating-linear-gradient(to bottom, var(--line), var(--line) 1px, transparent 1px, transparent 120px);
  -webkit-mask: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
  mask: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

/* ====== NAVBAR (scoped to #site-nav so it won't clash) ====== */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Inner container */
#site-nav .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Brand left */
#site-nav .brand {
  text-decoration: none;
  color: #eaeaea;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: clamp(12px, 2.8vw, 14px);
}

/* Links right */
#site-nav .menu {
  margin-left: auto;            /* push links to the right */
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 22px);   /* gap scales with width */
}

#site-nav .menu a {
  text-decoration: none;
  color: rgba(234,234,234,0.9);
  font-size: clamp(12px, 1.05vw, 14px); /* fluid font size */
  padding: 6px 8px;
  border-radius: 8px;
  transition: background .2s ease, color .2s ease;
}

#site-nav .menu a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

/* Tighten on small screens */
@media (max-width: 560px) {
  #site-nav .wrap { padding: 8px 10px; }
  #site-nav .menu a { padding: 4px 6px; }
}

/* Optional: smooth anchor scrolling */
html { scroll-behavior: smooth; }

/* Optional: smooth anchor scrolling */
html { scroll-behavior: smooth; }

/* hero */
.hero{ max-width: 680px; position: relative; z-index: 1; }
.hero__title{
  margin: 0 0 36px;
  padding-bottom: 6px; /* add this */
  font-size: clamp(42px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1;
  text-transform: lowercase;
}
.hero__title .linebreak{ display:block; }
.hero__title .highlight{
  background: linear-gradient(180deg, #fff, #bfbfbf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* === Rotating greeting: hi → hallo → ciao → back to hi === */
.greet{
  /* exact row height; adjust if your line-height differs */
  --row: 1em;
  display:inline-block;
  height:var(--row);
  overflow:hidden;
  vertical-align:baseline;
}

/* container that slides */
.greet .words{
  display:block;                /* important */
  animation: slideWords 15s cubic-bezier(.75,0,.25,1) infinite;
  will-change: transform;
}

/* each word must be a block so height applies exactly */
.greet .words > span{
  display:block;                /* critical fix */
  height:var(--row);
  line-height:var(--row);
  color:#e7e7e7;
}

/* 3 words; each shows ~5s, no blank frame */
@keyframes slideWords{
  /* show “hi” */
  0%,16.666%     { transform: translateY(0); }

  /* show “hallo” */
  33.333%,50%    { transform: translateY(calc(-1 * var(--row))); }

  /* show “ciao” */
  66.666%,83.333%{ transform: translateY(calc(-2 * var(--row))); }

  /* return to “hi” without stopping on an empty line */
  100%           { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce){
  .greet .words{ animation:none; transform:none; }
}

/* button */
.button{
  display:inline-block; text-decoration:none; color:var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 999px;
  transition: transform .15s ease, background .2s, border-color .2s;
}
.button:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.18); }

/* full-width call-to-action button */
.button--wide{
  display:block;
  width:100%;
  text-align:center;
  padding:14px 18px;
  font-weight:600;
}

/* copy */
.copy{ color: var(--muted); max-width: 72ch; }

/* timeline */
.timeline{ display:grid; gap:18px; margin-top:8px; }
.item{ padding:16px 18px; border:1px solid var(--line); border-radius:var(--radius);
       background: color-mix(in oklab, var(--panel) 86%, transparent); }
.item .meta{ display:flex; justify-content:space-between; gap:12px; margin-bottom:6px; }
.role{ font-weight:600; } .time{ color:var(--muted); }


/* project cards */
.cards{ display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top:10px; }
.card{ padding:18px; border:1px solid var(--line); border-radius:var(--radius);
       background: color-mix(in oklab, var(--panel) 86%, transparent);
       transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover{ transform: translateY(-2px); border-color: rgba(255,255,255,0.18); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.card__title{ margin:2px 0 6px; font-weight:700; }
.card__desc{ color: var(--muted); }

/* ----- Flip cards: whole card flips ----- */
.flip-card{
  perspective: 1000px; /* only the 3D context; no visual styling here */
}

.flip-card__inner{
  position: relative;
  min-height: 220px;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}

.flip-card:hover .flip-card__inner{
  transform: rotateY(180deg);
}

/* Each face IS the card (so the shell flips too) */
.flip-card__face{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--panel) 86%, transparent);
  box-shadow: 0 0 0 0 rgba(0,0,0,0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Hover polish applies to whichever face is visible */
.flip-card:hover .flip-card__face{
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* Front (default) */
.flip-card__front{}

/* Back (rotated) */
.flip-card__back{
  transform: rotateY(180deg);
}

/* FRONT: logo (1:1) + name */
.proj-logo{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: calc(var(--radius) - 6px);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.proj-logo img{
  width: 80%;
  height: 80%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}
.proj-name{ margin: 10px 2px 0; font-weight: 700; letter-spacing: .2px; }

/* BACK: description */
.flip-card__back .proj-name{ margin-top: 0; }
.flip-card__back .proj-desc{ color: var(--muted); margin: 6px 0 0; }

/* Motion-safe fallback */
@media (prefers-reduced-motion: reduce){
  .flip-card__inner{ transition: none; }
  .flip-card:hover .flip-card__inner{ transform: none; }
  .flip-card__back{ opacity: 0; transition: opacity .2s ease; }
  .flip-card:hover .flip-card__back{ opacity: 1; }
}

/* FRONT: logo (1:1) + name */
.flip-card__front{
  display: flex;
}

.proj-logo{
  width: 100%;
  aspect-ratio: 1 / 1;                  /* 1:1 slot for the logo */
  border-radius: calc(var(--radius) - 6px);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.proj-logo img{
  width: 80%;
  height: 80%;
  object-fit: contain;                   /* keep logo proportions */
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

.proj-name{
  margin: 10px 2px 0;
  font-weight: 700;
  letter-spacing: .2px;
}

/* BACK: description */
.flip-card__back{
  transform: rotateY(180deg);
  display: flex;
  justify-content: center;
}

.flip-card__back .proj-name{ margin-top: 0; }
.flip-card__back .proj-desc{ color: var(--muted); margin: 6px 0 0; }

/* Motion-safe fallback */
@media (prefers-reduced-motion: reduce){
  .flip-card__inner{ transition: none; }
  .flip-card:hover .flip-card__inner{ transform: none; }
  .flip-card__back{ opacity: 0; transition: opacity .2s ease; }
  .flip-card:hover .flip-card__back{ opacity: 1; }
}

/* ----- Projects: 4:5 card, 1:1 logo ----- */

/* The whole card keeps a 4:5 ratio (portrait) */
.flip-card{
  perspective: 1000px;
  aspect-ratio: 4 / 5;      /* ← 4:5 card */
  min-height: 260px;        /* keeps presence on large screens */
}

/* Inner fills the card height for the flip */
.flip-card__inner{
  position: relative;
  height: 100%;             /* fill the 4:5 box */
  min-height: 0;            /* override any previous min-height */
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.flip-card:hover .flip-card__inner{ transform: rotateY(180deg); }

/* Each face is the actual card */
.flip-card__face{
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;   /* square logo area, then name */
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--panel) 86%, transparent);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-card__back{ transform: rotateY(180deg); }

/* Hover polish */
.flip-card:hover .flip-card__face{
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* Logo box is strictly square */
.proj-logo{
  width: 100%;
  aspect-ratio: 1 / 1;        /* ← 1:1 logo area */
  border-radius: calc(var(--radius) - 6px);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.proj-logo img{
  width: 80%;
  height: 80%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

/* Fill the square logo box completely */
.proj-logo img{
  width: 100%;
  height: 100%;
  object-fit: cover;          /* fills the square; crops if needed */
  object-position: center;
  filter: none;               /* optional: remove drop shadow for a flush fit */
}

/* Name sits under the square */
.proj-name{
  margin: 2px 2px 0;
  font-weight: 700;
  letter-spacing: .2px;
}

/* Back face text */
.flip-card__back .proj-name{ margin-top: 0; }
.flip-card__back .proj-desc{ color: var(--muted); margin: 6px 0 0; }

/* Center project title under the logo (front face only) */
.flip-card__front{
  text-align: center;          /* centers inline text content */
}

.flip-card__front .proj-name{
  justify-self: center;        /* centers the grid item itself */
  margin-top: 6px;             /* small breathing room */
}

/* Keep the back face text left-aligned (optional safety) */
.flip-card__back{ text-align: left; }
.flip-card__back .proj-name{ text-align: center; }  /* title centered on back too */

/* Motion-safe fallback */
@media (prefers-reduced-motion: reduce){
  .flip-card__inner{ transition: none; }
  .flip-card:hover .flip-card__inner{ transform: none; }
  .flip-card__back{ opacity: 0; transition: opacity .2s ease; }
  .flip-card:hover .flip-card__back{ opacity: 1; }
}

/* helpers & footer */
.backtop{ margin-top:18px; }
.backtop a{ color: var(--muted); } .backtop a:hover{ color: var(--text); }
.footer{ padding:32px 0 60px; color:var(--muted); border-top:1px solid var(--line); margin-top:40px; }

/* ============ HERO SPLIT (greeting left, portrait right) ============ */
.hero-split{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: end;
  gap: clamp(24px, 4vw, 48px);
}

/* portrait card matches your site’s card aesthetic */
.portrait-card{
  /* keep the card visible while you scroll the intro */
  position: sticky;
  top: 96px; /* sits nicely below the sticky navbar */
}

.portrait-card__inner{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--panel) 86%, transparent);
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease;
}

.portrait-card__inner:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 14px 36px rgba(0,0,0,.3);
}

.portrait-card__inner img{
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;       /* tidy portrait ratio */
  object-fit: cover;
  border-radius: calc(var(--radius) - 6px);
}

/* Responsive: stack on narrow screens */
@media (max-width: 960px){
  .hero-split{
    grid-template-columns: 1fr;
  }
  .portrait-card{
    position: static;
    max-width: 420px;
    margin: 8px 0 0 auto; /* keeps a clean right edge; change to 0 for full-width */
  }
}

/* ===== About cards ===== */
.about-grid{
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

@media (max-width: 980px){
  .about-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px){
  .about-grid{ grid-template-columns: 1fr; }
}

.about-card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--panel) 86%, transparent);
  padding: 14px;
  transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.about-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 14px 36px rgba(0,0,0,.26);
}

.about-media{
  position: relative;
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  aspect-ratio: 9 / 16;       /* your desired card ratio */
  margin-bottom: 12px;
}

/* Stack both media absolutely, fill box perfectly */
.about-media img,
.about-media video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: calc(var(--radius) - 6px);
  transition: opacity .28s ease, transform .4s ease, filter .4s ease;
}

/* Start state: show the image, hide the video (but the video is already playing muted) */
.about-media img.preview{ opacity: 1; z-index: 2; }
.about-media video       { opacity: 0; z-index: 1; filter: brightness(.9); }

/* On hover: fade image out, fade video in, slight polish */
.about-media:hover img.preview{ opacity: 0; }
.about-media:hover video      { opacity: 1; filter: brightness(1); transform: scale(1.02); }

/* Optional top sheen */
.about-media::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.10), transparent 40%);
  pointer-events: none;
}

.about-media img{
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.about-title{
  margin: 2px 0 6px;
  font-weight: 700;
  letter-spacing: .2px;
}

.about-desc{
  color: var(--muted);
  margin: 0;
}

.about-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius) - 6px);
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: brightness(0.6);
}

/* Slight zoom + brighten on hover */
.about-card:hover video {
  filter: brightness(1);
  transform: scale(1.03);
}

/* ===== Core Values ===== */
.kv-grid{
  display:grid;
  gap:16px;
  grid-template-columns: repeat(2, minmax(0,1fr));
  margin-top:10px;
}
@media (max-width: 900px){
  .kv-grid{ grid-template-columns:1fr; }
}

.kv-card{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--panel) 86%, transparent);
  padding:18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.kv-subtitle{
  margin:2px 0 6px;
  font-weight:700;
  letter-spacing:.2px;
}

.kv-note{
  margin:0 0 12px;
  color: var(--muted);
}

.kv-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:10px 0 6px;
}
.kv-label{ font-weight:600; }
.kv-level{ color: var(--muted); }

/* meters */
.meter{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,0.06);
  border:1px solid var(--line);
  overflow:hidden;
}
.meter-fill{
  height:100%;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), transparent 30%) no-repeat,
              #22c55e; /* default green fallback */
  background-blend-mode: overlay;
  transition: width .5s ease;
}

.meter--green{
  background:
    linear-gradient(90deg, rgba(255,255,255,0.18), transparent 30%) no-repeat,
    #16a34a;
}
.meter--yellow{
  background:
    linear-gradient(90deg, rgba(255,255,255,0.18), transparent 30%) no-repeat,
    #eab308;
}

/* chips */
.kv-chips{
  list-style:none; padding:0; margin:8px 0 0;
  display:flex; flex-wrap:wrap; gap:8px;
}
.kv-chips li{
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 13px;
  letter-spacing:.2px;
}

/* tiny helper for spacing */
.mt-10{ margin-top:10px; }

/* === Stronger glowing health bars === */
.meter-fill {
  transition: box-shadow 0.4s ease, filter 0.4s ease, transform 0.4s ease;
}

.meter-fill:hover {
  filter: brightness(1.5);
  transform: scale(1.02);
  box-shadow:
    0 0 15px currentColor,
    0 0 30px currentColor,
    0 0 45px currentColor;
  animation: pulseGlow 1.5s ease-in-out infinite alternate;
}

/* subtle breathing animation */
@keyframes pulseGlow {
  from {
    box-shadow:
      0 0 15px currentColor,
      0 0 30px currentColor,
      0 0 45px currentColor;
  }
  to {
    box-shadow:
      0 0 25px currentColor,
      0 0 50px currentColor,
      0 0 75px currentColor;
  }
}

/* make sure the colors emit correct light tones */
.meter--green { color: #00ff9d; }
.meter--yellow { color: #ffd633; }

/* Smooth thickness change */
.meter {
  height: 10px;                 /* base thickness */
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: height 0.25s ease; /* animate thickness */
}

.meter:hover {
  height: 20px;                 /* double thickness on hover */
}

.meter-fill {
  height: 100%;                 /* always fill container height */
  border-radius: 999px;
  transition: width .5s ease;   /* keep your width animation */
  /* keep your existing backgrounds/colors as-is */
}

/* ===== Experience: left 1:1 media, text right ===== */
.timeline .item.exp{
  display: grid;
  grid-template-columns: 140px 1fr;  /* square image | text */
  gap: 16px;
  align-items: center;
}

.exp-media{
  width: 140px;
  aspect-ratio: 1 / 1;                 /* 1:1 slot */
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.exp-media img,
.exp-media video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.exp-body{ min-width: 0; }
.exp-role{ margin: 0 0 6px; font-weight: 700; letter-spacing: .2px; }
.exp-desc{ margin: 0; color: var(--muted); }
.exp-meta{ margin-top: 8px; display: flex; gap: 10px; color: var(--muted); }

/* Hover polish to match cards */
.timeline .item.exp:hover .exp-media{
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

/* Responsive: stack image above text */
@media (max-width: 700px){
  .timeline .item.exp{
    grid-template-columns: 1fr;
    align-items: start;
  }
  .exp-media{
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }
}

/* Experience layout (keep your existing .timeline .item.exp rules) */
.timeline .item.exp{
  position: relative;                 /* for the top-right dates */
  display: grid;
  grid-template-columns: 140px 1fr;   /* 1:1 image | text */
  gap: 16px;
  align-items: center;
}

/* 1:1 media slot */
.exp-media{
  width: 140px;
  aspect-ratio: 1 / 1;
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.exp-media img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Text stack */
.exp-body{ min-width:0; }
.exp-title{
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: .2px;
  font-size: clamp(16px, 1.4vw, 18px);
}
.exp-desc{
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

/* Dates in top-right */
.exp-time{
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 999px;
}

/* Hover polish to match your cards */
.timeline .item.exp:hover .exp-media{
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

/* Mobile: stack image above text */
@media (max-width: 700px){
  .timeline .item.exp{
    grid-template-columns: 1fr;
    align-items: start;
  }
  .exp-media{ width: 100%; max-width: 420px; margin: 0; }
  .exp-time{ top: 10px; right: 10px; }
}

/* Experience cards — lighter than before so the grid shows through */
#experience .timeline .item.exp{
  position: relative;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;

  /* more transparent than projects */
  background: color-mix(in oklab, var(--panel) 60%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;                           /* remove heavy darkening */
  transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease;
}

#experience .timeline .item.exp:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);     /* subtle, keeps grid visible */
}

/* media tile (kept minimal & light) */
#experience .exp-media{
  width: 140px;
  aspect-ratio: 1/1;
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
#experience .exp-media img{ width:100%; height:100%; object-fit:cover; display:block; }

/* date pill */
#experience .exp-time{
  position: absolute; top:12px; right:14px;
  color: var(--muted); font-weight:600; font-size:13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  padding: 4px 8px; border-radius: 999px;
}

/* mobile */
@media (max-width:700px){
  #experience .timeline .item.exp{ grid-template-columns: 1fr; align-items:start; }
  #experience .exp-media{ width:100%; max-width:420px; margin:0; }
}

/* ===== Assignments Hub ===== */
#assignments { position: relative; }

.assignments-sidebar{
  position: sticky; top: 92px;
  border:1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in oklab, var(--panel) 82%, transparent);
  padding:14px; margin:16px 0 24px;
}
.pill-title{ font-weight:700; margin-bottom:8px; }
.chipbar{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  padding:6px 10px; border-radius:999px; font-size:13px;
  background: rgba(255,255,255,.05); border:1px solid var(--line); color:var(--text);
  cursor:pointer; transition:transform .15s ease, background .2s ease;
}
.chip:hover{ transform: translateY(-1px); background: rgba(255,255,255,.08); }
.progress{ margin-top:12px; }
.progress .bar{ height:8px; background: rgba(255,255,255,.06); border:1px solid var(--line); border-radius:999px; overflow:hidden; }
.progress .bar i{ display:block; height:100%; background:#16a34a; }

@media (min-width: 980px){
  #assignments.section.container,
  #assignments.container { display:grid; grid-template-columns: 260px 1fr; gap:16px; }
  .assignments-sidebar{ align-self: start; }
}

.assignments-stack{ display:grid; gap:12px; }
.a-card{ border:1px solid var(--line); border-radius: var(--radius); background: color-mix(in oklab, var(--panel) 86%, transparent); overflow:hidden; }
.a-head{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px; background:transparent; color:var(--text); border:0; cursor:pointer;
}
.a-kicker{ font-weight:800; background: rgba(255,255,255,.08); border:1px solid var(--line); border-radius:999px; padding:2px 8px; }
.a-title{ font-weight:700; margin-left:4px; flex:1; text-align:left; }
.a-chevron{ opacity:.7; }

.a-body{ display:none; padding: 0 16px 16px; }
.a-card[open] .a-body,
.a-head[aria-expanded="true"] + .a-body{ display:block; }

.goal{ font-weight:600; margin: 6px 0 10px; }
.problem{ margin:8px 0 12px; background: rgba(255,255,255,.04); border:1px solid var(--line); border-radius: var(--radius); padding:12px; }
.rationale{ margin:0 0 10px 16px; }
.tags{ display:flex; flex-wrap:wrap; gap:6px; }
.tags span{
  font-size:12px; border:1px solid var(--line); border-radius:999px;
  padding:3px 8px; background: rgba(255,255,255,.05);
}

.grid-2{ display:grid; gap:12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-2 figure{ margin:0; border:1px solid var(--line); border-radius: calc(var(--radius) - 4px); overflow:hidden; background: rgba(255,255,255,.03); }
.grid-2 img{ display:block; width:100%; height:280px; object-fit:cover; object-position:center; }
.grid-2 figcaption{ padding:10px; font-size:14px; }
.grid-2 .mini{ opacity:.7; font-size:12px; }

.embed .button{ width:100%; text-align:center; margin:10px 0; }

/* Before/After compare */
.compare{ position:relative; border:1px solid var(--line); border-radius: var(--radius); overflow:hidden; background: rgba(255,255,255,.03); }
.compare .cmp{ display:block; width:100%; height:360px; object-fit:cover; position:absolute; inset:0; }
.compare .before{ clip-path: inset(0 50% 0 0); }  /* initial split 50/50 */
.compare input[type="range"]{
  position:absolute; inset:0; width:100%; height:100%;
  appearance:none; background:transparent; cursor:ew-resize;
}
.compare input[type="range"]::-webkit-slider-thumb{ appearance:none; width:2px; height:100%; background:#fff; box-shadow:0 0 0 9999px transparent; }
.compare input[type="range"]::-moz-range-thumb{ width:2px; height:100%; background:#fff; border:0; }

/* table */
.table-wrap{ overflow:auto; border:1px solid var(--line); border-radius: var(--radius); }
table.feedback{ width:100%; border-collapse:collapse; font-size:14px; }
table.feedback th, table.feedback td{ padding:8px 10px; border-bottom:1px solid var(--line); }
table.feedback thead th{ background: rgba(255,255,255,.04); text-align:left; }

/* toggle chevron */
.a-head[aria-expanded="true"] .a-chevron{ transform: rotate(180deg); transition: transform .2s ease; }

/* ======================= ASSIGNMENTS (A5) ======================= */
.a5__title{
  margin: 6px 0 10px;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: clamp(18px, 2.2vw, 22px);
}
.a5__badge{
  display:inline-block;
  padding:4px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,0.04);
  font-weight:700; font-size:12px; letter-spacing:.2px;
  margin-bottom:8px;
}

.a5-card{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--panel) 86%, transparent);
  padding:18px;
  margin-top:14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.a5-card__title{
  margin:2px 0 10px;
  font-weight:700;
  letter-spacing:.2px;
}

.a5-grid{
  display:grid; gap:14px; margin-top:10px;
}
.a5-grid--4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
.a5-grid--2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 980px){ .a5-grid--4{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .a5-grid--2, .a5-grid--4{ grid-template-columns: 1fr; } }

.persona, .feedback, .cluster{
  border:1px solid var(--line);
  border-radius: calc(var(--radius) - 6px);
  background: rgba(255,255,255,0.03);
  padding:14px;
}
.persona__head, .feedback__head{
  display:flex; align-items:center; gap:10px; margin-bottom:8px;
}
.avatar{
  width:36px; height:36px; display:grid; place-items:center;
  border-radius:999px; background: rgba(255,255,255,0.06);
  border:1px solid var(--line); font-weight:700;
}
.muted{ color: var(--muted); font-size: 13px; }

.bullets{ margin:0; padding-left:18px; }
.bullets li{ margin: 6px 0; }
.chip{
  display:inline-block; margin-left:6px; padding:2px 8px; font-size:12px;
  border-radius:999px; border:1px solid var(--line); background: rgba(255,255,255,0.04);
}

.cluster__title{ margin:2px 0 6px; font-weight:700; letter-spacing:.2px; }
.ticks{ margin:0; padding-left:18px; }
.ticks li{ margin:6px 0; }

.change-log{ display:grid; gap:10px; margin-top:10px; }
.change{
  display:flex; gap:10px; align-items:flex-start;
  border:1px dashed var(--line); border-radius: calc(var(--radius) - 8px);
  padding:12px;
  background: rgba(255,255,255,0.02);
}
.badge{
  flex: 0 0 auto;
  padding:4px 10px; font-size:12px; font-weight:700; letter-spacing:.2px;
  border:1px solid var(--line); border-radius:999px;
  background: rgba(255,255,255,0.05);
}
/* Assignments section: force vertical stack */
#assignments {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 14px;
}

#assignments .copy {
  max-width: 70ch;
}

#assignments .button {
  width: auto;
}
/* Assignments page main title */
.page-title {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 32px;
}
.page-intro {
  max-width: 70ch;
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 40px;
}
/* Assignments card layout */
.assignments-card {
  max-width: 900px;
  padding: 28px;
}

/* 2-column list */
.assignment-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px 18px;
}

/* Each row */
.assignment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

/* Title + desc */
.assignment-meta { min-width: 0; }
.assignment-title {
  font-weight: 600;
  line-height: 1.2;
}
.assignment-desc {
  margin-top: 4px;
  font-size: 0.92rem;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icon-only download button */
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  cursor: not-allowed;
  padding: 0;
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  opacity: 0.9;
}

/* Mobile: fall back to 1 column */
@media (max-width: 720px) {
  .assignment-list {
    grid-template-columns: 1fr;
  }
}
/* --- Assignments page: force clean 2-col grid + icon-only button --- */
.card.assignments-card {
  max-width: 980px !important;
  padding: 28px !important;
}

.assignment-grid {
  list-style: none !important;
  padding: 0 !important;
  margin: 18px 0 0 0 !important;

  display: grid !important;
  grid-template-columns: repeat(2, minmax(320px, 1fr)) !important;
  gap: 14px 22px !important;
}

.assignment-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;

  padding: 14px 16px !important;
  border-radius: 14px !important;

  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
}

.assignment-meta {
  min-width: 0 !important;
}

.assignment-title {
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.assignment-desc {
  margin-top: 4px !important;
  font-size: 0.92rem !important;
  opacity: 0.75 !important;

  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.assignment-dl {
  width: 44px !important;
  height: 44px !important;
  display: grid !important;
  place-items: center !important;

  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  background: rgba(255,255,255,0.04) !important;

  padding: 0 !important;
  cursor: not-allowed !important;

  color: rgba(255,255,255,0.88) !important;
}

.assignment-dl svg {
  width: 20px !important;
  height: 20px !important;
  fill: currentColor !important;
}

@media (max-width: 760px) {
  .assignment-grid {
    grid-template-columns: 1fr !important;
  }
}
/* Space between assignment cards */
.assignments-card + .assignments-card {
  margin-top: 40px;
}