/*  ───────────────────────────────────────────
    General appearance: white background, dark text, centered
   ─────────────────────────────────────────── */
:root{
  --maxw: 38rem;
  --pad: 2.5rem;
  --fg: #111;
  --fg-link: #0658d9;
}

*{ box-sizing:border-box; }

html{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg);
}

/* Удаляем старое определение body с flex */
/*
body{
  margin:0;
  padding: var(--pad);
  display:flex;
  justify-content:center;
}
*/

main{
  max-width: var(--maxw);
  width:100%;
}

h1{
  font-size: 1.9rem;
  margin: 0 0 1rem;
  line-height:1.3;
  font-weight: 600;
}

hr{
  border:none;
  height:1px;
  background:#eee;
  margin:2rem 0;
}

a{
  color: var(--fg-link);
  text-decoration:none;
}

a:hover{
  text-decoration:underline;
}

/*  ─────────── мини-навигация ─────────── */
.nav{
  list-style:none;
  padding:0;
  margin:0 0 2rem;
  display:flex;
  flex-wrap:wrap;
  gap:1rem 1.5rem;
}

.nav li{ margin:0; }

/*  ─────────── языковой переключатель ─────────── */
.lang-switch{
  font-size:0.95rem;
  opacity:.7;
  margin:0;
}

.avatar {
  width: 128px;
  height: 128px;
  min-width: 128px;
  min-height: 128px;
  background-color: #eee; /* temporary for debugging */
  background-size: cover;
  background-position: center;
  display: block;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);

  /* Squircle mask */
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" fill="black" xmlns="http://www.w3.org/2000/svg"><rect x="5" y="5" width="90" height="90" rx="20" ry="20"/></svg>');
  -webkit-mask-size: 100% 100%;
  mask-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" fill="black" xmlns="http://www.w3.org/2000/svg"><rect x="5" y="5" width="90" height="90" rx="20" ry="20"/></svg>');
  mask-size: 100% 100%;
}
@media (max-width: 600px) {
  .avatar {
    width: 88px;
    height: 88px;
  }
}

/* --- Styles moved from base.liquid --- */

/* base fluid-size for rem */
:root { font-size: clamp(12px, 4.5vw, 20px); }

/* themes */
@media (prefers-color-scheme: light) {
  :root {
    --background: #fff;
    --text:       #000;
    --secondary:  #666;
    --tertiary:   #a1a1a1;
    --underline:  #cfcfcf;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #111;
    --text:       #fff;
    --secondary:  #b9b9b9;
    --tertiary:   #808080;
    --underline:  #3d3d3d;
  }
  .dark-invert { filter: invert(1); } /* svg invert */
}

/* general background / text color */
:root         { background: var(--background); color: var(--text); }
.primary-color,
h1, h2, h3    { color: var(--text); }

/* typography */
/* Combined and corrected body definition */
body {
  max-width: 800px; /* Use value from the second definition */
  margin: 160px auto; /* Centering + vertical margins */
  padding: 0 30px;    /* Horizontal padding */
  line-height: 1.4;
  font-family: "FormaDJRMonoVariable", serif;
  background: var(--background); /* Add background/color from :root */
  color: var(--text);
}
@media (max-width: 600px) { 
  body { 
    margin: 40px auto; /* Reduce vertical margins on mobile */
    padding: 0 15px; /* Can also reduce horizontal padding */
  }
}
@media print { 
  body { 
    margin: 60px auto; 
    max-width: none; /* Remove width limit for printing */
    padding: 0;
  }
}

h1, h2, h3 {
  line-height: 1;
  font-family: "FormaDJRMonoVariable", serif;
  font-variation-settings: "wght" 600, "wdth" 75;
}
h1 {
  font-size: 2rem;
  font-variation-settings: "wght" 600, "slnt" -10, "wdth" 87.5;
}
h2 { font-size: 1.6rem; }

p      { margin: 1rem 0; }
h1, h2 { margin: 2.2rem 0 1rem; }

/* links */
.link, a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.1em;
  text-decoration-color: var(--underline);
}
.disable-underline { text-decoration: none; }

/* variable effects */
i { font-style: inherit; font-variation-settings: "slnt" -10; }
.thicc-and-narrow {
  font-variation-settings: "wdth" 80, "wght" 600, "opsz" 20;
}

/* hide helper */
@media (max-width: 600px) { .hide-on-mobile { display: none; } }

/* icons in text */
.small-logo { height: .8rem; width: .8rem; margin: 0 3px 0 5px; }
.pdf-icon   {
  position: relative;
  height: .85rem;
  width: calc(.85rem * .8);
  top: .05rem;
  margin: 0 3px 0 5px;
}
.link-with-icon { white-space: nowrap; }

/* Footer styles */
hr {
  margin: 1.5rem 0 1rem;
  border: 0;
  border-top: .05em solid var(--underline);
}
.footer-link        { color: var(--secondary); text-decoration: none; font-stretch: 75%; }
.footer-link:hover  { color: var(--text); }
.footer-container   {
  display: flex; justify-content: space-between; align-items: center;
  flex-direction: row;
}
.footer-nav {
  list-style: none; padding: 0; margin: .25rem 0;
  display: flex; gap: .75rem; font-size: .75rem;
}
.footer-nav.top    { margin-bottom: .25rem; }
.footer-nav.bottom { margin-top: .25rem;  }
.made-on-mac       { font-size: .5rem; margin: 0 0 .25rem; }
.mac-badge         { height: 1rem; width: calc(1rem * (98 / 36)); }
.copyright         { font-size: .5rem; color: var(--tertiary); margin: .25rem 0; }
.trademark         { font-size: .5rem; color: var(--tertiary); font-stretch: 75%; }
.footer-copyright-container { justify-items: end; }
@media (max-width: 600px) {
  .footer-container { flex-direction: column; align-items: flex-start; gap: .65rem; }
  .footer-copyright-container { justify-items: start; }
  .trademark  { margin-top: .5rem; }
  .made-on-mac,
  .copyright  { margin: .5rem 0; }
}

/* Styles moved from inline HTML */
.avatar-img {
  /* Apply to the same div as the .avatar class */
  background-image: url('/assets/images/me.avif'); 
}

.logo-marinestars {
  /* Apply to img inside the link to MarineStars */
  margin:0 0.3em;
  vertical-align:0em;
}

.logo-ua {
  /* Apply to img inside the span for Universiteit Antwerpen */
  margin-right:0.4em;
}

.nowrap {
  white-space: nowrap;
}
  