/* sperandeo.eu: the landing page. Same paper, ink and red and the same width as
   tech.sperandeo.eu; greeting after matteocroce.it, footer blocks after coduri.cc. */
:root {
  --paper: #f6f4ee;
  --paper-2: #efece4;
  --ink: #141412;
  --ink-2: #4d4b45;
  --ink-3: #8a877f;
  --hair: #dcd8ce;
  --red: #d42a1e;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #121211;
  --paper-2: #1b1b19;
  --ink: #eeece6;
  --ink-2: #b2afa7;
  --ink-3: #77756e;
  --hair: #2c2b28;
  --red: #ff5a4b;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121211;
    --paper-2: #1b1b19;
    --ink: #eeece6;
    --ink-2: #b2afa7;
    --ink-3: #77756e;
    --hair: #2c2b28;
    --red: #ff5a4b;
    color-scheme: dark;
  }
}

html[lang="it"] [data-l="en"],
html[lang="en"] [data-l="it"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
img { display: block; max-width: 100%; height: auto; }
h1, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
abbr { text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.label {
  font-size: 11.5px; font-weight: 700; font-stretch: 75%;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
}

.page { max-width: 1400px; margin: 0 auto; padding: 0 40px; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0 14px; border-bottom: 2px solid var(--ink); }
.logo {
  display: inline-flex; align-items: baseline;
  font-weight: 800; font-stretch: 125%; font-size: 21px; letter-spacing: -0.02em;
  text-decoration: none;
}
.logo::after { content: "."; color: var(--red); }
.switches { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; border: 1px solid var(--ink); }
.lang button, .theme {
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink); background: none; border: 0; padding: 4px 9px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.theme { border: 1px solid var(--ink); width: 28px; height: 25px; display: grid; place-items: center; padding: 0; }
.theme span { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }

/* greeting */
.hello { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; padding: 64px 0 72px; }
.portrait { width: 132px; height: 132px; object-fit: cover; border: 1px solid var(--ink); box-shadow: 8px 8px 0 var(--red); }
.hello h1 {
  margin-top: 40px;
  font-weight: 800; font-stretch: 112%;
  font-size: clamp(36px, 5.4vw, 72px); line-height: 1; letter-spacing: -0.04em;
  text-wrap: balance;
}
.lead { margin-top: 12px; font-size: 20px; color: var(--ink-2); }
.about { margin-top: 24px; max-width: 60ch; }
.about p + p { margin-top: 14px; }
.about a { text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.about a:hover { color: var(--red); }

/* day / night */
.meme { margin-top: 28px; max-width: 60ch; border: 1px solid var(--ink); }
.meme li { display: flex; align-items: baseline; gap: 16px; padding: 10px 14px; font-weight: 700; font-size: 18px; }
.meme li + li { border-top: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.meme-time { font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace); font-size: 14px; color: var(--red); }

/* big quote */
.quote { margin: 32px 0; padding-left: 20px; border-left: 4px solid var(--red); }
.quote p {
  font-weight: 800; font-stretch: 112%;
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -0.02em;
  text-wrap: balance;
}
.quote cite { display: block; margin-top: 10px; font-style: normal; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
/* personal links */
.links .label { padding-bottom: 10px; border-bottom: 1px solid var(--ink); color: var(--red); }
.link-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.link {
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--hair); text-decoration: none;
}
a.link::before {
  content: ""; position: absolute; inset: 0 -10px; z-index: -1;
  background: var(--paper-2); opacity: 0; transition: opacity .2s;
}
a.link:hover::before { opacity: 1; }
.link .ico { flex: none; }
.link-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.link-name { font-weight: 700; font-stretch: 85%; font-size: 18px; transition: color .2s; }
.link-handle { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-arrow { margin-left: auto; font-weight: 700; color: var(--ink-3); transition: color .2s, transform .2s; }
a.link:hover .link-name, a.link:hover .link-arrow, a.link:hover .ico { color: var(--red); }
a.link:hover .link-arrow { transform: translate(2px, -2px); }
.link.is-missing { color: var(--ink-3); }
.link.is-missing .link-handle { font-style: italic; }

/* footer */
.foot { margin-top: 96px; padding: 28px 0 32px; border-top: 2px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 28px 40px; }
.foot-block .label { margin-bottom: 8px; }
.loc { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.loc svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.loc svg { color: var(--red); }
.ico {
  width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat;
}
.flags { display: flex; flex-wrap: wrap; gap: 8px; font-size: 26px; line-height: 1; }
.likes { display: flex; flex-wrap: wrap; gap: 6px; }
.likes li { font-size: 13.5px; font-weight: 600; padding: 3px 10px; border: 1px solid var(--hair); }
.foot-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 12.5px; color: var(--ink-3); }
.foot-bar a { text-decoration: none; font-weight: 700; color: var(--ink-2); }
.foot-bar a:hover { color: var(--red); }

@media (max-width: 860px) {
  .page { padding: 0 24px; }
  .hello { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 48px; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .page { padding: 0 16px; }
  .hello { padding: 40px 0 36px; }
  .foot { grid-template-columns: 1fr; }
  .link-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
