/* =========================================================
   Fugu Portfolio - shared styles
   index.html / projects.html / principles.html / links.html

   このファイルは「サイト共通」の見た目だけを管理します。
   Principles 固有の見た目は principles.css にあります。

   1. TOKENS / BASE
   2. HEADER
   3. HOME HERO
   4. SECTIONS
   5. CONTRIBUTIONS
   6. IMAGE GALLERY
   7. INNER PAGE HERO
   8. LINKS
   9. FOOTER
   10. RESPONSIVE
   ========================================================= */

/* 1. TOKENS / BASE */
:root{
  --bg:#f7f7f3;
  --paper:#ffffff;
  --ink:#17181c;
  --muted:#6f747d;
  --line:#dfe1e4;
  --red:#ef5a52;
  --blue:#5f7ee7;
  --cyan:#72cbd0;
  --yellow:#f6d267;
  --purple:#a98ae8;
  --pink:#e98bb7;
  --green-0:#ebedf0;
  --green-1:#9be9a8;
  --green-2:#40c463;
  --green-3:#30a14e;
  --green-4:#216e39;
  --shell:1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth;overflow-x:clip}
body{
  margin:0;
  min-width:0;
  min-height:100vh;
  background:var(--bg);
  color:var(--ink);
  font-family:"Hiragino Sans","Yu Gothic UI","Yu Gothic","Meiryo",system-ui,-apple-system,sans-serif;
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
}
main{min-width:0}
a{color:inherit}
img{display:block;max-width:100%;height:auto}
button,input{font:inherit}
.shell{width:min(var(--shell),calc(100% - 48px));margin:0 auto;min-width:0}

/* Grid / flex children may otherwise keep their min-content width and push the page sideways. */
.header-inner>*,
.hero>*,
.section-head>*,
.promo-grid>*,
.project-gallery>*,
.links-grid>*,
.footer-inner>*{min-width:0}

/* 2. HEADER */
.portfolio-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(247,247,243,.94);
  border-bottom:1px solid rgba(23,24,28,.08);
  backdrop-filter:blur(12px);
}
.header-inner{
  min-height:70px;
  display:flex;
  align-items:center;
  gap:28px;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:5px;
  flex:0 0 auto;
  text-decoration:none;
  font-weight:800;
  letter-spacing:-.035em;
  white-space:nowrap;
}
.brand-ja,.brand-en{display:inline-block}
.brand-slash{
  display:inline-block;
  margin:0 1px;
  color:var(--blue);
  font-size:1.15em;
  font-weight:500;
  line-height:1;
  transform:rotate(7deg);
  transform-origin:center;
  transition:transform .18s ease;
}
.brand:hover .brand-slash{transform:rotate(-5deg) scale(1.08)}

.portfolio-nav{
  margin-left:auto;
  display:flex;
  min-width:0;
  gap:7px;
  align-items:center;
}
.portfolio-nav a{
  min-width:0;
  text-decoration:none;
  font-size:.86rem;
  font-weight:700;
  padding:8px 12px;
  border-radius:12px;
  color:#50545c;
  white-space:nowrap;
  transition:background .16s ease,color .16s ease,transform .16s ease;
}
.portfolio-nav a:hover{background:#fff;color:var(--ink);transform:translateY(-1px)}
.portfolio-nav a[aria-current="page"]{background:var(--ink);color:#fff}

.header-support{
  display:flex;
  align-items:center;
  gap:7px;
  margin-left:8px;
  flex:0 0 auto;
}
.header-support-link{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:0 11px;
  border:1px solid #d9dbe0;
  border-radius:12px;
  background:#fff;
  color:#3f434a;
  text-decoration:none;
  font-size:.75rem;
  font-weight:800;
  white-space:nowrap;
  transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.header-support-link:hover{
  transform:translateY(-1px);
  border-color:#bfc2c8;
  box-shadow:0 6px 14px rgba(23,24,28,.07);
}
.header-support-mark{font-size:.9rem;line-height:1}
.header-support-marshmallow{background:#fff7fb;border-color:#ead9e4}
.header-support-sponsors{background:#f7f5ff;border-color:#ded8f0}

.menu-toggle{display:none}

/* 3. HOME HERO */
.hero{
  min-height:570px;
  padding:60px 0 68px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:clamp(40px,5vw,64px);
  align-items:center;
}
.hero-copy{max-width:780px;min-width:0}
.hero-intro{min-width:0}
.eyebrow{
  display:block;
  margin:0 0 12px;
  color:#70757d;
  font-size:.76rem;
  font-weight:750;
  letter-spacing:.06em;
}
.hero h1{
  margin:0;
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:.04em;
  font-size:clamp(3.7rem,7.2vw,6.3rem);
  line-height:.94;
  letter-spacing:-.065em;
  font-weight:900;
}
.hero h1>span{
  min-width:0;
  flex:0 0 auto;
  white-space:nowrap;
}
.name-ja{font-weight:800}
.name-slash{
  color:var(--blue);
  font-weight:400;
  transform:rotate(7deg);
  display:inline-block;
  margin:0 .03em;
}
.hero-lead{
  margin:24px 0 0;
  font-size:clamp(1.4rem,2vw,1.8rem);
  line-height:1.45;
  font-weight:800;
  letter-spacing:-.035em;
}
.hero-text{
  max-width:720px;
  margin:14px 0 0;
  color:#555b64;
  font-size:1.02rem;
  line-height:1.9;
  overflow-wrap:anywhere;
}
.tag-row{display:flex;flex-wrap:wrap;gap:7px;margin-top:22px;min-width:0}
.tag-row span{
  max-width:100%;
  background:#fff;
  border:1px solid #dedfe2;
  border-radius:14px;
  padding:6px 11px;
  font-size:.76rem;
  font-weight:700;
  color:#555a62;
  overflow-wrap:anywhere;
}
.hero-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:22px;min-width:0}
.button{
  min-width:0;
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:0 17px;
  border:1px solid #cfd1d5;
  border-radius:16px;
  text-decoration:none;
  font-size:.86rem;
  font-weight:800;
  text-align:center;
  transition:transform .14s ease,box-shadow .14s ease,background .14s ease;
}
.button-primary{background:var(--ink);border-color:var(--ink);color:#fff}
.button-ghost{background:#fff;border-color:#d6d8dc;color:var(--ink)}
.button:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(23,24,28,.08)}
.button:active{transform:translateY(0);box-shadow:none}

.hero-visual{display:grid;place-items:center;min-width:0}
.avatar-card{
  position:relative;
  width:304px;
  max-width:100%;
  min-height:356px;
  padding:30px 28px 25px;
  background:#fff;
  border:1px solid #d7d9dd;
  border-radius:30px;
  box-shadow:8px 8px 0 #e8e8e3;
  transform:rotate(.7deg);
}
.avatar-card img{
  width:246px;
  max-width:100%;
  height:auto;
  aspect-ratio:1;
  object-fit:cover;
  border-radius:50%;
  border:1px solid #d2d5da;
  background:#eef2ff;
}
.avatar-label{margin-top:19px;display:flex;align-items:flex-end;justify-content:space-between;gap:12px;min-width:0}
.avatar-label strong{min-width:0;font-size:1.08rem;letter-spacing:-.03em;overflow-wrap:anywhere}
.avatar-label span{min-width:0;font-size:.7rem;color:#777c84;letter-spacing:.04em;text-align:right}
.shape{position:absolute;display:block;border:0;opacity:.95}
.shape-yellow{width:46px;height:46px;right:-16px;top:42px;border-radius:50%;background:var(--yellow)}
.shape-blue{width:29px;height:29px;left:-12px;bottom:64px;border-radius:9px;background:var(--blue);transform:rotate(18deg)}
.shape-red{width:18px;height:60px;right:15px;bottom:-23px;border-radius:999px;background:var(--red);transform:rotate(38deg)}

/* 4. SECTIONS */
.section{padding:70px 0}
.section-plain{background:#fff;border-top:1px solid #ecece8;border-bottom:1px solid #ecece8}
.section-tint{background:var(--bg)}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:26px}
.section-kicker{
  margin:0 0 3px;
  color:#777c84;
  font-size:.71rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.section-head h2{
  margin:0;
  font-size:clamp(1.9rem,3.3vw,2.8rem);
  line-height:1.05;
  letter-spacing:-.045em;
  overflow-wrap:anywhere;
}
.text-link{
  flex:0 0 auto;
  font-size:.84rem;
  font-weight:800;
  text-decoration:none;
  border-bottom:1px solid #aaaeb5;
  padding-bottom:2px;
}
.text-link:hover{border-color:var(--ink)}

/* 5. CONTRIBUTIONS */
.contribution-panel{
  min-width:0;
  border:1px solid #d8dbe0;
  border-radius:20px;
  background:#fff;
  padding:20px 20px 16px;
}
.contribution-summary{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 8px;margin-bottom:15px;min-width:0}
.contribution-summary strong{font-size:1.5rem;letter-spacing:-.04em}
.contribution-summary span{min-width:0;color:#666b74;font-size:.88rem;overflow-wrap:anywhere}
.contribution-scroll{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  min-height:126px;
  display:flex;
  align-items:flex-start;
  padding:0 2px 8px;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}
.contribution-calendar{
  min-height:116px;
  min-width:830px;
  display:grid;
  grid-template-columns:30px 1fr;
  grid-template-rows:18px auto;
  gap:5px 8px;
}
.contribution-months{
  grid-column:2;
  grid-row:1;
  display:grid;
  grid-template-columns:repeat(var(--week-count),12px);
  column-gap:3px;
  height:18px;
  font-size:10px;
  color:#596069;
  line-height:1;
}
.contribution-months span{white-space:nowrap;transform:translateY(1px)}
.contribution-weekdays{
  grid-column:1;
  grid-row:2;
  display:grid;
  grid-template-rows:repeat(7,12px);
  row-gap:3px;
  font-size:10px;
  color:#596069;
  line-height:12px;
}
.contribution-weekdays span:nth-child(1){grid-row:2}
.contribution-weekdays span:nth-child(2){grid-row:4}
.contribution-weekdays span:nth-child(3){grid-row:6}
.contribution-days{
  grid-column:2;
  grid-row:2;
  display:grid;
  grid-template-rows:repeat(7,12px);
  grid-auto-flow:column;
  grid-auto-columns:12px;
  gap:3px;
}
.contribution-day{
  width:12px;
  height:12px;
  border-radius:3px;
  background:var(--green-0);
  outline:1px solid rgba(27,31,36,.04);
}
.contribution-day[data-level="1"]{background:var(--green-1)}
.contribution-day[data-level="2"]{background:var(--green-2)}
.contribution-day[data-level="3"]{background:var(--green-3)}
.contribution-day[data-level="4"]{background:var(--green-4)}
.contribution-day.is-empty{visibility:hidden}
.contribution-legend{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:4px;margin-top:10px;font-size:10px;color:#656b73}
.contribution-legend i{width:11px;height:11px;border-radius:2px;background:var(--green-0)}
.contribution-legend i[data-level="1"]{background:var(--green-1)}
.contribution-legend i[data-level="2"]{background:var(--green-2)}
.contribution-legend i[data-level="3"]{background:var(--green-3)}
.contribution-legend i[data-level="4"]{background:var(--green-4)}
.contribution-error{padding:24px;color:#747982;font-size:.9rem}

/* 6. IMAGE GALLERY */
.promo-grid,.project-gallery{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
}
.image-card{
  min-width:0;
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:28px;
  background:#fff;
  border:1px solid #dfe1e4;
  text-decoration:none;
  box-shadow:none;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.image-card:hover{
  transform:translateY(-4px);
  border-color:#b9bcc2;
  box-shadow:0 10px 24px rgba(23,24,28,.07);
}
.image-card img{
  width:100%;
  aspect-ratio:16/9;
  object-fit:contain;
  background:#f1f2ee;
}
.image-card-caption{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-width:0;
  padding:14px 17px 15px;
  font-weight:800;
}
.image-card-caption span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.image-card-arrow{flex:0 0 auto;font-size:1.2rem}
.gallery-loading,.gallery-empty{
  grid-column:1/-1;
  min-width:0;
  min-height:200px;
  display:grid;
  place-items:center;
  text-align:center;
  border:1px dashed #c9ccd1;
  border-radius:24px;
  color:#777c84;
  background:#fff;
  padding:28px;
  font-size:.9rem;
  overflow-wrap:anywhere;
}
.local-preview-note{gap:8px}

/* 7. INNER PAGE HERO */
.compact-hero{
  position:relative;
  padding:64px 0 34px;
  border-bottom:1px solid #dedfda;
}
.compact-hero h1{
  margin:0;
  max-width:100%;
  font-size:clamp(2.8rem,5.2vw,4.6rem);
  line-height:1;
  letter-spacing:-.055em;
  font-weight:850;
  text-wrap:balance;
  overflow-wrap:anywhere;
}
.projects-section,.links-section{padding-top:38px}

/* 8. LINKS */
.links-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
.link-card{
  --card-accent:var(--cyan);
  min-width:0;
  min-height:235px;
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:28px 32px;
  background:#fff;
  border:1px solid #dfe1e4;
  border-radius:28px;
  text-decoration:none;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.link-card:hover{
  transform:translateY(-4px);
  border-color:#b9bcc2;
  box-shadow:0 10px 24px rgba(23,24,28,.07);
}
.link-index{position:absolute;left:32px;top:26px;font-size:.72rem;font-weight:800;color:#a1a6ad}
.link-arrow{position:absolute;right:29px;top:22px;font-size:1.45rem}
.link-card h2{
  position:relative;
  z-index:2;
  max-width:100%;
  margin:0 0 10px;
  font-size:clamp(1.65rem,2.7vw,2rem);
  line-height:1.05;
  letter-spacing:-.05em;
  overflow-wrap:anywhere;
}
.link-card p{
  position:relative;
  z-index:2;
  margin:0;
  color:#767b84;
  font-size:.92rem;
  max-width:min(72%,430px);
  overflow-wrap:anywhere;
}
.link-shape{
  position:absolute;
  right:-20px;
  bottom:-28px;
  width:145px;
  height:112px;
  border-radius:76px 0 0 0;
  background:var(--card-accent);
  transition:transform .18s ease;
}
.link-card:hover .link-shape{transform:scale(1.08)}
.link-blue{--card-accent:var(--blue)}
.link-yellow{--card-accent:var(--yellow)}
.link-red{--card-accent:#ef7970}
.link-purple{--card-accent:var(--purple)}
.link-pink{--card-accent:var(--pink)}

/* 9. FOOTER */
.portfolio-footer{border-top:1px solid #dedfda;background:#f0f0eb}
.footer-inner{
  min-height:92px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  color:#777c84;
  font-size:.78rem;
}
.footer-mark{font-weight:800;color:#535861}

/* 10. RESPONSIVE */
@media (max-width:1100px){
  .header-inner{gap:18px}
  .portfolio-nav{gap:2px}
  .portfolio-nav a{padding-left:8px;padding-right:8px;font-size:.82rem}
  .header-support{gap:4px;margin-left:2px}
  .header-support-link{padding:0 8px;font-size:.69rem}
}

@media (max-width:920px){
  .hero{grid-template-columns:1fr;gap:40px;padding-top:50px}
  .hero-copy{max-width:760px}
  .hero-visual{justify-content:start}
  .promo-grid,.project-gallery,.links-grid{grid-template-columns:1fr}
}

/* Inner pages / common small-screen layout */
@media (max-width:680px){
  .shell{width:min(100% - 28px,var(--shell))}
  .section{padding:56px 0}
  .section-head{align-items:flex-start;flex-direction:column;gap:14px;margin-bottom:24px}
  .section-head h2{font-size:clamp(1.8rem,8vw,2.35rem)}
  .text-link{flex:0 1 auto}
  .contribution-panel{padding:18px 14px 14px}
  .contribution-calendar{min-width:780px}
  .compact-hero{padding:50px 0 28px}
  .compact-hero h1{font-size:clamp(2.25rem,11vw,3.25rem)}
  .links-grid{gap:14px}
  .link-card{min-height:196px;padding:24px}
  .link-index{left:24px;top:23px}
  .link-arrow{right:23px;top:18px}
  .link-card h2{font-size:clamp(1.55rem,8vw,1.9rem)}
  .link-card p{max-width:78%;font-size:.9rem}
  .link-shape{right:-24px;bottom:-30px;width:122px;height:94px}
  .footer-inner{
    min-height:82px;
    align-items:flex-start;
    justify-content:center;
    flex-direction:column;
    padding:20px 0;
  }
}

/* Mobile header + home hero.
   名前とリード文を .hero-intro でひとまとまりにし、
   右側のプロフィールカードの高さに行間が引っ張られない構造にします。 */
@media (max-width:760px){
  .portfolio-header{backdrop-filter:blur(16px)}
  .header-inner{
    min-height:64px;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:0;
    padding:6px 0;
  }
  .brand{min-height:46px;font-size:.95rem}

  .menu-toggle{
    margin-left:auto;
    width:46px;
    height:46px;
    display:inline-grid;
    place-items:center;
    flex:0 0 46px;
    padding:0;
    border:1px solid #d9dbe0;
    border-radius:15px;
    background:#fff;
    color:var(--ink);
    cursor:pointer;
  }
  .menu-toggle-lines,
  .menu-toggle-lines::before,
  .menu-toggle-lines::after{
    width:19px;
    height:2px;
    display:block;
    position:relative;
    border-radius:999px;
    background:currentColor;
    transition:transform .18s ease,opacity .18s ease;
  }
  .menu-toggle-lines::before,
  .menu-toggle-lines::after{
    content:"";
    position:absolute;
    left:0;
  }
  .menu-toggle-lines::before{top:-6px}
  .menu-toggle-lines::after{top:6px}
  .header-inner.is-menu-open .menu-toggle{
    background:var(--ink);
    color:#fff;
    border-color:var(--ink);
  }
  .header-inner.is-menu-open .menu-toggle-lines{background:transparent}
  .header-inner.is-menu-open .menu-toggle-lines::before{top:0;transform:rotate(45deg)}
  .header-inner.is-menu-open .menu-toggle-lines::after{top:0;transform:rotate(-45deg)}

  .portfolio-nav{
    order:3;
    width:100%;
    margin:6px 0 0;
    padding:10px 0 4px;
    display:none;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    overflow:visible;
    border-top:1px solid rgba(23,24,28,.08);
  }
  .header-inner.is-menu-open .portfolio-nav{display:grid}
  .portfolio-nav a{
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:8px 10px;
    border:1px solid #e0e1e4;
    border-radius:14px;
    background:#fff;
    color:#4f545c;
    font-size:.82rem;
    text-align:center;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .portfolio-nav a[aria-current="page"]{
    border-color:var(--ink);
    background:var(--ink);
    color:#fff;
  }

  .header-support{
    order:4;
    width:100%;
    margin:7px 0 3px;
    padding:0 0 6px;
    display:none;
    gap:7px;
  }
  .header-inner.is-menu-open .header-support{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .header-support-link{
    min-width:0;
    min-height:42px;
    padding:0 10px;
    border-radius:13px;
    font-size:.76rem;
  }

  .hero{
    min-height:auto;
    display:grid;
    grid-template-columns:minmax(0,1fr) clamp(116px,25vw,150px);
    column-gap:clamp(12px,3vw,18px);
    row-gap:0;
    align-items:start;
    padding:36px 0 50px;
  }
  .hero-copy{display:contents}
  .hero .eyebrow{
    grid-column:1/-1;
    grid-row:1;
    margin:0 0 16px;
  }
  .hero-intro{
    grid-column:1;
    grid-row:2;
    align-self:start;
    min-width:0;
  }
  .hero h1{
    flex-wrap:nowrap;
    gap:.03em;
    font-size:clamp(2.45rem,9vw,3.6rem);
    line-height:.98;
    letter-spacing:-.065em;
    white-space:nowrap;
  }
  .hero-lead{
    margin:14px 0 0;
    font-size:clamp(1.08rem,4.2vw,1.35rem);
    line-height:1.45;
  }
  .hero-visual{
    grid-column:2;
    grid-row:2;
    align-self:start;
    justify-self:stretch;
  }
  .avatar-card{
    width:100%;
    max-width:150px;
    min-height:0;
    padding:clamp(10px,2.1vw,14px) clamp(9px,1.9vw,13px) clamp(9px,1.9vw,12px);
    border-radius:22px;
    box-shadow:5px 5px 0 #e8e8e3;
    transform:rotate(.5deg);
  }
  .avatar-card img{
    width:100%;
    height:auto;
    aspect-ratio:1;
    object-fit:cover;
  }
  .avatar-label{margin-top:9px;align-items:center;gap:4px}
  .avatar-label strong{font-size:.62rem}
  .avatar-label span{font-size:.43rem;letter-spacing:.01em}
  .shape-yellow{width:28px;height:28px;right:-9px;top:22px}
  .shape-blue{width:18px;height:18px;left:-7px;bottom:32px;border-radius:6px}
  .shape-red{width:12px;height:38px;right:7px;bottom:-14px}

  .hero-text{
    grid-column:1/-1;
    margin-top:22px;
    max-width:none;
    font-size:.96rem;
    line-height:1.95;
  }
  .hero-text+.hero-text{margin-top:14px}
  .tag-row{grid-column:1/-1;margin-top:22px}
  .tag-row span{font-size:.76rem;padding:6px 11px}
  .hero-actions{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:minmax(0,1.35fr) minmax(0,.95fr);
    gap:9px;
    margin-top:22px;
  }
  .button{width:100%;padding:0 12px;font-size:.82rem;white-space:nowrap}
}

/* Ordinary phones keep the two-column composition. The intro remains internally stacked,
   so only the whole block and card resize; the lead can never be pushed down by the card. */
@media (max-width:520px){
  .hero{
    grid-template-columns:minmax(0,1fr) clamp(104px,26vw,128px);
    column-gap:clamp(10px,3vw,14px);
    padding-top:32px;
  }
  .hero h1{font-size:clamp(2.15rem,9vw,2.9rem)}
  .hero-lead{
    font-size:clamp(1rem,4vw,1.15rem);
    margin-top:12px;
  }
  .avatar-label{margin-top:8px}
  .avatar-label strong{font-size:.57rem}
  .avatar-label span{display:none}
}

@media (max-width:420px){
  .shell{width:min(100% - 24px,var(--shell))}
  .hero{
    grid-template-columns:minmax(0,1fr) clamp(96px,27vw,112px);
    column-gap:10px;
    padding-top:30px;
  }
  .hero .eyebrow{margin-bottom:13px}
  .hero h1{font-size:clamp(2.05rem,9.5vw,2.5rem)}
  .hero-lead{font-size:.98rem;margin-top:10px}
  .avatar-card{
    border-radius:18px;
    box-shadow:4px 4px 0 #e8e8e3;
  }
  .avatar-label{margin-top:7px;justify-content:flex-start}
  .avatar-label strong{font-size:.54rem}
  .shape-yellow{width:23px;height:23px;right:-7px;top:18px}
  .shape-blue{width:15px;height:15px;left:-6px;bottom:27px}
  .shape-red{width:10px;height:32px;right:6px;bottom:-12px}
  .hero-text{margin-top:20px;font-size:.94rem}
  .hero-actions{grid-template-columns:1fr}
  .button{white-space:normal;padding:8px 12px}
  .link-card{min-height:184px;padding:22px}
  .link-index{left:22px}
  .link-arrow{right:21px}
  .link-card p{max-width:82%}
  .link-shape{right:-28px;bottom:-31px;width:108px;height:84px}
}

@media (max-width:350px){
  .shell{width:min(100% - 20px,var(--shell))}
  .hero{grid-template-columns:minmax(0,1fr) 92px;column-gap:9px}
  .hero h1{font-size:clamp(1.95rem,9.4vw,2.2rem)}
  .hero-lead{font-size:.92rem}
  .avatar-card{padding:8px 7px 7px}
  .avatar-label strong{font-size:.5rem}
  .portfolio-nav{grid-template-columns:1fr}
  .header-inner.is-menu-open .header-support{grid-template-columns:1fr}
}

/* Only extremely narrow embedded views stack the card. 320px-class phones stay aligned. */
@media (max-width:300px){
  .hero{grid-template-columns:1fr}
  .hero .eyebrow{grid-column:1;grid-row:1}
  .hero-intro{grid-column:1;grid-row:2}
  .hero h1{font-size:2rem}
  .hero-visual{
    grid-column:1;
    grid-row:3;
    width:104px;
    justify-self:start;
    margin-top:18px;
  }
}

@media (prefers-reduced-motion:reduce){
  *{scroll-behavior:auto!important;transition:none!important}
}
