/* =====================================================================
   DESKTOP LAYOUT TOGGLE  (mobile is not affected)
   --margins: 1;   indented margins (25vw side / 7.7vh top)
   --margins: 0;   full-edge margins (default 1rem Cargo padding)
   You can also try in-between values like 0.5.
   ===================================================================== */
:root {
  --margins: 1;
}

@media screen and (prefers-color-scheme: dark) { 
  p { 
    color: #000; 
  }
} 

body { 
  background-color: #000; 
  color: #000; 
}

a { 
  text-decoration: none !important; 
  border-bottom: none !important; 
}

a:hover,  
a.active,  
.page a.active, 
a.current, 
a.current_page_item, 
.current a, 
.current_page_item a { 
  text-decoration: underline !important; 
}

i, em { font-style: italic; } 
b, strong { font-weight: bolder; } 
sub, sup { position: relative; vertical-align: baseline; } 
sub { top: 0.3em; } 
sup { top: -0.4em; } 
s { text-decoration: line-through; } 
img { border: 0; padding: 0; } 
ul, ol { margin: 0; padding: 0 0 0 1em; } 
blockquote { margin: 0; padding: 0 0 0 2em; } 
hr { background: transparent; border: 0; height: 1px; display: block; } 

.content img { 
  float: none; 
  margin-bottom: .5em; 
}

[data-predefined-style="true"] bodycopy { 
  font-size: 10pt; 
  font-weight: normal; 
  letter-spacing: 0rem; 
  color: rgb(0, 0, 0); 
  font-family: "Helvetica Neue", Helvetica, sans-serif, "Helvetica Neue Regular", Icons; 
  font-style: normal; 
  line-height: 1.5; 
}

[data-predefined-style="true"] bodycopy a { 
  color: rgba(0, 0, 0, 0.9); 
}

[data-predefined-style="true"] h1 { 
  font-family: "Helvetica Neue", Helvetica, sans-serif, "Helvetica Neue Regular", Icons; 
  padding: 0; 
  margin: 0; 
  color: rgb(0, 0, 0); 
  font-size: 10pt; 
  line-height: 1.1; 
  font-style: normal; 
  font-weight: normal; 
}

[data-predefined-style="true"] h2 { 
  font-family: "Times New Roman", Times, serif; 
  padding: 0; 
  margin: 0; 
  color: rgba(0, 0, 0, 0.74); 
  font-size: 14px; 
  line-height: 1.3; 
  font-style: normal; 
  font-weight: 500; 
}

/* Default Cargo content padding */
[data-css-preset] .content_padding { 
  padding: 1.0rem !important; 
  padding-top: 2.5rem !important; /* pushes the list below the pinned name; adjust to taste */
}

/* Mobile: list sits a bit lower */
@media (max-width: 768px) {
  [data-css-preset] .content_padding,
  [data-css-preset].mobile .content_padding {
    padding-top: 2.7rem !important;
  }
}

[data-css-preset] .page { 
  background-color: initial /*!page_bgcolor*/; 
}

.mobile .page, 
[data-css-preset].mobile .page { 
  position: relative; 
  min-height: 10px; 
  max-width: 100%; 
  width: 100%; 
  background-color: transparent /*!page_bgcolor*/; 
}

[data-css-preset] .container { 
  margin-top: 0.0rem; 
  margin-left: -0.2rem /*!content_left*/; 
  margin-right: auto; 
  text-align: left /*!text_left*/; 
}

[data-css-preset] body { 
  background-color: #f1f1f1/*!body_bgcolor*/; 
}

#site_menu { 
  font-family: sans-serif; 
  background: rgba(20, 20, 20, 0.95); 
  font-size: 20px; 
  padding: 20px 30px 90px 30px; 
}

.home-footer { 
  position: fixed; 
  bottom: 0; 
  left: 4px; 
  width: 100%; 
  text-align: left; 
  padding: 12px 0; 
  background: transparent; 
}

[data-css-preset] .quick-view { 
  width: 100% /*!quick_view_width*/; 
  padding-top: 4.7rem /*!quick_view_padding*/; 
  padding-bottom: 4.7rem /*!quick_view_padding*/; 
  padding-left: 4.7rem /*!quick_view_padding*/; 
  padding-right: 4.7rem /*!quick_view_padding*/; 
}

@media (max-width: 768px) {
  [data-css-preset] .quick-view {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
}

[data-css-preset].mobile .quick-view {
  padding: 1.1rem;
}

[data-page-id="38425235"] .pinned_top { 
  display: none !important; 
}

.main_container, 
.content_container, 
[local-style="37732914"] { 
  display: block !important; 
  isolation: auto !important; 
}

[local-style="36983171"].page_container.overlay, 
[local-style="36983171"] .page_background, 
[local-style="36983171"] .page.container { 
  background: transparent !important; 
  pointer-events: none !important; 
  text-align: right /*!text_right*/;
}

/* Header (Index / Contact) pinned overlay */
[local-style="36983171"] { 
  mix-blend-mode: difference !important; 
  position: absolute !important; 
  top: 1rem !important; 
  left: 0; 
  right: 0; 
  width: 100%; 
  box-sizing: border-box !important;
  padding-right: 1rem !important;
  z-index: 999999 !important; 
}

/* Header's inner padding removed so it sits level with the name */
[data-css-preset] [local-style="36983171"] .content_padding {
  padding: 0 !important;
}

[data-predefined-style="true"] [local-style="36983171"] h1 { 
  mix-blend-mode: difference !important; 
  color: #fff !important; 
}

[data-predefined-style="true"] [local-style="36983171"] h1 a { 
  color: #fff !important; 
  pointer-events: auto !important; 
  display: inline-block; 
}

[local-style="36983171"] h1 .nav-slash { 
  color: #ffffff !important; 
  display: inline-block !important; 
  margin: 0 5px !important; 
}

[local-style="36983171"] h1 a[href="Index"] { 
  text-decoration: underline !important; 
}

[grid-row] div:last-child a[href="Index"],
[local-style="36983171"] a[href="Index"] {
  text-decoration: underline !important;
}

[data-page-id="38426557"] a[href="Index"],
html body[data-page-id="38426557"] [grid-row] a[href="Index"] {
  text-decoration: none !important;
  border-bottom: none !important;
}

[data-page-id="38426557"] a[href="Contact"],
html body[data-page-id="38426557"] [grid-row] a[href="Contact"] {
  text-decoration: underline !important;
}

a[href^="mailto"] {
  position: relative;
  top: -20px;
}

a[rel="history"]:not([href="Index"]):not([href="Contact"]),
a[rel="history"]:not([href="Index"]):not([href="Contact"]):hover,
a[rel="history"]:not([href="Index"]):not([href="Contact"]).active,
a[rel="history"]:not([href="Index"]):not([href="Contact"]).current,
a[rel="history"]:not([href="Index"]):not([href="Contact"]) u,
[data-predefined-style="true"] bodycopy u,
.current a[rel="history"]:not([href="Index"]):not([href="Contact"]),
.current_page_item a[rel="history"]:not([href="Index"]):not([href="Contact"]) {
  text-decoration: none !important;
  border-bottom: none !important;
}

[data-css-preset] .quick-view-background {
  position: fixed !important;
  top: -15vh !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  width: 100% !important;
  height: 150vh !important;
  min-height: 0 !important;
  transform: translateZ(0);
}

[data-predefined-style="true"] bodycopy a[href="Index"][rel="history"] {
  text-decoration: underline !important;
}

[data-predefined-style="true"] bodycopy h2 a[href="Index"][rel="history"] {
  text-decoration: none !important;
}

:root {
  --menu-gap: 0.0em;  
  --name-size: 9pt;
  --name-color: #adadad;
}

a[rel="history"]:not([href="Index"]):not([href="Contact"]) {
  display: block;
  width: fit-content;
  margin-bottom: var(--menu-gap);
}

a[rel="history"]:not([href="Index"]) + br,
u + br {
  display: none;
}

h2 a[rel="history"] {
  display: inline;
  margin-bottom: 0;
}

@media (hover: hover) {
  html body a:hover:hover:hover:hover:hover,
  html body a:hover:hover:hover:hover:hover u {
    text-decoration: underline !important;
  }
}

[local-style="36983171"] h1 a:not([href="Index"]):not([href="Contact"]),
[local-style="36983171"] [grid-row] div:first-child a {
  display: none !important;
}

[local-style="36983171"] h1 .nav-slash {
  display: none !important;
}

[data-predefined-style="true"] [local-style="36983171"] bodycopy a[href="Index"][rel="history"],
[data-predefined-style="true"] [local-style="36983171"] h1 a[href="Index"] {
  display: inline-block !important;
  width: auto !important;
  margin-left: 0 !important;
}

/* ---- "james ronkko" name block: delete everything below once it's unpinned ---- */

[local-style="38721314"].page_container.overlay,
[local-style="38721314"] .page_background,
[local-style="38721314"] .page.container {
  background: transparent !important;
  pointer-events: none !important;
}

[local-style="38721314"] {
  position: absolute !important;
  top: 1rem !important;
  left: 1rem !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  text-align: left !important;
  width: max-content !important;
  max-width: none !important;
  height: auto !important;
  white-space: nowrap !important;
  mix-blend-mode: difference !important;
  z-index: 999999 !important;
}

[data-css-preset] [local-style="38721314"] .content_padding {
  padding: 0 !important;
  width: max-content !important;
}

[local-style="38721314"] h1,
[local-style="38721314"] bodycopy {
  white-space: nowrap !important;
  margin: 0 !important;
}

[data-predefined-style="true"] [local-style="38721314"] h1,
[data-predefined-style="true"] [local-style="38721314"] bodycopy,
[data-predefined-style="true"] [local-style="38721314"] a {
  color: var(--name-color) !important;
  font-size: var(--name-size) !important;
  text-decoration: none !important;
  pointer-events: auto !important;
}

html body [data-predefined-style="true"] [local-style="38721314"][local-style="38721314"][local-style="38721314"] a {
  display: inline-block !important;
  width: auto !important;
  margin: 0 !important;
  text-decoration: none !important;
  color: var(--name-color) !important;
  font-size: var(--name-size) !important;
  pointer-events: auto !important;
  cursor: pointer;
}

/* =====================================================================
   DESKTOP ONLY (769px and up): padding system driven by --margins
   Mobile is untouched and uses the rules above.
   Keep this block at the END of the file so it overrides the rules above.
   ===================================================================== */
:root {
  /* derived from --margins at the top of the file; don't edit these */
  --site-top: calc(1rem + (7.7vh - 1rem) * var(--margins));
  --site-side: calc(1rem + (25vw - 1rem) * var(--margins));
  --right-extra: calc(4vw * var(--margins)); /* extra inset for Index/Contact + email */
  --name-offset: calc(1.5rem + (var(--name-size) * 1.65 - 1.5rem) * var(--margins));
  --header-nudge: 0px; /* 0 = level with the name */
}

@media (min-width: 769px) {

  [data-css-preset] .content_padding {
    padding-top: calc(var(--site-top) + var(--name-offset)) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  a[rel="history"]:not([href="Index"]):not([href="Contact"]) {
    margin-left: var(--site-side);
  }

  a[href^="http"],
  a[href^="www"] {
    display: inline-block;
    margin-left: var(--site-side);
  }

  h2 {
    padding-left: var(--site-side) !important;
  }

  h2 a[rel="history"]:not([href="Index"]):not([href="Contact"]) {
    margin-left: 0;
  }

  /* Header (Index / Contact) */
  [local-style="36983171"] {
    top: calc(var(--site-top) + var(--header-nudge)) !important;
    padding-right: calc(var(--site-side) + var(--right-extra)) !important;
  }

  [data-predefined-style="true"] bodycopy a[href="Index"][rel="history"] {
    display: block;
    width: fit-content;
    margin-left: var(--site-side);
  }

  [data-predefined-style="true"] bodycopy h2 a[href="Index"][rel="history"] {
    display: inline;
    margin-left: 0;
  }

  [data-page-id="38426557"] .content_padding {
    padding-right: calc(var(--site-side) + var(--right-extra)) !important;
  }

  .quasi-gallery {
    padding-left: var(--site-side);
  }

  /* External link inside an h2 (e.g. /manuela): the h2 already has the side
     padding, so cancel the extra margin from the a[href^="http"] rule */
  h2 a[href^="http"],
  h2 a[href^="www"] {
    margin-left: 0;
  }

  /* (Close): only matches the h1 that comes after the gallery/h2 in page content,
     so it can never affect the pinned name or header */
  .image-gallery ~ h1,
  h2 ~ h1 {
    font-size: 0 !important; /* collapses the &nbsp; spacing */
  }

  .image-gallery ~ h1 a[rel="home_page"],
  h2 ~ h1 a[rel="home_page"] {
    display: block;
    width: fit-content;
    margin-left: var(--site-side);
    font-size: 10pt;
  }
}

/* =====================================================================
   NAME BLOCK ("James Rönkkö") position lock - keep at the very END.
   Mobile: top-left, 1rem in.  Desktop: lines up with the list.
   ===================================================================== */
html body [local-style="38721314"][local-style="38721314"] {
  position: absolute !important;
  top: 1rem !important;
  left: 1rem !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  text-align: left !important;
}

html body [local-style="38721314"] h1,
html body [local-style="38721314"] bodycopy,
html body [local-style="38721314"] a {
  margin: 0 !important;
  font-size: var(--name-size) !important;
}

html body [local-style="38721314"] a {
  display: inline-block !important;
  width: auto !important;
}

@media (min-width: 769px) {
  html body [local-style="38721314"][local-style="38721314"] {
    top: var(--site-top) !important;
    left: var(--site-side) !important;
  }
}

/* Underline all project list links (desktop + mobile) */
html body a[rel="history"]:not([href="Index"]):not([href="Contact"]),
html body a[rel="history"]:not([href="Index"]):not([href="Contact"]) u,
html body [data-predefined-style="true"] bodycopy a[rel="history"]:not([href="Index"]):not([href="Contact"]) {
  text-decoration: underline !important;
}

/* Mobile fallback in case the links aren't rel="history" */
@media (max-width: 768px) {
  html body [data-predefined-style="true"] bodycopy a:not([href="Index"]):not([href="Contact"]):not([href^="mailto"]),
  html body [data-predefined-style="true"] bodycopy a:not([href="Index"]):not([href="Contact"]):not([href^="mailto"]) u {
    text-decoration: underline !important;
  }

  /* keep the "James Rönkkö" name plain */
  html body [local-style="38721314"][local-style="38721314"][local-style="38721314"][local-style="38721314"] a,
  html body [local-style="38721314"][local-style="38721314"][local-style="38721314"][local-style="38721314"] a u {
    text-decoration: none !important;
  }
}