:root {
  color-scheme: light;
  --paper: #f4f7f6;
  --panel: #ffffff;
  --ink: #15202b;
  --muted: #5b6b76;
  --line: #d5dee3;
  --teal: #0d7a6f;
  --teal-soft: #d8f0ec;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --font-brand: "Caveat Brush", "Apple Chancery", cursive;
  --pad: clamp(1.25rem, 3vw, 2.5rem);
  --header-h: 4.25rem;
}

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

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, #cfe8e4 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, #e8eef2 0%, transparent 50%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

/* —— Sticky header —— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  min-height: var(--header-h);
  padding: 0.85rem var(--pad);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.brand {
  font-family: var(--font-brand);
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  line-height: 1;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand:hover {
  color: color-mix(in srgb, var(--teal) 82%, black);
}

.header-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* —— Page / 3-column hero —— */

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1.2fr) minmax(14rem, 0.85fr);
  gap: 0;
  align-items: start;
  min-height: calc(100dvh - var(--header-h));
  animation: enter 420ms ease-out both;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.col {
  min-width: 0;
  min-height: 0;
  padding: 1.5rem var(--pad);
}

/* Col 1 — photo */

.col-photo {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.photo-wrap {
  height: min(calc(100dvh - var(--header-h) - 3rem), 34rem);
  width: auto;
  aspect-ratio: 3 / 4;
  border-radius: 1.15rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 88%, #000 12%);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 55%, transparent) inset,
    0 8px 24px rgba(21, 32, 43, 0.06);
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Col 2 — message / tools */

.col-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.1rem;
}

.message {
  display: grid;
  gap: 0.85rem;
  padding: 1.05rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, #fff 70%, var(--line));
  background: color-mix(in srgb, var(--panel) 55%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 24px rgba(21, 32, 43, 0.06);
}

.quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink);
}

.quote::before {
  content: "“";
}

.quote::after {
  content: "”";
}

.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid color-mix(in srgb, var(--teal) 12%, var(--line));
  font-size: 0.86rem;
  font-style: normal;
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--teal) 20%, var(--line));
  background: color-mix(in srgb, var(--panel) 70%, var(--teal-soft));
  color: var(--teal);
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.contact:hover {
  background: var(--teal-soft);
  border-color: color-mix(in srgb, var(--teal) 42%, var(--line));
  box-shadow: 0 4px 12px rgba(21, 32, 43, 0.06);
  transform: translateY(-1px);
}

.contact img {
  flex-shrink: 0;
}

.tools-title {
  margin: 0 0 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.tool {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name status"
    "blurb blurb";
  gap: 0.2rem 0.65rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.tool:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(21, 32, 43, 0.06);
  transform: translateY(-1px);
}

.tool-name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.tool:hover .tool-name {
  color: var(--teal);
}

.tool-blurb {
  grid-area: blurb;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.tool-status {
  grid-area: status;
  align-self: start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.tool-status.is-live {
  color: var(--teal);
  background: var(--teal-soft);
}

/* Col 3 — CV */

.col-cv {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.5rem;
}

.cv-title {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.cv-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
}

.cv-list li {
  padding: 0.7rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.cv-list li:first-child {
  padding-top: 0.4rem;
  border-top: none;
}

.cv-list li:last-child {
  padding-bottom: 0;
}

.cv-years {
  margin: 0;
  font-family: ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cv-text {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
}

/* —— Responsive —— */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 0;
  }

  .col-cv {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .col-photo {
    justify-content: center;
  }

  .photo-wrap {
    height: auto;
    width: min(16rem, 70vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero {
    animation: none;
  }

  .contact,
  .tool {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
