/* =========================================================
   Belle Keel — kombu green + sand
   Layers: the page is the deepest green, cards sit a shade
   above it, and one warm sand plate carries the name.
   Neumorphism is reserved for things you touch — the nav
   links, the contact pills, the monogram, the form controls
   and the send button. Those share their parent's exact
   background and get two opposing shadows; nothing else does.
   ========================================================= */

:root {
  /* greens, deepest to lightest */
  --bg:        #2f3a2b;   /* page */
  --surface:   #354230;   /* kombu green — cards, and the base every button extrudes from */
  --edge:      rgba(214, 198, 161, .10);

  /* the two opposing shadows, struck from --surface */
  --shade:     #212a1d;
  --light:     #48593d;

  /* warm layer */
  --sand:      #d7c7a2;
  --sand-deep: #bcaa83;
  --sand-dim:  rgba(215, 199, 162, .55);
  --on-sand:   #2a3324;
  --on-sand-2: #4c5c43;

  --ink:       #eceedd;
  --ink-soft:  #b6c0a5;
  --ink-faint: #8e9a82;

  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 13px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.4, .14, .3, 1);

  /* flat elevation for layers */
  --lift:      0 18px 38px -24px rgba(14, 19, 12, .9);
  --lift-high: 0 26px 52px -26px rgba(14, 19, 12, .95);

  /* neumorphic depth for controls */
  --shadow-out: 6px 6px 13px var(--shade), -6px -6px 13px var(--light);
  --shadow-out-lift: 10px 10px 22px var(--shade), -9px -9px 20px var(--light);
  --shadow-in: inset 5px 5px 11px var(--shade), inset -5px -5px 11px var(--light);
  --shadow-in-deep: inset 7px 7px 15px var(--shade), inset -6px -6px 13px var(--light);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-variation-settings: "opsz" 96;
  letter-spacing: -.012em;
  margin: 0;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 18px;
  border-radius: var(--r-sm);
  background: var(--sand);
  color: var(--on-sand);
  z-index: 99;
}
.skip:focus { left: 16px; top: 16px; }

/* ---------- top bar ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  padding: 18px clamp(14px, 4vw, 40px);
  transition: padding .45s var(--ease);
}
.topbar.is-scrolled { padding-top: 12px; }

.nav {
  max-width: 760px;
  margin: 0 auto;
  padding: 9px 10px 9px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--edge);
  box-shadow: var(--lift);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.topbar.is-scrolled .nav {
  box-shadow: var(--lift-high);
  border-color: rgba(215, 199, 162, .16);
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-in);
  text-decoration: none;
  transition: box-shadow .4s var(--ease);
}
.mark span {
  font-family: "Fraunces", Georgia, serif;
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--sand-deep);
  transition: color .4s var(--ease);
}
.mark:hover span { color: var(--sand); }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  background: var(--surface);
  box-shadow: 0 0 0 rgba(0,0,0,0), 0 0 0 rgba(0,0,0,0);
  transition: box-shadow .4s var(--ease), color .35s var(--ease), transform .4s var(--ease);
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  box-shadow: var(--shadow-out);
}
.nav-links a:active { box-shadow: var(--shadow-in); transform: translateY(1px); }

/* the one small sand control */
.nav-cta {
  background: var(--sand) !important;
  color: var(--on-sand) !important;
  font-weight: 600;
  box-shadow: 4px 4px 10px var(--shade), -4px -4px 10px var(--light) !important;
  transition: box-shadow .4s var(--ease), background-color .4s var(--ease), transform .4s var(--ease);
}
.nav-cta:hover {
  background: #e3d4b2 !important;
  box-shadow: 7px 7px 16px var(--shade), -6px -6px 14px var(--light) !important;
  transform: translateY(-1px);
}
.nav-cta:active {
  box-shadow: inset 4px 4px 9px rgba(42, 51, 36, .32), inset -3px -3px 8px rgba(255, 252, 240, .5) !important;
  transform: translateY(0);
}

/* ---------- layout ---------- */

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 40px);
}

.card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  box-shadow: var(--lift);
  padding: clamp(26px, 5.5vw, 46px);
}

section { margin-bottom: clamp(26px, 5vw, 46px); }

/* ---------- hero ---------- */

.hero { padding-top: clamp(118px, 20vw, 168px); }

.hero-card {
  transform-style: preserve-3d;
  transition: box-shadow .6s var(--ease), transform .7s var(--ease-soft);
  will-change: transform;
}
.hero-card.is-tilting { transition: box-shadow .6s var(--ease), transform .12s linear; }

/* the sand plate — the card stock the name is printed on */
.hero-plate {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3.5vw, 30px);
  background: var(--sand);
  color: var(--on-sand);
  border-radius: var(--r-md);
  padding: clamp(24px, 5vw, 40px) clamp(20px, 4.5vw, 38px);
  margin-bottom: clamp(20px, 3.5vw, 30px);
  box-shadow: 0 14px 30px -20px rgba(14, 19, 12, .9);
}

/* the headshot's own backdrop is nearly --sand, so it needs an edge to sit on */
.avatar {
  width: clamp(96px, 17vw, 132px);
  height: auto;
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(42, 51, 36, .14);
  box-shadow: 0 8px 18px -12px rgba(14, 19, 12, .55);
}

.hero-id { min-width: 0; }

h1 {
  font-size: clamp(2.5rem, 10.5vw, 4.4rem);
  line-height: .96;
  margin-bottom: .3em;
  color: var(--on-sand);
}

.role {
  margin: 0;
  padding-top: .55em;
  border-top: 1px solid rgba(42, 51, 36, .18);
  color: var(--on-sand-2);
  font-size: clamp(.95rem, 3.4vw, 1.06rem);
  line-height: 1.5;
}

.hero-links {
  display: grid;
  gap: 12px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-out);
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  overflow-wrap: anywhere;
  transition: box-shadow .45s var(--ease), color .35s var(--ease), transform .45s var(--ease);
}
.pill svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: var(--sand-deep);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .35s var(--ease), transform .5s var(--ease);
}
.pill:hover, .pill:focus-visible {
  color: var(--ink);
  box-shadow: var(--shadow-out-lift);
  transform: translateY(-2px);
}
.pill:hover svg { stroke: var(--sand); transform: translateX(2px); }
.pill:active {
  box-shadow: var(--shadow-in);
  transform: translateY(0);
  color: var(--ink-soft);
}

/* ---------- experience timeline ---------- */
/* flat throughout — nothing in here is a control, so nothing is extruded */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tl-item {
  position: relative;
  padding-left: 58px;
  padding-bottom: clamp(26px, 4vw, 34px);
}
.tl-item:last-child { padding-bottom: 0; }

/* the connecting line: each item draws the segment down to the next node,
   so the line always stops cleanly at the last one */
.tl-item::before {
  content: "";
  position: absolute;
  left: 19.5px;
  top: 44px;
  bottom: 4px;
  width: 1px;
  background: rgba(215, 199, 162, .20);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .75s var(--ease) .12s;
}
.tl-item.is-in::before { transform: scaleY(1); }
.tl-item:last-child::before { display: none; }

.tl-node {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--edge);
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.tl-node svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--sand-deep);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .4s var(--ease);
}
.tl-item:hover .tl-node { border-color: var(--sand-dim); }
.tl-item:hover .tl-node svg { stroke: var(--sand); }

.tl-role {
  margin: 0 0 2px;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.tl-org {
  margin: 0 0 5px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sand);
}
.tl-type { font-weight: 400; color: var(--ink-faint); }

.tl-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: .012em;
  color: var(--ink-faint);
}

/* ---------- about + contact ---------- */

h2 {
  font-size: clamp(1.45rem, 5vw, 1.9rem);
  color: var(--sand);
  margin-bottom: .55em;
}

.card h2 + p { margin-top: 0; }

.about p, .contact-note { color: var(--ink-soft); }
.about p { margin: 0 0 1.15em; }
.about p:last-child { margin-bottom: 0; }

.contact-note { margin: 0 0 2em; font-size: 15.5px; }
.contact-note a {
  color: var(--sand);
  text-decoration: none;
  border-bottom: 1px solid var(--sand-dim);
  padding-bottom: 1px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.contact-note a:hover { color: #ecdfc0; border-color: #ecdfc0; }

/* ---------- form ---------- */

.hp { position: absolute; left: -9999px; opacity: 0; }

.field { margin-bottom: 20px; }

label {
  display: block;
  margin-bottom: 9px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-faint);
  transition: color .35s var(--ease);
}
.field:focus-within label { color: var(--sand); }

/* flat fields — the only extruded thing down here is the send button */
input[type="text"], input[type="email"], textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
  padding: 15px 18px;
  box-shadow: none;
  outline: none;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease),
              background-color .35s var(--ease);
}
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

input:hover:not(:focus), textarea:hover:not(:focus) {
  border-color: rgba(215, 199, 162, .22);
}
input:focus, textarea:focus,
input:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--sand-dim);
  box-shadow: 0 0 0 3px rgba(215, 199, 162, .13);
}
input.invalid, textarea.invalid {
  border-color: #b06b45;
  box-shadow: 0 0 0 3px rgba(176, 107, 69, .15);
}

::placeholder { color: var(--ink-faint); }

.submit {
  position: relative;
  width: 100%;
  margin-top: 8px;
  padding: 17px 24px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--sand);
  background: var(--surface);
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
  box-shadow: var(--shadow-out);
  transition: box-shadow .45s var(--ease), transform .45s var(--ease),
              color .4s var(--ease), background-color .4s var(--ease);
}
.submit:hover:not(:disabled) {
  background: var(--sand);
  color: var(--on-sand);
  box-shadow: var(--shadow-out-lift);
  transform: translateY(-2px);
}
.submit:active:not(:disabled) {
  background: var(--sand-deep);
  color: var(--on-sand);
  box-shadow: inset 5px 5px 12px rgba(42, 51, 36, .35), inset -4px -4px 10px rgba(255, 252, 240, .45);
  transform: translateY(0);
}
.submit:disabled { cursor: progress; box-shadow: var(--shadow-in); color: var(--ink-faint); }

.submit.is-sending .submit-label { opacity: .55; }
.submit-label { transition: opacity .3s var(--ease); }

.form-status {
  min-height: 1.4em;
  margin: 16px 0 0;
  font-size: 14.5px;
  color: var(--ink-faint);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.form-status.is-shown { opacity: 1; transform: none; }
.form-status.ok { color: var(--sand); }
.form-status.err { color: #e0a07f; }

/* ---------- footer ---------- */

.footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px clamp(14px, 4vw, 40px) clamp(40px, 8vw, 70px);
  text-align: center;
}
.footer p {
  margin: 0;
  font-size: 13px;
  letter-spacing: .05em;
  color: var(--ink-faint);
}

/* ---------- focus ---------- */

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

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  :root {
    --shadow-out: 4px 4px 9px var(--shade), -4px -4px 9px var(--light);
    --shadow-out-lift: 7px 7px 16px var(--shade), -6px -6px 14px var(--light);
    --shadow-in: inset 4px 4px 9px var(--shade), inset -4px -4px 9px var(--light);
    --shadow-in-deep: inset 5px 5px 12px var(--shade), inset -5px -5px 11px var(--light);
    --lift: 0 14px 28px -20px rgba(14, 19, 12, .9);
    --r-lg: 22px;
  }
  html { scroll-padding-top: 92px; }
  body { font-size: 16px; }
  .topbar { padding: 12px 14px; }
  .nav { padding: 7px 8px 7px 9px; }
  .mark { width: 38px; height: 38px; }
  .nav-links a { padding: 8px 14px; font-size: 14px; }
  .hero { padding-top: 104px; }
  .pill { font-size: 13.5px; padding: 14px 16px; gap: 11px; }

  .hero-plate { flex-direction: column; align-items: flex-start; gap: 18px; }
  .avatar { width: 88px; }

  .tl-item { padding-left: 50px; }
  .tl-item::before { left: 16.5px; top: 38px; }
  .tl-node { width: 34px; height: 34px; }
  .tl-node svg { width: 16px; height: 16px; }
  .tl-role { font-size: .98rem; }
  .tl-meta { display: flex; flex-direction: column; }
  .tl-sep { display: none; }
}

/* three nav links plus the monogram on the narrowest phones */
@media (max-width: 380px) {
  .nav-links { gap: 3px; }
  .nav-links a { padding: 7px 11px; font-size: 13.5px; }
}

/* fine pointers only — no hover artefacts on touch */
@media (hover: none) {
  .pill:hover, .submit:hover:not(:disabled) { transform: none; box-shadow: var(--shadow-out); }
  .submit:hover:not(:disabled) { background: var(--surface); color: var(--sand); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
