/* Anthony Durand — portfolio
   Hand-written, no framework. Mobile first. */

@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/albert-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/albert-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #000;
  --surface: #0e0c09;
  --surface-warm: #1a140c;
  --line: rgba(255, 255, 255, 0.11);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.68);
  --faint: rgba(255, 255, 255, 0.45);
  --accent: #ffb800;
  --accent-ink: #171000;
  --brown: #47351f;

  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1120px;
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dock-space: calc(92px + env(safe-area-inset-bottom, 0px));
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color-scheme: dark;
  scroll-padding-top: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}

.btn:hover {
  background: #ffc933;
  transform: translateY(-1px);
}

.btn:active {
  transform: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.hero__media {
  position: relative;
  z-index: -1;
  height: min(54svh, 500px);
  min-height: 320px;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 71% 50%;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.72) 22%, rgba(0, 0, 0, 0) 58%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 26%);
}

.hero__top {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  white-space: nowrap;
}

/* Smallest phones: keep the status and the button on one line. */
@media (max-width: 359px) {
  .status {
    gap: 8px;
    font-size: 0.875rem;
  }

  .hero__top .btn {
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.875rem;
  }
}

.status::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.18);
}

.hero__body {
  position: relative;
  margin-top: -88px;
  padding-bottom: 56px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: clamp(0.9375rem, 0.6rem + 1.4vw, 1.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
}

.hero h1 {
  margin-top: 10px;
  font-size: clamp(2.875rem, 1.6rem + 6.4vw, 5.25rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  max-width: 34ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.contacts {
  display: grid;
  gap: 4px;
  margin-top: 28px;
}

.contacts a,
.contacts span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contacts .icon {
  color: var(--accent);
  width: 22px;
  height: 22px;
}

.contacts a {
  transition: color 0.2s var(--ease);
}

.contacts a:hover {
  color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__body > * {
    animation: rise 0.9s var(--ease) both;
  }

  .hero__body > :nth-child(2) {
    animation-delay: 0.07s;
  }

  .hero__body > :nth-child(3) {
    animation-delay: 0.14s;
  }

  .hero__body > :nth-child(4) {
    animation-delay: 0.21s;
  }

  .hero__media img {
    animation: fade 1.4s ease-out both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: max(100svh, 640px);
  }

  .hero__media {
    position: absolute;
    inset: 0 0 0 auto;
    width: 82%;
    height: auto;
    min-height: 0;
  }

  .hero__media img {
    object-position: 60% 28%;
  }

  .hero__media::after {
    background:
      linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.7) 16%, rgba(0, 0, 0, 0) 44%),
      linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0) 30%);
  }

  .hero h1 {
    font-size: clamp(3.5rem, 5.2vw, 5.25rem);
  }

  .hero__top {
    position: static;
    padding-top: 32px;
  }

  .hero__body {
    align-self: center;
    margin-top: 0;
    padding-block: 48px calc(var(--dock-space) + 32px);
  }

  .contacts {
    margin-top: 36px;
  }
}

@media (min-width: 1200px) {
  .contacts {
    grid-template-columns: repeat(2, max-content);
    column-gap: 48px;
    margin-top: 44px;
  }
}

/* ---------- Dock ---------- */

.dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  gap: 2px;
  max-width: calc(100% - 24px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 25, 18, 0.74);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  transform: translateX(-50%);
}

.dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.dock a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.dock a[aria-current="true"] {
  background: #fff;
  color: #000;
}

.dock span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 860px) {
  .dock {
    bottom: 24px;
    gap: 4px;
  }

  .dock a {
    width: auto;
    padding: 0 18px;
  }

  .dock span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(64px, 10vw, 128px);
  scroll-margin-top: 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section__head {
  margin-bottom: clamp(28px, 5vw, 56px);
}

.section__head h2 {
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section__head h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-bottom: 20px;
  border-radius: 4px;
  background: var(--accent);
}

.section__head p {
  max-width: 56ch;
  margin-top: 14px;
  color: var(--muted);
}

/* ---------- Summary ---------- */

.summary {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
}

.prose {
  display: grid;
  gap: 1.1em;
  color: var(--muted);
  text-wrap: pretty;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.summary .prose p:first-child {
  color: var(--text);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.quote {
  align-self: start;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(255, 184, 0, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--brown) 0%, #1c150c 62%, #100c07 100%);
}

.quote::before {
  content: "“";
  display: block;
  height: 0.55em;
  color: var(--accent);
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
}

.quote blockquote {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.quote figcaption {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .summary {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: start;
  }

  .quote {
    position: sticky;
    top: 40px;
  }
}

/* ---------- Timeline (experience, education) ---------- */

.timeline {
  position: relative;
  display: grid;
  gap: clamp(36px, 5vw, 56px);
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--line) 14%, var(--line) 86%, transparent);
}

.entry {
  position: relative;
  min-width: 0;
}

.entry::before {
  content: "";
  position: absolute;
  top: 9px;
  left: -28px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}

.entry--now::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 184, 0, 0.18);
}

.entry__when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.entry__when small {
  color: var(--faint);
  font-size: inherit;
  font-weight: 500;
}

.tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entry h3 {
  margin-top: 6px;
  font-size: clamp(1.3125rem, 1.15rem + 0.7vw, 1.625rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.entry__org {
  margin-top: 4px;
  font-weight: 600;
}

.entry__org span {
  display: block;
  color: var(--muted);
  font-weight: 500;
}

.entry__body {
  display: grid;
  gap: 0.9em;
  max-width: 68ch;
  margin-top: 16px;
  color: var(--muted);
  text-wrap: pretty;
}

.bullets {
  display: grid;
  gap: 0.55em;
}

.bullets li {
  position: relative;
  padding-left: 22px;
}

.bullets li::before {
  content: "";
  position: absolute;
  top: 0.78em;
  left: 0;
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

@media (min-width: 900px) {
  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    left: 205px;
  }

  .entry {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    column-gap: 72px;
  }

  .entry::before {
    left: 200px;
  }

  .entry__when {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 5px;
  }

  .entry h3 {
    margin-top: 0;
  }

  .entry__org span {
    display: inline;
  }

  .entry__org span::before {
    content: "· ";
  }
}

/* ---------- Skills ---------- */

.skills {
  display: grid;
  gap: 16px;
}

.card {
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 700;
}

.card h3 .icon {
  color: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chips li {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}

.langs {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.langs li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
  font-weight: 600;
}

.langs span {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

@media (min-width: 720px) {
  .skills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Disclosure (curriculum, curiosity) ---------- */

details > summary {
  list-style: none;
  cursor: pointer;
}

details > summary::-webkit-details-marker {
  display: none;
}

.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
}

.more > summary .icon,
.story > summary .chev {
  transition: transform 0.3s var(--ease);
}

.more[open] > summary .icon,
.story[open] > summary .chev {
  transform: rotate(180deg);
}

.more dl {
  display: grid;
  gap: 14px;
  margin: 6px 0 0;
}

.more dt {
  color: var(--text);
  font-weight: 600;
}

.more dd {
  margin: 2px 0 0;
}

.stories {
  display: grid;
  gap: 12px;
}

.story {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.story[open] {
  border-color: rgba(255, 184, 0, 0.28);
  background: var(--surface-warm);
}

.story > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 14px clamp(16px, 3vw, 28px);
  border-radius: var(--radius);
}

.story__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 184, 0, 0.12);
  color: var(--accent);
}

.story__icon .icon {
  width: 22px;
  height: 22px;
}

.story__title {
  flex: 1;
  min-width: 0;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.story .chev {
  color: var(--muted);
}

.story__body {
  display: grid;
  gap: 1em;
  max-width: 74ch;
  padding: 4px clamp(16px, 3vw, 28px) clamp(20px, 3vw, 28px);
  color: var(--muted);
  text-wrap: pretty;
}

@media (min-width: 720px) {
  .story__body {
    padding-left: calc(clamp(16px, 3vw, 28px) + 60px);
  }
}

/* Wide screens: long stories read as two columns instead of one narrow strip. */
@media (min-width: 1040px) {
  .story__body {
    display: block;
    max-width: none;
    columns: 2;
    column-gap: 56px;
  }

  .story__body > * {
    break-inside: avoid;
  }

  .story__body > * + * {
    margin-top: 1em;
  }
}

/* ---------- Links ---------- */

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

.link {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 16px);
  min-width: 0;
  min-height: 84px;
  padding: 16px clamp(14px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.link:hover {
  border-color: rgba(255, 184, 0, 0.5);
  background: var(--surface-warm);
  transform: translateY(-2px);
}

.link__text {
  flex: 1;
  min-width: 0;
}

.link__label {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.link__value {
  display: block;
  font-size: clamp(0.875rem, 4.3vw, 1.0625rem);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.link .arrow {
  display: none;
  color: var(--faint);
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}

@media (min-width: 480px) {
  .link .arrow {
    display: block;
  }
}

.link:hover .arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

@media (min-width: 720px) {
  .links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Footer ---------- */

.footer {
  padding-block: 32px calc(var(--dock-space) + 16px);
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.9375rem;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer a:hover {
  color: var(--accent);
}

/* ---------- Scroll reveal (only once the script is running) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }

  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .dock,
  .skip {
    display: none;
  }
}
