/* generic styling */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light dark;
  --content-max: 920px;
  --bg: #f6f3ee;
  --bg-accent: #cfd8dc;
  --text: #0d0f12;
  --muted: rgba(13, 15, 18, 0.72);
  --surface: #ffffff;
  --border: #0d0f12;
  --shadow: #0d0f12;
  --link: #0d0f12;
  --link-hover: #1e4bd6;
  --ring: rgba(30, 75, 214, 0.35);
  --radius: 10px;
  --shadow-size: 8px;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f12;
    --bg-accent: #162027;
    --text: #f3f6f8;
    --muted: rgba(243, 246, 248, 0.72);
    --surface: #0f151a;
    --border: rgba(243, 246, 248, 0.16);
    --shadow: rgba(0, 0, 0, 0.7);
    --link: #f3f6f8;
    --link-hover: #9bb3ff;
    --ring: rgba(155, 179, 255, 0.35);
  }
}

html {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--text);
  background:
    radial-gradient(1200px 900px at 20% 10%, color-mix(in srgb, var(--bg-accent) 55%, transparent) 0%, transparent 60%),
    radial-gradient(900px 700px at 90% 20%, color-mix(in srgb, var(--bg-accent) 45%, transparent) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, black) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

body {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2vw, 24px);
  gap: clamp(1.5rem, 4vw, 3rem);
}

::selection {
  background: color-mix(in srgb, var(--link-hover) 28%, transparent);
}

img {
  object-fit: cover;
  display: block;
}

svg {
  color: var(--text);
}

ul,
li,
a {
  padding: 0;
  margin: 0;
  list-style-type: none;
  text-decoration: none;
  color: var(--link);
  transition:
    color 0.2s ease-in-out,
    transform 0.2s ease-in-out,
    opacity 0.2s ease-in-out;
}

a:hover {
  color: var(--link-hover);
}

a:hover svg {
  transform: translateY(-1px);
}

a:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 8px;
}

/* general utility classes */
*[heading1] {
  font-size: clamp(1.5rem, 5vw, 3rem);
}

*[heading2] {
  font-size: clamp(1.25rem, 4vw, 2rem);
}

*[heading3] {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
}

*[heading4] {
  font-size: clamp(0.75rem, 2vw, 0.875rem);
}

*[p-1] {
  padding: clamp(0.5rem, 2vw, 1rem);
}

*[p-2] {
  padding: clamp(1rem, 4vw, 2rem);
}

*[p-3] {
  padding: clamp(1.5rem, 6vw, 3rem);
}

*[gap-05] {
  gap: 0.5rem;
}

*[gap-1] {
  gap: 1rem;
}

*[gap-2] {
  gap: 2rem;
}

*[gap-3] {
  gap: 3rem;
}

*[gap-4] {
  gap: 4rem;
}

*[rounded] {
  border-radius: 100%;
}

*[h-auto] {
  height: auto;
}

*[w-10] {
  width: clamp(60px, 10%, 150px);
}

*[w-20] {
  width: clamp(100px, 20%, 250px);
}

*[w-30] {
  width: clamp(150px, 30%, 350px);
}

*[w-40] {
  width: clamp(200px, 40%, 450px);
}

*[w-50] {
  width: clamp(250px, 50%, 550px);
}

*[w-60] {
  width: clamp(300px, 60%, 650px);
}

*[w-70] {
  width: clamp(350px, 70%, 750px);
}

*[w-80] {
  width: clamp(400px, 80%, 850px);
}

*[w-90] {
  width: clamp(450px, 90%, 950px);
}

*[w-full] {
  width: 100%;
}

*[horizontal] {
  display: flex;
  flex-direction: row;
  align-items: center;
}

*[vertical] {
  display: flex;
  flex-direction: column;
  height: auto;
}

*[center] {
  display: flex;
  justify-content: center;
  align-items: center;
}

*[between] {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

*[right] {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

*[left] {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

*[font-bold] {
  font-weight: 700;
}

*[font-semibold] {
  font-weight: 600;
}

*[font-medium] {
  font-weight: 500;
}

*[font-regular] {
  font-weight: 400;
}

*[font-light] {
  font-weight: 300;
}

*[font-lighter] {
  font-weight: 100;
}

*[white] {
  color: whitesmoke;
}

/* specific styling */
.profile-pic {
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

heading {
  width: min(var(--content-max), 100%);
  max-width: 100%;
  margin-inline: auto;
  justify-content: space-between;
}

header-content {
  flex: 1;
  min-width: 0;
  justify-content: space-between;
}

socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 12px;
}

socials {
  margin-left: auto;
}

socials ul[horizontal] {
  margin-right: -0.35rem;
}

socials a:hover {
  background: color-mix(in srgb, var(--bg-accent) 35%, transparent);
}

about-me,
projects-experience {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(var(--content-max), 100%);
  max-width: 100%;
  margin-inline: auto;
}

heading-experience,
heading-projects {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

heading-msh {
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 0.5rem;
}

heading-msh a {
  display: inline-flex;
  align-items: center;
}

desc-msh {
  display: block;
  color: var(--muted);
  width: 100%;
  text-align: center;
}

roles-mcita,
roles-spottly {
  margin-bottom: 0.5rem;
}

divider {
  width: inherit;
  opacity: 0.3;
  background-color: color-mix(in srgb, var(--text) 55%, transparent);
  height: 1px;
}

heading-experience svg {
  vertical-align: middle;
  margin-bottom: 2px;
}

heading-projects svg {
  vertical-align: middle;
  margin-bottom: 2px;
}

.icon {
  height: 30px;
  width: 30px;
  display: inline-block;
  transform: scaleX(-1);
  vertical-align: middle;
}

desc-mcita,
desc-spottly {
  display: block;
  width: 30ch;
  color: var(--muted);
}

.surface {
  background-color: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-size) var(--shadow-size) 0px var(--shadow);
  padding: 1.5rem;
  border-radius: var(--radius);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: calc(var(--shadow-size) + 2px) calc(var(--shadow-size) + 2px) 0px var(--shadow);
}

.project-card {
  cursor: pointer;
}

projects {
  gap: 1rem;
}

projects .surface {
  padding: 1.25rem;
}

experience {
  min-width: min(420px, 100%);
}

projects {
  width: 100%;
}

projects-experience[horizontal] {
  align-items: flex-start;
}

projects-experience[horizontal] > experience,
projects-experience[horizontal] > projects {
  flex: 1;
}

projects-experience[horizontal] > experience.surface,
projects-experience[horizontal] > projects.surface {
  width: 100%;
}

.about-text,
.contact-info {
  color: var(--muted);
}

.contact-info a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

footer {
  width: 100%;
  padding: 0 0.25rem;
  color: var(--muted);
  opacity: 0.9;
  text-align: center;
}

@media (max-width: 850px) {

  body {
    width: 100% !important;
    max-width: 100vw;
    padding: 10px;
  }

  projects-experience[horizontal] {
    flex-direction: column !important;
    width: 100% !important;
    align-items: center;
  }

  about-me,
  projects-experience,
  experience,
  projects {
    width: 100% !important;
    max-width: 100% !important;
  }

  .surface {
    width: 100% !important;
    box-shadow: 6px 6px 0px var(--shadow);
  }

  *[w-10],
  *[w-20],
  *[w-30],
  *[w-40],
  *[w-50],
  *[w-60],
  *[w-70],
  *[w-80],
  *[w-90],
  *[w-full] {
    width: 100% !important;
  }

  desc-mcita,
  desc-spottly {
    width: 100% !important;
  }

  heading[horizontal] {
    flex-direction: column !important;
    text-align: center;
    gap: 1.5rem;
  }

  header-content[horizontal] {
    flex-direction: column !important;
    gap: 1rem;
  }
}

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