/* A quiet visual system for David's portfolio. */
:root {
  --ink: #17212d;
  --muted: #68737e;
  --paper: #f7f7f4;
  --line: #e1e6e1;
  --navy: #101927;
  --teal: #267e73;
  --mint: #e8f1ec;
  --content: 68rem;
  --radius: 0.85rem;
}

::selection { color: var(--navy); background: #c8e3d8; }
html { scroll-padding-top: 1.5rem; }
body { letter-spacing: -0.012em; }
.wrap { width: min(100% - 3rem, var(--content)); }

.header { position: absolute; }
.nav { height: 5.5rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 2.5rem; transition: opacity .2s ease; }
.brand:hover img { opacity: .76; }
.links { gap: clamp(1rem, 2.4vw, 2rem); }
.links a { opacity: .78; transition: opacity .2s ease, color .2s ease; }
.links a:hover, .links a:focus-visible { opacity: 1; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(48rem, 94svh);
  padding: 9rem 0 6rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 88% 49%, rgba(38,126,115,.16), transparent 28rem),
    var(--navy);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  right: max(2rem, calc((100vw - var(--content)) / 2 - 1rem));
  width: clamp(13rem, 27vw, 22rem);
  aspect-ratio: 1;
  border: 1px solid rgba(207, 228, 219, .13);
  border-radius: 50%;
  transform: translateY(-42%);
  box-shadow: 0 0 0 2.4rem rgba(207,228,219,.025), 0 0 0 5.2rem rgba(207,228,219,.02);
  pointer-events: none;
}
.hero-inner { max-width: 57rem; }
.hero .eyebrow { display: flex; align-items: center; gap: .75rem; }
.hero .eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: currentColor; opacity: .72; }
.hero h1 { max-width: 15ch; font-size: clamp(3.35rem, 7.6vw, 6.3rem); line-height: .99; letter-spacing: -.075em; }
.lead { max-width: 36rem; line-height: 1.75; }
.button { min-height: 2.8rem; align-items: center; justify-content: center; padding: .7rem 1.05rem; border-radius: .45rem; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary:hover { background: #319084; border-color: #319084; }
.button:not(.primary):hover { background: rgba(255,255,255,.08); border-color: #aeb9c1; }
.place { display: flex; align-items: center; gap: .55rem; margin-top: 2.6rem; }
.place::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: #89c7b4; box-shadow: 0 0 0 .22rem rgba(137,199,180,.12); }

.section { padding: clamp(4.5rem, 8vw, 7rem) 0; }
.section h2 { max-width: 20ch; font-size: clamp(2.15rem, 4.3vw, 3.3rem); letter-spacing: -.065em; }
.intro { max-width: 40rem; line-height: 1.75; margin-bottom: 2.5rem; }
.eyebrow { letter-spacing: .16em; }
.grid { gap: 1rem; }
.card { position: relative; min-height: 16rem; padding: clamp(1.3rem, 2.4vw, 1.8rem); border-radius: var(--radius); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.card:hover { transform: translateY(-3px); border-color: #c4d8cf; box-shadow: 0 16px 36px rgba(16,25,39,.055); }
.index { display: inline-flex; align-items: center; gap: .55rem; font-size: .64rem; }
.index::before { content: ""; display: inline-block; width: .38rem; height: .38rem; border-radius: 50%; background: currentColor; opacity: .8; }
.card h3 { max-width: 22ch; font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.15; }
.card p { max-width: 56ch; line-height: 1.7; }
.tag { padding: .35rem .62rem; background: #edf4f0; letter-spacing: .035em; }
.note { margin-top: 1.25rem !important; padding-top: .8rem; border-top: 1px solid #edf0ec; }

.pale { background: #eef2ef; }
.demo-shell { padding: clamp(1.1rem, 3vw, 1.8rem); border-radius: 1rem; box-shadow: 0 18px 50px rgba(16,25,39,.035); }
.demo-top { align-items: center; }
.demo-label { letter-spacing: .16em; }
.demo-top h3 { font-size: 1.3rem; }
.demo-filters select { min-height: 2.7rem; border-radius: .45rem; }
.demo-kpis { gap: .8rem; margin: 1.5rem 0; }
.demo-kpis article { padding: 1rem 1.1rem; border-radius: .6rem; }
.demo-kpis strong { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.chart-heading { margin-top: 1.2rem; }
.demo-chart { min-height: 13rem; }
.demo-chart svg { max-height: 15rem; }
.demo-status { display: flex; align-items: center; gap: .55rem; }
.demo-status::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; }
.demo-status.is-error::before { background: #a0443c; }

#experience .intro { margin-bottom: 2rem; }
.timeline { position: relative; gap: .75rem; }
.entry { display: grid; grid-template-columns: minmax(12rem, .65fr) 1.35fr; column-gap: 2rem; align-items: start; padding: 1.35rem 1.5rem; border: 1px solid var(--line); border-left: 2px solid #9ec9b8; border-radius: 0 var(--radius) var(--radius) 0; transition: border-color .2s ease, background .2s ease; }
.entry:hover { border-color: #bfd4ca; background: #fcfdfb; }
.entry h3 { grid-column: 1; grid-row: 1; font-size: 1rem; }
.entry p:first-of-type { grid-column: 1; grid-row: 2; margin-top: .5rem; font-size: .76rem; }
.entry p:last-of-type { grid-column: 2; grid-row: 1 / span 2; margin: 0; line-height: 1.7; }

.skills { gap: 1.5rem; margin-top: 1.5rem; }
.skills > div { padding-top: 1rem; border-top: 1px solid var(--line); }
.skills h3 { font-size: .68rem; letter-spacing: .13em; }
.chips { gap: .45rem; }
.chip { border-radius: 99px; padding: .42rem .68rem; transition: background .18s ease, border-color .18s ease; }
.chip:hover { background: var(--mint); border-color: #c4d8cf; }
.edu { border-radius: .65rem; padding: 1.2rem; }
.edu strong { font-size: .9rem; }

.contact { position: relative; overflow: hidden; padding: 5rem 0 1.5rem; }
.contact::before { content: ""; position: absolute; width: 25rem; aspect-ratio: 1; top: -13rem; right: -7rem; border: 1px solid rgba(207,228,219,.12); border-radius: 50%; box-shadow: 0 0 0 2rem rgba(207,228,219,.025), 0 0 0 4.5rem rgba(207,228,219,.02); pointer-events: none; }
.contact .wrap { position: relative; }
.contact .eyebrow { color: #a8ded2; }
.contact h2 { max-width: 13ch; }
.contact p { line-height: 1.75; }
.footer { padding-top: 1.2rem; }
.footer-brand img { width: 1.8rem; }

a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid #51a695; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (max-width: 700px) {
  .wrap { width: min(100% - 2rem, 42rem); }
  .nav { height: 4.5rem; }
  .links { max-width: calc(100vw - 6rem); gap: .85rem; overflow-x: auto; scrollbar-width: none; }
  .links::-webkit-scrollbar { display: none; }
  .links a { flex: 0 0 auto; font-size: .6rem; }
  .hero { min-height: 42rem; padding: 8rem 0 4.5rem; }
  .hero::after { right: -7rem; top: 23%; width: 15rem; }
  .hero h1 { max-width: 13ch; font-size: clamp(3.1rem, 13vw, 4.6rem); }
  .lead { font-size: 1rem; }
  .place { font-size: .58rem; letter-spacing: .08em; }
  .section { padding: 4.2rem 0; }
  .intro { margin-bottom: 1.8rem; }
  .grid { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .demo-top { align-items: flex-start; }
  .demo-filters { width: 100%; }
  .demo-filters label { flex: 1; }
  .demo-kpis { gap: .45rem; }
  .demo-kpis article { padding: .75rem .7rem; }
  .demo-kpis span { font-size: .54rem; }
  .demo-kpis strong { font-size: 1.3rem; }
  .entry { grid-template-columns: 1fr; row-gap: .2rem; padding: 1.15rem 1.2rem; }
  .entry h3, .entry p:first-of-type, .entry p:last-of-type { grid-column: 1; grid-row: auto; }
  .entry p:first-of-type { margin: .2rem 0 .6rem; }
  .entry p:last-of-type { margin: 0; }
  .skills { grid-template-columns: 1fr; gap: 1rem; }
  .education { grid-template-columns: 1fr; }
  .contact { padding-top: 4.3rem; }
}
