/*
 * shared.css — shared stylesheet for rseip.com and /resume
 * No external fonts, @imports, or CSS image dependencies.
 */

:root {
  --text: #24313a;
  --muted: #5b6870;
  --heading: #17232b;
  --accent: #9b3d2f;
  --accent-hover: #7f3025;
  --accent-soft: #ead7d2;
  --rule: #d8d5d0;
  --surface: #fff;
  --surface-alt: #f3f1ed;
  --page: #faf9f7;
  --body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --heading-font: Georgia, "Times New Roman", serif;
  --content-width: 52rem;
  --page-padding: clamp(1rem, 4vw, 2rem);
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2 {
  font-family: var(--heading-font);
  color: var(--heading);
}

h1 {
  margin: 0 0 .75rem;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.02em;
}

h2 {
  margin: 0 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--rule);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}

h3 {
  margin: 0 0 .45rem;
  color: var(--heading);
  font-size: 1rem;
  line-height: 1.4;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: .4rem 0 0;
  padding-left: 1.3rem;
}

li {
  margin-bottom: .45rem;
}

section {
  margin: 0 0 2.5rem;
}

/* Resume */

body > h1,
body > p,
body > section {
  width: min(100% - 2 * var(--page-padding), var(--content-width));
  margin-left: auto;
  margin-right: auto;
}

body > h1 {
  margin-top: clamp(2rem, 6vw, 4rem);
  padding-bottom: .65rem;
  border-bottom: 3px solid var(--accent);
}

body > p {
  margin-top: 1.25rem;
  margin-bottom: 2.75rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

body > section {
  margin-bottom: 2.5rem;
}

/* Resume contact */

body > section:first-of-type ul {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
  padding-left: 0;
  list-style: none;
}

body > section:first-of-type li {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

/* Resume experience */

article {
  margin-bottom: 1.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
}

article:last-child {
  margin-bottom: 0;
}

article h3 {
  font-weight: 700;
}

article h3 a {
  color: inherit;
}

article ul {
  color: var(--muted);
}

article li {
  margin-bottom: .5rem;
}

/* Resume skills */

ul.skills {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding-left: 0;
  list-style: none;
}

ul.skills li {
  margin: 0;
  padding: .25rem .65rem;
  border: 1px solid var(--rule);
  border-radius: .25rem;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: .84rem;
}

/* Home page */

.content-container {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  background: var(--page);
}

.content {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1 1 55%;
  flex-direction: column;
  align-items: center;
  padding: clamp(2.5rem, 8vw, 5rem) var(--page-padding) 5rem;
  text-align: center;
}

.content h1 {
  margin-bottom: 2.5rem;
  padding-bottom: 0;
  border: 0;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 1.75rem 1.25rem;
  width: min(100%, 38rem);
}

.icon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.icon-container a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  padding: .45rem;
  border: 1px solid var(--rule);
  border-radius: .65rem;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
  text-decoration: none;
}

.icon-container a:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 3px 8px rgb(0 0 0 / 10%);
}

.icon-container img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.label {
  margin-top: .55rem;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.3;
}

.bg-tooltip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.background {
  position: absolute;
  inset: 0 0 0 45%;
  z-index: 1;
  background:
    linear-gradient(
      to right,
      var(--page) 0%,
      rgb(250 249 247 / 92%) 18%,
      rgb(250 249 247 / 35%) 55%,
      rgb(250 249 247 / 0%) 100%
    ),
/*    url("https://rseip.com/rogueroo.jpeg") no-repeat right center; */
  background-size: auto, min(50vw, 32rem);
  opacity: .9;
  pointer-events: none;
}

body > p:last-child {
  width: min(100% - 2 * var(--page-padding), var(--content-width));
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}

/* Print */

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
  }

  body > h1,
  body > p,
  body > section {
    width: 100%;
    max-width: none;
  }

  body > h1 {
    margin-top: 0;
    border-bottom-color: #000;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  article {
    border-left: 1px solid #aaa;
    break-inside: avoid;
  }

  .content-container,
  .background {
    display: block;
    min-height: auto;
  }
}

/* Small screens */

@media (max-width: 700px) {
  .content-container {
    display: block;
    min-height: 100svh;
  }

  .content {
    min-height: 100svh;
    padding-bottom: 4rem;
  }

  .background {
    inset: 0;
    background:
      linear-gradient(rgb(250 249 247 / 90%), rgb(250 249 247 / 96%)),
      url("https://rseip.com/rogueroo.jpeg") no-repeat center bottom;
    background-size: auto, min(85vw, 28rem);
  }

  .icon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 24rem;
  }
}

@media (max-width: 420px) {
  .icon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 18rem;
  }

  article {
    padding-left: .75rem;
  }

  body > section:first-of-type ul {
    display: block;
  }

  body > section:first-of-type li {
    margin-bottom: .35rem;
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text: #111;
    --muted: #333;
    --heading: #000;
    --accent: #7a2015;
    --rule: #999;
  }

  a {
    text-decoration-thickness: .12em;
  }
}

