  :root{
    --paper: #FAFAF6;
    --paper-dim: #F1F0E9;
    --ink: #17181C;
    --ink-soft: #4A4B52;
    --line: #DEDDD3;
    --yellow: #F2C94C;
    --coral: #E8543D;
    --teal: #2F6F6B;
    --plum: #7A5C7E;
    --yellow-soft: #FBEDBB;
    --coral-soft: #F8D6CE;
    --teal-soft: #CFE3E1;
    --plum-soft: #E4D7E5;
  }

  *{ box-sizing: border-box; }
  html{ scroll-behavior: smooth; }
  body{
    margin:0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  ::selection{ background: var(--yellow-soft); }

  a{ color: inherit; }

  .wrap{
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 40px;
  }

  .mono{
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    letter-spacing: 0.02em;
  }

  .eyebrow{
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
  }

  /* ---------- Nav ---------- */
  nav{
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250,250,246,0.86);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  nav .wrap{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
  }
  .wordmark{
    display:flex;
    align-items:center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 14px;
    text-decoration: none;
  }
  .wordmark .box{
    width: 26px; height: 26px;
    background: var(--ink);
    color: var(--paper);
    display:flex; align-items:center; justify-content:center;
    font-size: 11px;
    border-radius: 3px;
    transform: rotate(-3deg);
  }
  .navlinks{
    display:flex;
    gap: 28px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 13px;
  }
  .navlinks a{
    text-decoration:none;
    color: var(--ink-soft);
    position: relative;
    padding-bottom: 2px;
  }
  .navlinks a:hover{ color: var(--ink); }
  .navlinks a:focus-visible, a:focus-visible{
    outline: 2px solid var(--ink);
    outline-offset: 3px;
  }

  .nav-toggle{
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 3px;
    cursor: pointer;
    padding: 0;
  }
  .nav-toggle span{
    display:block;
    width: 16px;
    height: 1.5px;
    background: var(--ink);
    margin: 0 auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }

  /* ---------- Marker underline ---------- */
  .mark{
    white-space: nowrap;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.15em;
    text-decoration-skip-ink: none;
  }
  .mark.yellow{ text-decoration-color: var(--yellow); }
  .mark.coral{ text-decoration-color: var(--coral); }
  .mark.teal{ text-decoration-color: var(--teal); }
  .mark.plum{ text-decoration-color: var(--plum); }

  /* ---------- Hero ---------- */
  header.hero{
    padding: 64px 0 96px;
  }
  .hero-grid{
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 56px;
    align-items: center;
  }
  h1.headline{
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.16;
    letter-spacing: -0.01em;
    margin: 0 0 22px;
  }
  h1.headline em{
    font-style: italic;
    font-weight: 500;
  }
  .intro-line{
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 17px;
    color: var(--ink-soft);
    margin: 0 0 6px;
  }
  .photo-intro{
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 500;
    font-size: 20px;
    color: var(--ink);
    text-align: right;
    margin: 0 6px 14px 0;
  }
  .hero-designation{
    display: block;
    margin: 0 0 8px;
  }
  .hero-sub{
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 44ch;
    margin: 0 0 32px;
  }
  .hero-cta{
    display:flex;
    gap: 14px;
    flex-wrap: wrap;
  }
  .btn{
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 13px;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 3px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .btn-primary{
    background: var(--ink);
    color: var(--paper);
  }
  .btn-primary:hover{ transform: translateY(-2px); }
  .btn-ghost{
    border: 1px solid var(--line);
    color: var(--ink);
  }
  .btn-ghost:hover{ border-color: var(--ink); transform: translateY(-2px); }

  .photo-wrap{
    position: relative;
    justify-self: end;
  }
  .photo-frame{
    width: 240px;
    height: 300px;
    background: var(--paper-dim);
    border: 1px solid var(--line);
    padding: 10px;
    transform: rotate(2deg);
  }
  .photo-frame img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display:block;
    filter: grayscale(15%);
  }
  .sticky-note{
    position:absolute;
    bottom: -18px;
    left: -28px;
    background: var(--yellow);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 11px;
    padding: 8px 12px;
    transform: rotate(-4deg);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  }

  /* ---------- Section shell ---------- */
  section{
    padding: 88px 0;
    border-top: 1px solid var(--line);
  }
  .section-head{
    display:flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 48px;
    flex-wrap: wrap;
  }
  h2.section-title{
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(28px, 3.4vw, 40px);
    margin: 6px 0 0;
  }
  .tag-note{
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: var(--ink-soft);
    border: 1px dashed var(--line);
    padding: 6px 10px;
    transform: rotate(-1.5deg);
    white-space: nowrap;
  }

  /* ---------- About ---------- */
  .about-body p{
    font-size: 19px;
    line-height: 1.75;
    max-width: 62ch;
    color: var(--ink);
    margin: 0 0 28px;
  }

  /* ---------- Approach (Observe/Question/Build) ---------- */
  .approach-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
  }
  @media (max-width: 1000px){
    .approach-grid{ grid-template-columns: repeat(2, 1fr); }
  }
  .approach-card{
    background: var(--paper);
    padding: 32px 28px 36px;
    position: relative;
  }
  .approach-card .num{
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: var(--ink-soft);
    display:block;
    margin-bottom: 18px;
  }
  .approach-card h3{
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 24px;
    margin: 0 0 6px;
  }
  .approach-card .sub{
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    margin: 0 0 16px;
    display: block;
  }
  .approach-card p.desc{
    color: var(--ink-soft);
    font-size: 15px;
    margin: 0;
  }
  .approach-card::before{
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
  }
  .approach-card.observe::before{ background: var(--yellow); }
  .approach-card.question::before{ background: var(--coral); }
  .approach-card.understand::before{ background: var(--teal); }
  .approach-card.create::before{ background: var(--plum); }
  .approach-card.observe .sub{ color: #A98418; }
  .approach-card.question .sub{ color: var(--coral); }
  .approach-card.understand .sub{ color: var(--teal); }
  .approach-card.create .sub{ color: var(--plum); }

  /* ---------- Skills ---------- */
  .skills-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  .skills-col h4{
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
    margin: 0 0 16px;
  }
  .chip-list{
    display:flex;
    flex-wrap:wrap;
    gap: 8px;
  }
  .chip{
    font-size: 14px;
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--paper);
  }

  /* ---------- Contact / Footer ---------- */
  footer{
    padding: 80px 0 48px;
    border-top: 1px solid var(--line);
  }
  .contact-inner{
    display:grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: end;
  }
  h2.contact-title{
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(32px, 5vw, 54px);
    margin: 0 0 28px;
    line-height: 1.15;
  }
  .contact-links{
    display:flex;
    flex-direction: column;
    gap: 14px;
  }
  .contact-links a{
    text-decoration:none;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 15px;
    display:flex;
    align-items:center;
    gap: 10px;
    width: fit-content;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
  }
  .contact-links a:hover{ border-color: var(--ink); }
  .foot-meta{
    display:flex;
    justify-content: space-between;
    align-items:center;
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: var(--ink-soft);
    flex-wrap: wrap;
    gap: 12px;
  }

  /* ---------- Reveal on scroll ---------- */
  .reveal{
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.in{
    opacity: 1;
    transform: translateY(0);
  }

  @media (prefers-reduced-motion: reduce){
    .reveal{ opacity: 1; transform: none; transition: none; }
    html{ scroll-behavior: auto; }
  }

  /* ---------- Responsive ---------- */

  /* Large desktop: a bit more breathing room */
  @media (min-width: 1600px){
    .wrap{ max-width: 1240px; }
  }

  /* Tablet */
  @media (max-width: 860px){
    .wrap{ padding: 0 28px; }
    .hero-grid{ grid-template-columns: 1fr; }
    .hero-grid > div:first-child{ order: 2; }
    .photo-wrap{ justify-self: start; order: 1; margin-bottom: 12px; }
    .photo-frame{ width: 180px; height: 225px; }
    .approach-grid{ grid-template-columns: 1fr; }
    .skills-grid{ grid-template-columns: 1fr; gap: 28px; }
    .contact-inner{ grid-template-columns: 1fr; align-items: start; gap: 28px; }
    section{ padding: 64px 0; }

    .navlinks{
      display: flex;
      flex-direction: column;
      position: absolute;
      top: 68px;
      left: 0;
      right: 0;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
      gap: 0;
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.25s ease;
    }
    .navlinks.open{ max-height: 320px; }
    .navlinks a{
      padding: 16px 28px;
      border-top: 1px solid var(--line);
    }
    .nav-toggle{ display: flex; }
  }

  /* Mobile */
  @media (max-width: 640px){
    .wrap{ padding: 0 20px; }
    header.hero{ padding: 40px 0 64px; }
    section{ padding: 52px 0; }
    .hero-cta{ flex-direction: column; align-items: stretch; }
    .hero-cta .btn{ justify-content: center; }
    .photo-frame{ width: 150px; height: 188px; }
    .sticky-note{ left: 0; bottom: -16px; font-size: 10px; padding: 7px 10px; }
    .section-head{ gap: 14px; }
    .tag-note{ transform: none; }
    .approach-card{ padding: 26px 22px 30px; }
    .contact-links a{ font-size: 14px; }
    .foot-meta{ flex-direction: column; align-items: flex-start; gap: 6px; }
    .chip{ font-size: 12px; }
  }

  /* Small mobile */
  @media (max-width: 420px){
    .wordmark{ font-size: 12px; gap: 8px; }
    .wordmark .box{ width: 22px; height: 22px; font-size: 10px; }
    h1.headline{ font-size: clamp(30px, 9vw, 40px); }
    .hero-sub{ font-size: 16px; }
    h2.section-title{ font-size: clamp(24px, 7vw, 30px); }
    h2.contact-title{ font-size: clamp(26px, 8vw, 34px); }
    .photo-frame{ width: 130px; height: 163px; }
    .photo-intro{ font-size: 17px; }
    .btn{ font-size: 12px; padding: 11px 16px; }
  }

  .resume-modal{
    display:none;
    position:fixed;
    inset:0;
    z-index:200;
  }
  .resume-modal.open{ display:block; }
  .resume-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(23,24,28,0.72);
  }
  .resume-modal-content{
    position:absolute;
    top:4%;
    left:50%;
    transform:translateX(-50%);
    width:min(900px, 92vw);
    height:92vh;
    background:var(--paper);
    border-radius:4px;
    overflow:hidden;
    box-shadow:0 20px 60px rgba(0,0,0,0.3);
    display:flex;
    flex-direction:column;
  }
  .resume-modal-header{
    flex:none;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    height:44px;
    background:var(--ink);
    padding:0 10px;
  }
  .resume-modal-close{
    width:30px;
    height:30px;
    border:none;
    border-radius:3px;
    background:transparent;
    color:var(--paper);
    font-size:20px;
    line-height:1;
    cursor:pointer;
  }
  .resume-modal-close:hover{ background:rgba(255,255,255,0.15); }
  #resumeFrame{
    flex:1;
    width:100%;
    border:none;
  }

  /* ---------- Case study cards (home preview + work page) ---------- */
  .cs-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
  }
  .cs-card{
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: opacity 0.6s ease, transform 0.3s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }
  .cs-card:hover{
    transform: translateY(-4px);
    border-color: var(--ink);
    box-shadow: 0 14px 30px rgba(23,24,28,0.07);
  }
  .cs-cover{
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--paper-dim);
  }
  .cs-cover img{
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
  }
  .cs-card:hover .cs-cover img{ transform: scale(1.03); }
  .cs-cover-ph{
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  .cs-yellow .cs-cover-ph{ background: var(--yellow-soft); }
  .cs-coral .cs-cover-ph{ background: var(--coral-soft); }
  .cs-teal .cs-cover-ph{ background: var(--teal-soft); }
  .cs-plum .cs-cover-ph{ background: var(--plum-soft); }
  .cs-ph-num{
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 84px;
    line-height: 1;
    color: rgba(23,24,28,0.22);
  }
  .cs-ph-note{
    position: absolute;
    right: 12px; bottom: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 11px;
    color: var(--ink-soft);
  }
  .cs-cat{
    position: absolute;
    left: 12px; bottom: 12px;
    background: var(--ink);
    color: var(--paper);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 5px 9px;
    border-radius: 2px;
  }
  .cs-body{
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  .cs-meta{
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: var(--ink-soft);
    margin-bottom: 10px;
  }
  .cs-title{
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 24px;
    line-height: 1.2;
    margin: 0 0 10px;
  }
  .cs-summary{
    color: var(--ink-soft);
    font-size: 15px;
    margin: 0 0 20px;
  }
  .cs-cta{
    margin-top: auto;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    border-bottom: 1px solid var(--ink);
    align-self: flex-start;
    padding-bottom: 2px;
  }
  .cs-more{
    display: flex;
    justify-content: center;
    margin-top: 44px;
  }

  /* ---------- Work page ---------- */
  .navlinks a[aria-current="page"]{
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
  }
  section.work-page{
    border-top: none;
    padding-top: 64px;
  }
  h1.page-title{
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 1.1;
    margin: 6px 0 0;
  }
  .page-intro{
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 52ch;
    margin: 0 0 36px;
  }
  .cs-filters{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 36px;
  }
  .cs-filter{
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 14px;
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  }
  .cs-filter:hover{ border-color: var(--ink); }
  .cs-filter[aria-pressed="true"]{
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
  }
  .cs-empty{ color: var(--ink-soft); }

  @media (max-width: 640px){
    .cs-grid{ grid-template-columns: 1fr; gap: 22px; }
    .cs-more{ margin-top: 32px; }
    .cs-more .btn{ width: 100%; justify-content: center; }
    .cs-title{ font-size: 22px; }
  }
  @media (prefers-reduced-motion: reduce){
    .cs-card:hover{ transform: none; }
    .cs-card:hover .cs-cover img{ transform: none; }
  }

  /* ---------- Site grid (matches the Asopalav project canvas, 1920 wide) ----------
     Content column: x 229 -> 1691  (11.93% side margins)
     Divider rules:  x 80  -> 1840  (4.17% inset)
     Every page uses these two values so edges line up across the site. */
  :root{
    --grid-x: max(20px, calc(100% * 229 / 1920));
    --rule-x: max(12px, calc(100% * 80 / 1920));
  }
  .wrap{ max-width: none; padding: 0 var(--grid-x); }
  @media (min-width: 1600px){ .wrap{ max-width: none; } }
  @media (max-width: 860px){ .wrap{ padding: 0 var(--grid-x); } }
  @media (max-width: 640px){ .wrap{ padding: 0 var(--grid-x); } }

  section, footer{ border-top: none; position: relative; }
  section::before, footer::before{
    content: "";
    position: absolute;
    top: 0;
    left: var(--rule-x);
    right: var(--rule-x);
    border-top: 1px solid var(--line);
  }
  section.work-page::before{ display: none; }

  /* ---------- Project grid: fixed columns so rows always fill evenly ----------
     4 across on desktop (homepage shows the first 4 projects), 2 on tablet, 1 on phone. */
  .cs-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  @media (max-width: 1100px){ .cs-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 640px){ .cs-grid{ grid-template-columns: 1fr; gap: 22px; } }
