/* aldin.fontied.com: built from the Figma "Develop" page (dark original-CV style), plus a light theme. */
:root {
  --bg: #000000; --fg: #ffffff; --grey: #aaaaaa; --label: #adadad; --date: #b3b3b3; --contact: #cccccc;
  --chip: #1a1a1a; --div: #171717; --rule: rgba(255,255,255,.12); --ph: #111111; --ph-line: rgba(255,255,255,.08);
  --mid: #6b6b6b; --btn-bg: #ffffff; --btn-fg: #000000; --outline: rgba(255,255,255,.2); --glass: rgba(0,0,0,.6);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fbfbfa; --fg: #0b0b0b; --grey: #5e5e5c; --label: #6f6f6c; --date: #737370; --contact: #333331;
  --chip: #efefed; --div: #e9e9e6; --rule: rgba(0,0,0,.1); --ph: #f1f1ef; --ph-line: rgba(0,0,0,.05);
  --mid: #9a9a96; --btn-bg: #0b0b0b; --btn-fg: #ffffff; --outline: rgba(0,0,0,.16); --glass: rgba(251,251,250,.7);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.5 "Inter", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased;
  transition: background-color .5s ease, color .5s ease; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg.i { width: 16px; height: 16px; flex: none; }

/* Layout: sticky CV sidebar + content column, divider between */
.shell { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 100vh; }
.side { min-width: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--div);
  padding: 56px 40px 40px; display: flex; flex-direction: column; gap: 32px; scrollbar-width: none;
  transition: border-color .5s ease; }
.side::-webkit-scrollbar { display: none; }
.main { padding: 56px 80px 64px; display: flex; flex-direction: column; gap: 96px; max-width: 1080px; min-width: 0; }

/* Sidebar */
.ph.photo { width: 112px; height: 112px; flex: none; }
.ph.photo figcaption small { display: none; }
.name { font-weight: 600; font-size: 24px; line-height: 30px; letter-spacing: -0.033em; margin: 0; }
.bio { color: var(--grey); font-size: 15px; line-height: 24px; margin: 0; max-width: 280px; }
.bio b { color: var(--fg); font-weight: 400; }
.contacts { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.contacts a { font-weight: 500; font-size: 13px; line-height: 18px; color: var(--contact); width: fit-content; transition: color .2s; }
.contacts a:hover { color: var(--fg); }
.chip { background: var(--chip); padding: 7px 10px; font-weight: 600; font-size: 13px; line-height: 18px; letter-spacing: -0.02em; transition: background-color .5s ease; }
.list { list-style: none; margin: 0; padding: 6px 0 0 8px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 20px; }
.list .soft { color: var(--grey); }
.group { display: flex; flex-direction: column; gap: 12px; }
.side-top { display: flex; align-items: center; justify-content: space-between; }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--grey); font-size: 15px; line-height: 20px; transition: color .2s, gap .3s; }
.back:hover { color: var(--fg); gap: 10px; }
.case-id { display: flex; flex-direction: column; gap: 8px; }
.next { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; width: fit-content; }
.next svg { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.next:hover svg { transform: translateX(3px); }

/* Theme toggle */
.theme { appearance: none; border: 1px solid var(--outline); background: transparent; color: var(--fg); width: 36px; height: 36px;
  border-radius: 999px; display: grid; place-items: center; cursor: pointer; transition: border-color .3s, transform .3s; }
.theme:hover { transform: rotate(-12deg); }
.theme .sun { display: none; } :root[data-theme="light"] .theme .sun { display: block; } :root[data-theme="light"] .theme .moon { display: none; }

/* Type */
.label { font-weight: 500; font-size: 13px; line-height: 20px; letter-spacing: .1em; text-transform: uppercase; color: var(--label); margin: 0; }
h1 { font-weight: 600; font-size: clamp(40px, 5.2vw, 64px); line-height: 1.06; letter-spacing: -0.033em; margin: 0; max-width: 880px; text-wrap: balance; }
h1.case { font-size: clamp(36px, 4.6vw, 56px); max-width: 900px; }
h2 { font-weight: 600; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; letter-spacing: -0.03em; margin: 0; max-width: 820px; text-wrap: balance; }
h3 { font-weight: 500; font-size: 28px; line-height: 34px; letter-spacing: -0.02em; margin: 0; }
.lead { color: var(--grey); font-size: 18px; line-height: 28px; margin: 0; max-width: 640px; }
.copy { font-size: 18px; line-height: 29px; margin: 0; max-width: 760px; }
.body { color: var(--grey); font-size: 16px; line-height: 25px; margin: 0; max-width: 640px; }
.block { display: flex; flex-direction: column; gap: 16px; }
.hero { display: flex; flex-direction: column; gap: 24px; }

/* Bullets with dots, as in the CV */
.dots { list-style: none; margin: 0; padding: 6px 0 0; display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.dots li { position: relative; padding-left: 14px; color: var(--grey); font-size: 15px; line-height: 23px; }
.dots li::before { content: ""; position: absolute; left: 0; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: var(--grey); }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 0 16px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: 15px; line-height: 20px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background-color .3s, box-shadow .35s; }
.btn.solid { background: var(--btn-bg); color: var(--btn-fg); }
.btn.ghost { box-shadow: inset 0 0 0 1px var(--outline); }
.btn:hover { transform: translateY(-1px); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--fg); }

/* Image slots: empty placeholders until a file exists in /img */
.ph { position: relative; width: 100%; background: var(--ph); border-radius: 8px; box-shadow: 0 0 0 1px var(--ph-line);
  display: grid; place-items: center; overflow: hidden; margin: 0; transition: background-color .5s ease; }
.ph figcaption { text-align: center; color: var(--mid); font-weight: 500; font-size: 13px; line-height: 18px; }
.ph figcaption small { display: block; font-weight: 400; font-size: 12px; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: blur(16px); transform: scale(1.03);
  transition: opacity .9s ease, filter .9s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.ph img.ok { opacity: 1; filter: none; transform: none; }
.ph.round { border-radius: 50%; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.stat { border-top: 1px solid var(--rule); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.stat b { font-weight: 600; font-size: 36px; line-height: 42px; letter-spacing: -0.03em; }
.stat span { color: var(--grey); font-size: 14px; line-height: 21px; }

/* Case cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
.card { display: flex; flex-direction: column; gap: 12px; }
.card .ph { aspect-ratio: 448 / 300; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .6s ease, background-color .5s ease; }
.card:hover .ph { transform: scale(1.012); }
.grid:has(.card:hover) .card:not(:hover) { filter: blur(1.5px); opacity: .55; }
.card { transition: filter .5s ease, opacity .5s ease; }
.meta { color: var(--date); font-size: 12px; line-height: 16px; padding-top: 8px; }
.card h3 { font-size: 20px; line-height: 26px; }
.card p { margin: 0; color: var(--grey); font-size: 15px; line-height: 23px; }
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; line-height: 20px; padding-top: 4px; }
.more svg { width: 14px; height: 14px; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.card:hover .more svg { transform: translateX(3px); }

/* Experience */
.jobs { display: flex; flex-direction: column; gap: 40px; }
.job { display: flex; flex-direction: column; gap: 8px; }
.job time { color: var(--date); font-size: 13px; line-height: 18px; }
.job h3 { font-size: 20px; line-height: 28px; }

/* Case features and scope */
.feature { display: flex; flex-direction: column; gap: 16px; }
.feature .num { color: var(--date); font-size: 13px; line-height: 18px; margin: 0; }
.feature .ph { margin-top: 12px; aspect-ratio: 920 / 540; }
.scope { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.scope .col { display: flex; flex-direction: column; gap: 12px; }
.scope ul { list-style: none; margin: 0; padding: 4px 0 0 8px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 20px; }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding-top: 20px; margin-top: 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--mid); font-size: 13px; line-height: 20px; }

/* Scroll fade: page-colour band over the content column, progressive blur underneath; shows once scrolled */
.fade { position: fixed; z-index: 5; top: 0; left: 360px; right: 0; height: 287px; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
.fade::before { content: ""; position: absolute; inset: 0; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.6) 40%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.6) 40%, transparent 100%); }
.fade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%); transition: background .5s ease; }
body.scrolled .fade { opacity: 1; }

/* Motion: content resolves out of a soft blur as it enters */
.rv { opacity: 0; filter: blur(10px); transform: translateY(14px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), filter .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0ms); will-change: opacity, filter, transform; }
.rv.in { opacity: 1; filter: blur(0); transform: none; }
html:not(.js) .rv { opacity: 1; filter: none; transform: none; }
body.leaving .shell { opacity: 0; filter: blur(8px); transition: opacity .28s ease, filter .28s ease; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }
::view-transition-old(root) { animation-name: vt-out; }
::view-transition-new(root) { animation-name: vt-in; }
@keyframes vt-out { to { opacity: 0; filter: blur(6px); } }
@keyframes vt-in { from { opacity: 0; filter: blur(6px); } }

/* Mobile: sidebar becomes a top block, a glass bar keeps name + toggle */
.bar { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--div);
    padding: 88px max(20px, env(safe-area-inset-right, 0px)) 40px max(20px, env(safe-area-inset-left, 0px)); }
  .side .theme.desk { display: none; }
  .main { padding: 48px max(20px, env(safe-area-inset-right, 0px)) 48px max(20px, env(safe-area-inset-left, 0px)); gap: 72px; }
  .fade { left: 0; height: 180px; }
  .bar { display: flex; position: fixed; z-index: 10; inset: 0 0 auto; align-items: center; justify-content: space-between;
    padding: calc(12px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px));
    background: var(--glass); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border-bottom: 1px solid var(--div); }
  .bar a { font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side .list:not(.edu) { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
  .side { gap: 28px; }
  body { overflow-x: clip; }
  .grid { grid-template-columns: 1fr; }
  .grid:has(.card:hover) .card:not(:hover) { filter: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .rv, .ph img, body.leaving .shell { transition: none !important; opacity: 1 !important; filter: none !important; transform: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
