/* Mohammad Hamrah — resume */

:root {
  --ink: #101820;
  --ink-soft: #2a3a45;
  --muted: #5a6d78;
  --paper: #edf2f4;
  --sheet: #f7fafb;
  --line: rgba(16, 24, 32, 0.1);
  --line-strong: rgba(16, 24, 32, 0.18);
  --accent: #0b6e63;
  --accent-deep: #08554c;
  --accent-wash: rgba(11, 110, 99, 0.1);
  --font-display: "DM Sans", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --max: 68rem;
}

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul,
ol {
  list-style: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--sheet);
  font-size: 0.85rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* Atmosphere */

.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(155deg, #e4ebef 0%, var(--paper) 45%, #dde7eb 100%);
}

.atmosphere-wash {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 50% 40% at 8% 12%, rgba(11, 110, 99, 0.16), transparent 60%),
    radial-gradient(ellipse 45% 35% at 92% 8%, rgba(60, 95, 120, 0.14), transparent 55%),
    radial-gradient(ellipse 40% 30% at 70% 90%, rgba(11, 110, 99, 0.08), transparent 50%);
}

.atmosphere-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 24, 32, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 32, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, black 10%, transparent 75%);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-bar,
main,
.site-footer {
  position: relative;
  z-index: 2;
}

/* Top bar */

.site-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem clamp(1.25rem, 4vw, 2.75rem);
  border-bottom: 1px solid transparent;
}

.site-bar.is-scrolled {
  background: rgba(237, 242, 244, 0.94);
  border-bottom-color: var(--line);
}

.site-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 1.35rem;
}

.site-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  padding: 0.2rem 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
}

.site-nav a.is-active::after,
.site-nav a:hover::after {
  transform: scaleX(1);
}

.print-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: rgba(247, 250, 251, 0.7);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border-radius: 2px;
}

.print-btn:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--sheet);
}

/* Resume canvas */

.resume {
  width: min(100% - 2.5rem, var(--max));
  margin: 1.25rem auto 4.5rem;
}

/* Masthead — brand first */

.masthead {
  position: relative;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(2rem, 4vw, 2.75rem);
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line-strong);
}

.masthead-mark {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.35rem;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: relative;
}

.masthead-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
  transform: scale(0.55);
}

.masthead-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 5.75rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin-bottom: 1.35rem;
  display: flex;
  flex-direction: column;
}

.masthead-name span {
  display: block;
}

.masthead-meta {
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.masthead-role {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.masthead-lede {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

.masthead-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.35rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.masthead-contacts a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.masthead-contacts a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Layout */

.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 17.5rem);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.block,
.aside-block {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.aside-block:last-child,
.resume-main .block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.block-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.profile-copy {
  font-size: 1.02rem;
  color: var(--ink-soft);
  max-width: 38rem;
  line-height: 1.65;
}

/* Jobs */

.jobs {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.job {
  padding: 1.35rem 0 1.35rem 1rem;
  margin-left: -1rem;
  border-left: 2px solid transparent;
}

.job:hover {
  border-left-color: var(--accent);
  background: linear-gradient(90deg, var(--accent-wash), transparent 70%);
}

.job-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem 1.5rem;
  margin-bottom: 0.65rem;
}

.job-top h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.job-org {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-top: 0.25rem;
}

.job-note {
  font-weight: 500;
  color: var(--muted);
}
}

.job-when {
  flex-shrink: 0;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
  padding-top: 0.2rem;
}

.job-place {
  display: block;
  font-weight: 400;
  margin-top: 0.15rem;
}

.job-points {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.job-points li {
  position: relative;
  padding-left: 0.95rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 42rem;
  line-height: 1.55;
}

.job-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--accent);
}

/* Aside */

.skills {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.skills dt {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.skills dd {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.creds {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.creds li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent);
}

.creds strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
}

.creds span {
  font-size: 0.8rem;
  color: var(--muted);
}

.aside-contact p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
  line-height: 1.55;
}

.contact-primary {
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sheet);
  background: var(--accent);
  padding: 0.7rem 1rem;
  margin-bottom: 0.75rem;
}

.contact-primary:hover {
  background: var(--accent-deep);
}

.contact-secondary {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-deep);
}

.contact-secondary:hover {
  color: var(--ink);
}

/* Footer */

.site-footer {
  padding: 1.25rem clamp(1.25rem, 4vw, 2.75rem) 2.25rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 860px) {
  .resume-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .resume-aside {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0.5rem;
  }

  .job-top {
    flex-direction: column;
    gap: 0.35rem;
  }

  .job-when {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .resume {
    width: min(100% - 1.5rem, var(--max));
  }

  .masthead-name {
    font-size: clamp(2.6rem, 14vw, 3.6rem);
  }

  .site-nav a[data-nav] {
    display: none;
  }

  .job {
    margin-left: 0;
    padding-left: 0;
  }

  .job:hover {
    background: none;
    border-left-color: transparent;
  }
}

/* Print */

@media print {
  .atmosphere,
  .grain,
  .site-bar,
  .site-footer,
  .skip-link {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 10.5pt;
  }

  .resume {
    width: 100%;
    margin: 0;
  }

  .resume-layout {
    grid-template-columns: 1fr 12rem;
    gap: 1.5rem;
  }

  .job:hover {
    background: none;
    border-left-color: transparent;
  }

  .contact-primary {
    background: none;
    color: black;
    padding: 0;
    border-bottom: 1px solid black;
  }

  .masthead-lede,
  .profile-copy,
  .job-points li,
  .skills dd,
  .creds span,
  .aside-contact p,
  .job-when {
    color: #333;
  }

  a {
    color: black;
  }
}
