/* Figma frame "MacBook Pro 16" - 2" (157:209), 1728 × 1117, laid out on 12 columns:
   20 px margins, 16 px gutters, 126 px columns (column i starts at 20 + 142·i).
   On screen the page fills the window: the columns stretch with its width, the rows with its
   height, and text scales by the smaller of the two (--u) so it never outgrows its columns. */
:root{
  --bg:#f1f2ff; --ink:#2336f4; --on-ink:#fff; --copy:#050505;
  --ux:calc(100vw / 1728); --uy:calc(100vh / 1117);
  --u:min(var(--ux), var(--uy));
  --m:calc(20 * var(--ux));                                   /* side margin */
  --g:calc(16 * var(--u));                                    /* gutter */
  --col:calc((100vw - 2 * var(--m) - 11 * var(--g)) / 12);    /* one column */
  --pitch:calc(var(--col) + var(--g));
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--bg);color:var(--ink)}
body{font-family:"Instrument Sans",system-ui,sans-serif;font-weight:500;font-stretch:100%;
  -webkit-font-smoothing:antialiased;line-height:1}
/* Figma tracking is −6 % on every text; set per size so em is that text's own size */
.name,.big,.small{letter-spacing:-.06em}
a{color:inherit;text-decoration:none}
a.u,.u{text-decoration:underline;text-underline-position:from-font;text-decoration-thickness:from-font}
a:hover{opacity:.7}
/* the bunny (assets/cursor.js) is the pointer: no system arrow under it */
.bunny-cursor,.bunny-cursor *{cursor:none!important}
ul{list-style:none}
/* two languages in the page, one shown (assets/lang.js sets <html lang>) */
html[lang=vi] [data-l=en],html:not([lang=vi]) [data-l=vi]{display:none!important}
/* Instrument Sans has no Vietnamese tone marks: Vietnamese text (and Vietnamese names) use Be Vietnam Pro */
[data-l=vi],.vn{font-family:"Be Vietnam Pro",system-ui,sans-serif;letter-spacing:-.045em}
.lang button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;letter-spacing:inherit}
.lang button[aria-pressed=true]{text-decoration:underline;text-underline-position:from-font;text-decoration-thickness:from-font}
.lang button:hover{opacity:.7}

.page{position:relative;width:100%;height:100vh;height:100dvh;overflow:hidden}
.page > *{position:absolute}
.big{font-size:calc(32 * var(--u))}
.small{font-size:calc(16 * var(--u))}
/* all text blue on the page colour, no blocks behind it (owner 12-03) */
.copy{color:var(--ink)}
/* names without a public link yet: shown, not clickable */
.projects .off{opacity:.45;cursor:default}

/* x = column start, width = columns spanned; y = Figma row × --uy */
.name    {left:var(--m);                               top:0;                          width:calc(7 * var(--col) + 6 * var(--g));font-size:calc(96 * var(--u))}
.nav-info{left:calc(var(--m) + 10 * var(--pitch));     top:calc(24 * var(--uy))} /* the column next to the contact link */
/* EN / VI: small, bottom left, on the © line */
.lang    {left:var(--m);                               top:calc(1080 * var(--uy) + 13 * var(--u))}
.mail-icon{width:calc(24 * var(--u));height:calc(24 * var(--u))}

.label-a {left:var(--m);                               top:calc(422 * var(--uy));      width:calc(var(--col) + var(--g))} /* runs through the gutter into the project list, as in Figma */
.projects{left:calc(var(--m) + 1 * var(--pitch));      top:calc(408 * var(--uy));      width:calc(3 * var(--col) + 2 * var(--g));text-align:right}
/* picture: columns 5–9, square, as big as the 5 columns or the rows 411–1080 allow */
.hero{--span:calc(5 * var(--col) + 4 * var(--g)); --side:min(var(--span), 669 * var(--uy))}
.hero    {left:calc(var(--m) + 4 * var(--pitch) + (var(--span) - var(--side)) / 2);
          top:calc(411 * var(--uy));                    width:var(--side);height:var(--side)}
/* a work's social preview (1200 × 630) follows the pointer while it is over the work's name */
.preview {position:fixed;left:0;top:0;z-index:5;width:calc(3 * var(--col) + 2 * var(--g));aspect-ratio:1200 / 630;
          transform:translate3d(var(--x,0px), var(--y,0px), 0) scale(var(--s,.6));transform-origin:0 0;
          opacity:0;transition:opacity .2s;pointer-events:none;will-change:transform}
.preview img{display:block;width:100%;height:100%;object-fit:cover}
.previewing .preview{opacity:1}
.facts   {left:calc(var(--m) + 9 * var(--pitch));      top:calc(408 * var(--uy));      width:calc(3 * var(--col) + 2 * var(--g))}
.label-b {left:calc(var(--m) + 9 * var(--pitch));      top:calc(710 * var(--uy));      width:calc(2 * var(--col) + var(--g))}
/* Figma: 2 columns; the full award names need 3 */
.awards  {left:calc(var(--m) + 9 * var(--pitch));      top:calc(710 * var(--uy) + 48 * var(--u)); width:calc(3 * var(--col) + 2 * var(--g));text-align:right}
.copy    {left:calc(var(--m) + 9 * var(--pitch));      top:calc(1080 * var(--uy))}

/* Info page: the bio takes the project list's place, services the facts', links the awards' */
.bio     {left:calc(var(--m) + 1 * var(--pitch));      top:calc(408 * var(--uy));      width:calc(3 * var(--col) + 2 * var(--g))}
/* the long bio keeps the project list's 3 columns, set smaller to read; the page scrolls when it runs long */
.page.scroll{height:auto;min-height:100vh;min-height:100dvh;overflow:visible}
.bio.long{font-size:calc(24 * var(--u));line-height:1.2;letter-spacing:-.03em}
.bio.long p + p{margin-top:.7em}
.bio.long [data-l=vi]{letter-spacing:-.025em}
.links   {left:calc(var(--m) + 9 * var(--pitch));      top:calc(710 * var(--uy) + 48 * var(--u)); width:calc(3 * var(--col) + 2 * var(--g));text-align:right}

/* ?grid (or the G key) shows the 12 columns over the page */
.grid-overlay{position:fixed;inset:0 var(--m);display:none;grid-template-columns:repeat(12,1fr);column-gap:var(--g);pointer-events:none;z-index:9}
.grid-overlay i{background:rgba(255,0,80,.08);border-inline:1px solid rgba(255,0,80,.25)}
.show-grid .grid-overlay{display:grid}

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

/* phones and narrow windows: the same blocks, one under the other */
@media (max-width: 820px){
  :root{--u:1px;--ux:1px;--uy:1px}
  .grid-overlay{display:none!important}
  .preview{display:none}
  .page{height:auto;overflow:visible;padding:16px 16px 24px;display:grid;gap:28px;grid-template-columns:1fr auto}
  .page > *{position:static;width:auto}
  .name{grid-column:1 / -1;font-size:clamp(36px,11.4vw,96px)} /* "Creative Developer" stays on one line */
  .big{font-size:24px}
  .small{font-size:14px}
  .top{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;justify-content:space-between;order:-1} /* Info left, LinkedIn right */
  .hero{grid-column:1 / -1;width:100%;aspect-ratio:1;height:auto}
  .label-a,.label-b{grid-column:1 / -1}
  .projects,.facts,.awards,.bio,.links{grid-column:1 / -1;text-align:left}
  .bio.long{font-size:17px;width:auto}
  .label-a{order:1}.projects,.bio{order:2}.facts{order:3}.label-b{order:4}.awards,.links{order:5}.copy{order:6}
  .lang{order:7;grid-column:1 / -1}
  .contact{display:flex;gap:10px;align-items:center}
  .mail-icon{width:20px;height:20px}
  .mail{text-align:left}
  /* blue blocks hug their text, each label sits right on top of its list (as in Figma) */
  .label-a,.label-b,.projects,.awards,.bio,.links{justify-self:start}
  .label-a,.label-b{margin-bottom:-4px}   /* 24 px above its list (the grid gap is 28) */
}
/* on wide screens the nav items are placed one by one, so their wrapper does not box them */
@media (min-width: 821px){
  .top{display:contents} .top > *{position:absolute}
  /* EN / VI and © stay on the window's bottom line while a long page (Info) scrolls */
  .page > .lang,.page > .copy{position:fixed;z-index:4}
  /* icon sits just before the contact link, whatever its length */
  .contact{right:var(--m);top:calc(24 * var(--uy));display:flex;align-items:center;gap:calc(14 * var(--u))}
  .contact > *{position:static;width:auto}
}
