/* ============================================================
   justinduino.com, built on Apple's Human Interface Guidelines
   (iOS/macOS 27): Liquid Glass for the floating navigation layer,
   standard grouped surfaces for content, system type, semantic color.
   ============================================================ */

/* ---------- semantic color (mirrors iOS system colors; web has no API for them) ---------- */
:root {
  color-scheme: light dark;

  --bg: #f2f2f7;                      /* systemGroupedBackground */
  --bg-elevated: #ffffff;             /* secondarySystemGroupedBackground */
  --fill: rgba(120, 120, 128, 0.20);
  --fill-secondary: rgba(120, 120, 128, 0.16);
  --fill-tertiary: rgba(118, 118, 128, 0.12);
  --label: #000000;
  --label-secondary: #6e6e73;         /* darker than iOS secondaryLabel to hold 4.5:1 on body text */
  --label-tertiary: rgba(60, 60, 67, 0.30);
  --separator: rgba(60, 60, 67, 0.29);

  --accent: #5856d6;                  /* systemIndigo */
  --accent-text: #5856d6;
  --on-accent: #ffffff;

  --brand-cuterie: #a3472a;

  --glass-fill: rgba(255, 255, 255, 0.62);
  --glass-stroke: rgba(255, 255, 255, 0.80);
  --glass-edge: rgba(0, 0, 0, 0.07);
  --glass-shadow: rgba(0, 0, 0, 0.12);
  --glass-sheen: rgba(255, 255, 255, 0.55);
  --glass-selected: rgba(0, 0, 0, 0.06);

  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-card: 22px;
  --radius-photo: 28px;
  --margin: max(20px, env(safe-area-inset-left));
  --content: 1000px;
  --reading: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --fill: rgba(120, 120, 128, 0.36);
    --fill-secondary: rgba(120, 120, 128, 0.32);
    --fill-tertiary: rgba(118, 118, 128, 0.24);
    --label: #ffffff;
    --label-secondary: #a1a1a6;
    --label-tertiary: rgba(235, 235, 245, 0.30);
    --separator: rgba(84, 84, 88, 0.65);

    --accent: #5e5ce6;
    --accent-text: #8e8cff;
    --brand-cuterie: #8f3d23;

    --glass-fill: rgba(44, 44, 48, 0.52);
    --glass-stroke: rgba(255, 255, 255, 0.16);
    --glass-edge: rgba(0, 0, 0, 0.45);
    --glass-shadow: rgba(0, 0, 0, 0.50);
    --glass-sheen: rgba(255, 255, 255, 0.14);
    --glass-selected: rgba(255, 255, 255, 0.10);
  }
}

/* Increase Contrast */
@media (prefers-contrast: more) {
  :root {
    --label-secondary: #3a3a3c;
    --separator: rgba(60, 60, 67, 0.60);
    --accent: #3634a3;
    --accent-text: #3634a3;
    --glass-fill: rgba(255, 255, 255, 0.90);
    --glass-stroke: rgba(0, 0, 0, 0.35);
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --label-secondary: #d1d1d6;
      --separator: rgba(235, 235, 245, 0.45);
      --accent: #5e5ce6;
      --accent-text: #a5a3ff;
      --glass-fill: rgba(28, 28, 30, 0.92);
      --glass-stroke: rgba(255, 255, 255, 0.45);
    }
  }
}

/* ---------- type: rem-based so iOS Dynamic Type can scale it ---------- */
html { font-size: 106.25%; } /* 17px body, the iOS default */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html { font: -apple-system-body; } /* follows the reader's Dynamic Type setting on iPhone/iPad */
}

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }

.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 12px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--bg-elevated); color: var(--label); padding: 12px 18px; border-radius: 14px; font-weight: 600;
}
.skip-link:focus { top: 16px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================================================
   Navigation layer: Liquid Glass
   ============================================================ */
.glass {
  position: relative;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 0.5px solid var(--glass-stroke);
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    0 0 0 0.5px var(--glass-edge),
    0 10px 36px var(--glass-shadow);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, var(--glass-sheen), transparent 45%);
  opacity: 0.6;
}

@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--bg-elevated); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass::before { display: none; }
}

/* Scroll edge effect: a soft blur/fade only where content scrolls under floating controls */
.edge { position: fixed; left: 0; right: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.edge-top {
  top: 0; height: 108px; display: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 88%, transparent) 30%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
}
.edge-bottom {
  bottom: 0; height: calc(118px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 70%, transparent), transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to top, #000 35%, transparent);
  mask-image: linear-gradient(to top, #000 35%, transparent);
}
.is-scrolled .edge-top, .edge-bottom { opacity: 1; }

/* Top row (regular width): title, tab bar, primary action */
.chrome { position: fixed; z-index: 50; pointer-events: none; }
.chrome > * { pointer-events: auto; }
.chrome-title, .chrome-action { display: none; }

/* Tab bar: floats at the bottom on compact width (iPhone) */
.tabbar {
  position: fixed; z-index: 50;
  left: 50%; bottom: calc(env(safe-area-inset-bottom) + 12px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px;
  transition: left .35s cubic-bezier(.32,.72,0,1), transform .35s cubic-bezier(.32,.72,0,1);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 60px; min-height: 54px; padding: 0 8px; border-radius: 999px;
  color: var(--label); font-size: 11px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden;
  max-width: 120px;
  transition: max-width .35s cubic-bezier(.32,.72,0,1), opacity .2s ease, padding .35s ease, background-color .2s ease, transform .15s ease;
}
.tab .icon { width: 23px; height: 23px; stroke-width: 1.8; }
.tab.is-current { color: var(--accent-text); background: var(--glass-selected); }
.tab:active { transform: scale(0.94); }

/* Minimized on scroll down (compact), like iOS tabBarMinimizeBehavior */
.tabbar.is-minimized { left: var(--margin); transform: translateX(0); }
.tabbar.is-minimized .tab:not(.is-current) { max-width: 0; min-width: 0; padding: 0; opacity: 0; }
.tabbar.is-minimized .tab.is-current { min-width: 54px; }
.tabbar.is-minimized .tab span { display: none; }

@media (min-width: 768px) {
  .edge-top { display: block; }
  .edge-bottom { display: none; }

  .chrome {
    top: 14px; left: var(--margin); right: var(--margin);
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  }
  .chrome-action { display: inline-flex; justify-self: end; }
  .tabbar { position: static; transform: none; grid-column: 2; }
  .tab { flex-direction: row; gap: 7px; min-height: 40px; padding: 0 14px; font-size: 15px; font-weight: 600; }
  .tab .icon { width: 18px; height: 18px; stroke-width: 2; }
}
@media (min-width: 900px) {
  .chrome-title {
    display: inline-flex; justify-self: start; align-items: center; min-height: 44px; padding: 0 6px;
    color: var(--label); font-size: 17px; font-weight: 600;
  }
}

/* Glass button in the navigation layer; prominent = accent tints the glass, not the label */
.glass-btn {
  align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--label); transition: transform .15s ease, filter .2s ease;
}
.glass-btn.prominent { background: color-mix(in srgb, var(--accent) 88%, transparent); color: var(--on-accent); }
.glass-btn .icon { width: 17px; height: 17px; stroke-width: 2.1; }
.glass-btn:active { transform: scale(0.96); }
@media (hover: hover) {
  .glass-btn:hover, .tab:hover { filter: brightness(1.06); }
}

/* ============================================================
   Content layer
   ============================================================ */
main {
  max-width: calc(var(--content) + 2 * var(--margin));
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 24px) var(--margin) calc(130px + env(safe-area-inset-bottom));
}
@media (min-width: 768px) { main { padding-top: 104px; padding-bottom: 80px; } }

section { scroll-margin-top: 96px; }
.section { padding-top: 64px; }
@media (min-width: 768px) { .section { padding-top: 88px; } }

.section-head { margin-bottom: 20px; max-width: var(--reading); }
.section-head h2 { font-size: clamp(1.65rem, 1.15rem + 1.6vw, 2.35rem); line-height: 1.12; letter-spacing: -0.012em; }
.section-head p { margin-top: 10px; color: var(--label-secondary); font-size: 1.06rem; }

/* ---------- hero ---------- */
.hero { display: grid; gap: 28px; align-items: center; }
@media (min-width: 768px) { .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 52px; padding-top: 24px; } }

.hero-photo { margin: 0; border-radius: var(--radius-photo); overflow: hidden; background: var(--fill-tertiary); aspect-ratio: 4 / 5; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 18%; }
@media (max-width: 767px) { .hero-photo { aspect-ratio: 1 / 1; } }

.eyebrow { color: var(--label-secondary); font-size: 0.94rem; font-weight: 600; margin-bottom: 10px; }
.hero h1 { font-size: clamp(2.6rem, 1.4rem + 5vw, 4.7rem); line-height: 1.02; letter-spacing: -0.022em; }
.lede { margin-top: 16px; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); line-height: 1.4; color: var(--label-secondary); max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Content-layer buttons: borderedProminent and bordered (no glass in content) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; text-align: center;
  transition: transform .15s ease, opacity .15s ease, filter .2s ease;
}
.btn .icon { width: 1.05em; height: 1.05em; stroke-width: 2.1; }
.btn-prominent { background: var(--accent); color: var(--on-accent); }
.btn-bordered { background: var(--fill-tertiary); color: var(--accent-text); }
.btn:active { transform: scale(0.97); opacity: 0.85; }
@media (hover: hover) { .btn:hover { filter: brightness(1.08); } }

/* ---------- highlights: one grouped card, hairline dividers, centered figures ---------- */
.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 40px; background: var(--bg-elevated); border-radius: var(--radius-card); overflow: hidden;
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; } }
.stat { position: relative; padding: 26px 16px 24px; text-align: center; }
.stat::before, .stat::after { content: ""; position: absolute; background: var(--separator); }
/* compact: 2×2 grid with a center cross */
.stat:nth-child(odd)::after { top: 18px; bottom: 18px; right: 0; width: 1px; transform: scaleX(0.5); }
.stat:nth-child(n+3)::before { top: 0; left: 18px; right: 18px; height: 1px; transform: scaleY(0.5); }
@media (min-width: 768px) {
  .stat { padding: 32px 16px 30px; }
  .stat:nth-child(n+3)::before { display: none; }
  .stat:not(:last-child)::after { top: 24px; bottom: 24px; right: 0; width: 1px; transform: scaleX(0.5); }
}
.stat-value {
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.1rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; color: var(--label);
}
.stat-label { margin: 10px auto 0; max-width: 13em; color: var(--label-secondary); font-size: 0.88rem; line-height: 1.35; text-wrap: balance; }

/* ---------- about ---------- */
.prose { max-width: var(--reading); }
.prose p + p { margin-top: 1em; }
.prose p { color: var(--label); }

/* ---------- inset grouped list (Settings-style) ---------- */
.list { background: var(--bg-elevated); border-radius: var(--radius-card); overflow: hidden; }
.list + .list, .group-label + .list { margin-top: 0; }
.row {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 14px 18px; color: var(--label);
}
.row + .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: var(--row-inset, 18px);
  height: 1px; background: var(--separator); transform: scaleY(0.5); transform-origin: top;
}
.list.has-icons { --row-inset: 62px; }
.row-body { flex: 1; min-width: 0; }
.row-title { display: block; font-weight: 600; }
.row-sub { display: block; margin-top: 2px; color: var(--label-secondary); font-size: 0.88rem; overflow-wrap: anywhere; }
.row-desc { margin-top: 8px; color: var(--label-secondary); font-size: 0.94rem; line-height: 1.42; }
.row-detail { color: var(--label-secondary); font-size: 0.88rem; white-space: nowrap; align-self: flex-start; padding-top: 1px; }
.row-accessory { width: 14px; height: 14px; color: var(--label-tertiary); stroke-width: 2.6; }
a.row { transition: background-color .15s ease; }
a.row:active { background: var(--fill-tertiary); }
@media (hover: hover) { a.row:hover { background: var(--fill-tertiary); } }
.row-link .row-title { color: var(--accent-text); font-weight: 600; }

.row-icon {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  color: #fff; font-size: 17px; box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}
.row-icon .icon { width: 18px; height: 18px; stroke-width: 2.1; }
.row-icon img { width: 30px; height: 30px; border-radius: 8px; }
.row-icon.logo { background: #fff; overflow: hidden; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12); }
.row-icon.logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.row-icon.logo.pad img { padding: 3px; }

.group-label { margin: 28px 0 8px 18px; }
.group-label h3 { font-size: 1.06rem; font-weight: 700; }
.group-label p { color: var(--label-secondary); font-size: 0.82rem; margin-top: 2px; }
.group-label:first-child { margin-top: 0; }

.list-footer { margin-top: 14px; }

/* ---------- cuterie (brand color lives in the content layer) ---------- */
.feature {
  position: relative; overflow: hidden; border-radius: var(--radius-photo); color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 196, 150, 0.35), transparent 55%),
    var(--brand-cuterie);
  padding: 28px;
  display: grid; gap: 24px;
}
@media (min-width: 768px) { .feature { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: end; padding: 44px; } }
.feature-head { display: flex; align-items: center; gap: 16px; }
.app-icon { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); flex-shrink: 0; }
.feature-title { font-size: clamp(1.65rem, 1.3rem + 1vw, 2.1rem); line-height: 1.1; letter-spacing: -0.01em; }
.feature-sub { color: rgba(255, 255, 255, 0.82); font-size: 0.94rem; font-weight: 600; margin-top: 2px; }
.feature-body { margin-top: 20px; color: rgba(255, 255, 255, 0.92); }
.feature-note { margin-top: 12px; color: rgba(255, 255, 255, 0.82); font-size: 0.88rem; }
.feature-side { display: grid; gap: 16px; justify-items: start; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badges a { border-radius: 9px; }
.badges img { height: 44px; width: auto; }
.feature-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #fff; font-weight: 600; }
.feature-link .icon { width: 15px; height: 15px; stroke-width: 2.4; }

/* ---------- photography: horizontal shelf of Instagram embeds ---------- */
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; max-width: none; }
.shelf-controls { display: none; gap: 10px; flex-shrink: 0; }
@media (min-width: 768px) and (hover: hover) { .shelf-controls { display: flex; } }
.shelf-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--fill-tertiary); color: var(--label); transition: transform .15s ease, opacity .2s ease;
}
.shelf-btn .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.shelf-btn:active { transform: scale(0.94); }
.shelf-btn:disabled { opacity: 0.35; cursor: default; }

.shelf {
  display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  --bleed: max(var(--margin), calc((100vw - var(--content)) / 2));
  margin-inline: calc(-1 * var(--bleed)); padding: 4px var(--bleed) 12px; scroll-padding-inline: var(--bleed);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf:focus-visible { outline-offset: -3px; }
.shelf-item { flex: 0 0 330px; scroll-snap-align: start; }
@media (min-width: 768px) { .shelf-item { flex-basis: 340px; } }

/* Instagram's embed swaps the blockquote for an iframe; fit it to the shelf and round it to match */
.shelf-item .instagram-media {
  margin: 0 !important; min-width: 0 !important; max-width: 100% !important; width: 100% !important;
  border-radius: var(--radius-card) !important; overflow: hidden; box-shadow: none !important;
  border: 0.5px solid var(--separator) !important; background: var(--bg-elevated) !important;
}
/* Before the embed loads, or if a content blocker stops it */
.shelf-item blockquote.instagram-media {
  display: grid; place-items: center; min-height: 440px; padding: 0 !important;
}
.shelf-item blockquote.instagram-media a { color: var(--accent-text); font-weight: 600; padding: 12px; }

/* ---------- resume page ---------- */
.page-head { padding-top: 12px; }
.page-head h1 { font-size: clamp(2.4rem, 1.5rem + 3.6vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; margin-top: 10px; font-size: 0.94rem; }
.contact-line span { color: var(--label-secondary); }
.contact-line a { display: inline-flex; align-items: center; min-height: 44px; }

.notice {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; padding: 14px 18px;
  background: var(--bg-elevated); border-radius: 16px; color: var(--label-secondary); font-size: 0.88rem; max-width: var(--reading);
}
.notice .icon { width: 19px; height: 19px; color: var(--accent-text); margin-top: 1px; }

.bullets { margin: 8px 0 0; padding-left: 1.15em; color: var(--label-secondary); font-size: 0.94rem; line-height: 1.42; }
.bullets li + li { margin-top: 6px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--separator); color: var(--label-secondary); font-size: 0.82rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- print ---------- */
@media print {
  :root { --bg: #fff; --bg-elevated: #fff; --label: #000; --label-secondary: #333; --separator: #bbb; --accent-text: #000; }
  .chrome, .tabbar, .edge, .skip-link, .notice, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .section { padding-top: 24px; }
  .list { border: 1px solid #ddd; break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; }
}
