/* petershamoun.com. Underwater photo, glass panels, glossy controls. One stylesheet for every page;
   post.css adds the article styles. No build step: edit and push. */

@font-face {
  font-family: "Open Sans";
  src: url("fonts/open-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("fonts/open-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --sans: "Segoe UI", "Open Sans", "Frutiger", "Myriad Pro", "Helvetica Neue", Arial, sans-serif;
  --ink: #123b52;        /* body text on glass */
  --ink-deep: #0b3d63;   /* headings */
  --ink-soft: #3f6475;   /* dates, roles, captions: 5.6:1 on the glass */
  --link: #0a5d8f;
  --link-hover: #0c79bd;
  --rule: #b3d5e1;
  --water: #1492d2;
  --lift: 0 16px 32px -14px rgba(6, 56, 92, .7);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

@view-transition { navigation: auto; }

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--water); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}

/* The water. A fixed layer instead of background-attachment: fixed, which iOS repaints badly. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("img/bubble.webp") 96% 12% / 84px auto no-repeat,
    url("img/bubble.webp") 92.5% 23% / 30px auto no-repeat,
    url("img/bubble.webp") 3% 88% / 60px auto no-repeat,
    linear-gradient(rgba(200, 244, 255, .1), rgba(205, 248, 244, .34) 75%),
    url("img/water-1600.webp") center top / cover no-repeat;
}
@media (max-width: 700px) {
  body::before {
    background:
      url("img/bubble.webp") 94% 96% / 54px auto no-repeat,
      linear-gradient(rgba(200, 244, 255, .1), rgba(205, 248, 244, .34) 75%),
      url("img/water-960.webp") center top / cover no-repeat;
  }
}

::selection { background: #8fdcf5; color: #062a44; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px var(--link); border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 5; padding: 8px 14px; border-radius: 6px; background: #fff; color: var(--ink-deep); }
.skip:focus { top: 10px; }

.wrap, .site-bar > *, main { width: min(1120px, 92%); margin-inline: auto; }

/* ---------- site bar: one bar of glass, gloss split at the halfway line ---------- */

.site-bar {
  position: relative;
  background: linear-gradient(rgba(255, 255, 255, .88), rgba(218, 246, 251, .74) 49%, rgba(150, 216, 234, .7) 50%, rgba(208, 242, 242, .84));
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  backdrop-filter: blur(8px) saturate(1.2);
  border-bottom: 1px solid #5b9fb5;
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(255, 255, 255, .75), 0 8px 18px -10px rgba(8, 60, 100, .75);
  view-transition-name: site-bar;
}

.mast { height: 58px; display: flex; align-items: center; }
.mast a {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding-right: 8px;
  color: var(--ink-deep);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
}
.orb {
  flex: none;
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 118%, #c8f876 0, #4fc4a0 34%, #1c8fc9 62%, #0a5a9c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), inset 0 -4px 7px rgba(255, 255, 255, .4), 0 0 0 1px #2c6f86, 0 2px 4px rgba(8, 60, 100, .45);
  transition: transform .5s var(--ease);
}
.orb::before {
  content: "";
  position: absolute;
  inset: 5% 14% 50%;
  border-radius: 50%;
  background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .1));
}
.mast a:hover .orb { transform: rotate(-14deg) scale(1.06); }

/* ---------- glass panel ---------- */

.glass {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 12px;
  background: linear-gradient(rgba(255, 255, 255, .93), rgba(230, 249, 252, .86));
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 0 0 1px rgba(16, 96, 128, .4), var(--lift);
}
/* the sheen across the top of the pane */
.glass::before {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  top: -120px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(205, 240, 250, .5));
  pointer-events: none;
}
.glass > * { position: relative; }

/* ---------- home ---------- */

.home {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.75fr);
  gap: clamp(24px, 3.5vw, 52px);
  align-items: start;
  padding: clamp(28px, 6vh, 60px) 0 64px;
}

.profile { padding: clamp(20px, 2.2vw, 30px); }

.identity { display: flex; align-items: center; gap: 16px; }
.identity img {
  flex: none;
  width: 72px;
  height: 72px;
  object-fit: cover;
  padding: 3px;
  border: 1px solid #5b8fa6;
  border-radius: 9px;
  background: linear-gradient(#fff, #c9e6f1);
  box-shadow: inset 0 0 0 1px #fff, 0 3px 8px rgba(8, 60, 100, .4);
}
h1 { margin: 0; font-size: clamp(26px, 2.4vw, 32px); font-weight: 400; line-height: 1.12; letter-spacing: -.015em; color: var(--ink-deep); text-wrap: balance; }
.identity p { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }

.tagline { margin: 18px 0 8px; }

.links { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.links a { display: inline-block; padding: 8px 0; }

.profile h2 {
  margin: 22px 0 4px;
  padding-bottom: 7px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-deep);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 #fff;
}

.index { list-style: none; margin: 0 -10px; padding: 0; }
.work {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 10px 11px;
  border: 1px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
.work time { flex: none; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.work:hover, .work:focus-visible {
  border-color: #9fd3e8;
  background: linear-gradient(#f6fcff, #d9f0fa);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85);
}

/* ---------- viewer: brushed silver around a glass screen ---------- */

.viewer {
  min-width: 0;
  padding: 0 10px;
  border: 1px solid #62838d;
  border-radius: 16px;
  background: linear-gradient(#fdfefe, #e2ecef 9%, #c9d8dd 49%, #b6c9cf 50%, #dbe7ea);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .55), 0 20px 38px -16px rgba(6, 56, 92, .8);
}

.viewer-top, .viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #33515b;
  text-shadow: 0 1px 0 #fff;
}
.viewer-top { height: 38px; }
.viewer-top h2 { margin: 0; font: inherit; color: inherit; }
.viewer-bar { min-height: 58px; }

.lights { display: flex; gap: 6px; }
.lights i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fff, #b9c9ce 45%, #7f979e);
  box-shadow: 0 1px 0 #fff, inset 0 0 0 1px rgba(60, 90, 100, .5);
}
.lights i:last-child { background: radial-gradient(circle at 40% 30%, #f1ffd8, #8fdc3e 45%, #3f9a12); box-shadow: 0 1px 0 #fff, inset 0 0 0 1px rgba(40, 100, 10, .6), 0 0 6px #9be85a; }

.screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: 2px;
  overflow: hidden;
  border: 1px solid #1f3a43;
  border-radius: 6px;
  background: #0b2530;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, .35);
}
.screen:hover { color: #fff; }
/* glare on the screen glass */
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(116deg, rgba(255, 255, 255, .2) 0 16%, rgba(255, 255, 255, .06) 16% 31%, transparent 31%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 2px 10px rgba(0, 0, 0, .55);
  transition: opacity .6s var(--ease);
}
.screen:hover::after { opacity: .55; }
.shot { position: relative; display: block; min-width: 0; overflow: hidden; }
.shot img { display: block; }
.shot.wide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; transition: transform .8s var(--ease); }
.shot.tall { background: #000; }
.shot.tall img { width: 100%; height: auto; }
.screen:hover .shot.wide img { transform: scale(1.03); }

.caption {
  position: absolute;
  inset: auto 0 0;
  padding: 70px 22px 16px;
  background: linear-gradient(transparent, rgba(3, 28, 42, .9));
  font-size: clamp(22px, 3.6vw, 48px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.015em;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 40, 60, .7), 0 2px 10px rgba(0, 20, 40, .7);
}

.read {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 22px 1px;
  border: 1px solid #4f8a22;
  border-radius: 999px;
  color: #1f4208;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
  background: linear-gradient(#f0ffd6 0, #bfec88 49%, #8fd04f 50%, #c1ea8d 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(40, 80, 60, .55);
  transition: box-shadow .25s, transform .25s var(--ease);
}
.read:hover { color: #1f4208; box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(40, 80, 60, .5), 0 0 12px 2px rgba(170, 240, 100, .9); }
.read:active { transform: translateY(1px); background: linear-gradient(#d6f4ac 0, #a6dc6c 49%, #7cc23c 50%, #a8dc74 100%); }

/* The page arrives once: panels settle up out of the water. Content is visible without it. */
@media (prefers-reduced-motion: no-preference) {
  .home > * { animation: settle .9s var(--ease) both; }
  .home > :nth-child(2) { animation-delay: .08s; }
  @keyframes settle {
    from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(4px); }
  }
}

/* ---------- 404 ---------- */

.lost { max-width: 520px; padding: clamp(28px, 6vh, 60px) 0 64px; }
.lost .glass { padding: clamp(20px, 2.2vw, 30px); }
.lost p { margin: 12px 0 6px; }

/* ---------- small screens: intro and index first, viewer after ---------- */

@media (max-width: 820px) {
  .home { grid-template-columns: minmax(0, 1fr); max-width: 620px; padding-top: 22px; gap: 26px; }
  .caption { padding: 50px 14px 12px; font-size: clamp(22px, 6.4vw, 40px); }
}
@media (max-width: 420px) {
  .work { flex-direction: column; gap: 0; }
}
@media (pointer: coarse) {
  .read { min-height: 44px; }
  .links a { padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .orb, .shot.wide img, .read, .screen::after { transition: none; }
  .screen:hover .shot.wide img, .mast a:hover .orb { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .site-bar { -webkit-backdrop-filter: none; backdrop-filter: none; background: #eefafc; }
}
@media print {
  body::before, .site-bar, .viewer { display: none; }
  .glass { box-shadow: none; border: 0; background: none; }
}
