/* bryan.ro: one page, no build step. Colors live in the tokens below. */

@font-face {
  font-family: "Young Serif";
  src: url("/assets/fonts/young-serif-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  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: "Young Serif";
  src: url("/assets/fonts/young-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/onest-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  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: "Onest";
  src: url("/assets/fonts/onest-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  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 {
  --paper: #faf8f3;  /* MXMPixels paper; light enough for orange display type to pass 3:1 */
  --paper-2: #ece6db;
  --ink: #17140f;
  --muted: #6a6257;
  --line: #dcd4c6;
  --orange: #ff4f12;     /* MXMPixels orange: fills, big type */
  --on-orange: #ffffff;  /* text on orange; small text on it stays fully opaque and a bit heavier */
  --accent: #b53d0c;     /* orange for small text on paper, darker so it stays readable */
  --accent-soft: #ffe3d6;
  --live: #1b8a4c;

  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --radius: 28px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --paper-2: #1c1b19;
    --ink: #f2eee6;
    --muted: #a39b8f;
    --line: #2e2b27;
    --accent: #ff6a33;
    --accent-soft: #3a1d10;
    --live: #4cc983;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Heroicons (inline SVG, currentColor) */
.i { flex: none; width: 20px; height: 20px; }
.i-14 { width: 14px; height: 14px; }
.i-16 { width: 16px; height: 16px; }
.i-18 { width: 18px; height: 18px; }
.i-28 { width: 28px; height: 28px; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--orange); color: var(--on-orange); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--orange); color: var(--on-orange);
  font-family: var(--serif); font-size: 1.5rem; line-height: 1;
}
.brand-name { font-weight: 600; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: .95rem; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav .nav-cta { color: var(--paper); background: var(--ink); margin-left: 6px; font-weight: 500; }
.nav .nav-cta:hover { color: var(--on-orange); background: var(--orange); }
@media (max-width: 640px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* Layout */
main > * { max-width: var(--max); margin-inline: auto; }
main { padding-inline: var(--gutter); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
  align-items: center; gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(32px, 7vw, 96px) clamp(48px, 7vw, 88px);
}
.hero-text { container-type: inline-size; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .9rem; font-weight: 500; color: var(--muted);
  padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 999px;
}
.pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--live); }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--live);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(3); opacity: 0; } }

h1 {
  margin-top: 22px;
  font-size: clamp(2.4rem, 1.4rem + 5vw, 6.4rem);
  font-size: clamp(2.4rem, 14cqi, 6.4rem); /* sized to its column, so "Bryan Maxim." never runs into the photo */
  line-height: .98;
  letter-spacing: -0.03em;
}
h1 em { font-style: normal; color: var(--orange); }
.lead { margin-top: 26px; max-width: 34em; font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px;
  padding: 0 24px; border-radius: 999px; text-decoration: none;
  /* White on orange is ~3.3:1, so text on orange is kept "large" (19px bold or 24px+) to pass WCAG AA. */
  font-size: 1.1875rem; font-weight: 700;
  background: var(--orange); color: var(--on-orange); border: 1.5px solid var(--orange);
  transition: transform .25s var(--ease), background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
@media (max-width: 420px) { .actions { gap: 10px; } .actions .btn { flex: 1 1 100%; } }
.btn-ghost:hover { border-color: var(--ink); }

.portrait { position: relative; margin: 0; justify-self: end; width: min(440px, 100%); }
.portrait img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius); background: var(--paper-2);
  rotate: 1.5deg; transition: rotate .6s var(--ease);
}
.portrait:hover img { rotate: 0deg; }
.badge {
  position: absolute; left: -34px; bottom: 36px; width: 124px; height: 124px;
  animation: spin 26s linear infinite;
}
.badge circle { fill: var(--orange); }
.badge text {
  fill: var(--on-orange); font-family: var(--sans); font-size: 10.6px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
}
.badge-core {
  position: absolute; left: -34px; bottom: 36px; width: 124px; height: 124px;
  display: grid; place-content: center; text-align: center; color: var(--on-orange);
  font-family: var(--serif); font-size: 2rem; line-height: .9;
}
.badge-core small { display: block; font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
@keyframes spin { to { rotate: 360deg; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .portrait { justify-self: start; width: min(420px, 88%); margin-left: 34px; }
}

/* Facts strip */
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}
.facts li { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 22px 0; color: var(--muted); font-size: .98rem; }
.fact-icon { width: 28px; height: 28px; margin-top: 3px; color: var(--accent); }
.facts li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.facts strong { display: block; color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.01em; }
@media (max-width: 720px) {
  .facts { grid-template-columns: 1fr; }
  .facts li, .facts li + li { padding: 16px 0; border-left: 0; }
  .facts li + li { border-top: 1px solid var(--line); }
}

/* Sections */
.block { padding-block: clamp(64px, 10vw, 120px) 0; }
.block-head { margin-bottom: clamp(28px, 4vw, 48px); }
.kicker { font-size: .82rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
h2 { margin-top: 10px; font-size: clamp(2.1rem, 1.3rem + 3vw, 3.6rem); line-height: 1.04; }

/* Ce fac */
.work { border-top: 1px solid var(--ink); }
.work-item {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px 28px; align-items: start;
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.work-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent);
  transition: background-color .25s, color .25s, transform .35s var(--ease);
}
.work-item:hover .work-icon { background: var(--orange); color: var(--on-orange); transform: rotate(-6deg); }
.work-body h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); line-height: 1.15; }
.work-body p { margin-top: 10px; max-width: 40em; color: var(--muted); }
.work-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  font-weight: 600; text-decoration: none; white-space: nowrap;
  border-bottom: 1.5px solid var(--line); padding-bottom: 3px; transition: border-color .2s, color .2s;
}
.work-link .sub { font-weight: 400; color: var(--muted); font-size: .88rem; }
.work-link .arrow { display: inline-flex; transition: transform .25s var(--ease); }
.work-link:hover { color: var(--accent); border-color: var(--accent); }
.work-link:hover .arrow { transform: translate(2px, -2px); }
@media (max-width: 720px) {
  .work-item { grid-template-columns: 1fr; }
  .work-link { justify-self: start; }
}

/* Aplicații */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.app {
  position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start;
  padding: 24px; padding-top: 58px; border-radius: 24px; background: var(--paper-2);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.app:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgb(23 20 15 / .35); }
.app img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 6px 16px -8px rgb(23 20 15 / .45); }
.app h3 { font-size: 1.45rem; line-height: 1.2; }
.app h3 a { text-decoration: none; }
.app h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.app p { margin-top: 6px; color: var(--muted); font-size: .98rem; line-height: 1.5; }
.tag {
  position: absolute; top: 20px; left: 24px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
}
.tag-live { color: var(--accent); border-color: transparent; background: var(--accent-soft); }

/* Despre */
.about { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 6vw, 96px); }
.about .block-head { position: sticky; top: 100px; align-self: start; }
.about-body p { font-size: clamp(1.08rem, 1rem + .35vw, 1.22rem); }
.about-body p + p { margin-top: 18px; }
.about-body a { color: var(--accent); text-underline-offset: 3px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tools li { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; color: var(--muted); }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about .block-head { position: static; margin-bottom: 0; }
}

/* Contact */
.contact {
  margin-top: clamp(72px, 11vw, 136px);
  padding: clamp(20px, 5.4vw, 88px);
  border-radius: clamp(24px, 3vw, 40px);
  background: var(--orange); color: var(--on-orange);
  container-type: inline-size;
}
.contact h2 { font-size: clamp(2.4rem, 1.2rem + 5vw, 5.2rem); line-height: 1; }
.contact-lead { margin-top: 18px; max-width: 26em; font-size: 1.5rem; line-height: 1.4; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 36px; }
.mail {
  font-family: var(--serif); font-size: clamp(1.2rem, .7rem + 3vw, 3rem); line-height: 1.15;
  font-size: min(3rem, 100cqi / 12.4); /* one line at any width, and 24px+ (large text) from 375px up */
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px;
  overflow-wrap: anywhere;
}
.mail:hover { text-decoration-thickness: 4px; }
.copy {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 1.1875rem; font-weight: 700; cursor: pointer;
  color: var(--on-orange); background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--on-orange) 55%, transparent);
  border-radius: 999px; padding: 9px 18px; transition: background-color .2s, color .2s;
}
.copy:hover { background: var(--on-orange); color: var(--orange); }
.copy[hidden] { display: none; }
.copy .i-done, .copy.copied .i-clip { display: none; }
.copy.copied .i-done { display: block; }
.elsewhere {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 44px; padding-top: 26px;
  border-top: 1px solid color-mix(in srgb, var(--on-orange) 28%, transparent);
}
.elsewhere a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-size: 1.1875rem; font-weight: 700; }
.elsewhere a .i { opacity: .85; transition: transform .25s var(--ease); }
.elsewhere a:hover .i { transform: translate(2px, -2px); }
.elsewhere a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact :focus-visible { outline-color: var(--on-orange); }

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: 32px var(--gutter) 40px; color: var(--muted); font-size: .92rem;
}
.foot a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Reveal on scroll (only when JS runs; the page reads fine without it). */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
.js .reveal.in { opacity: 1; translate: 0 0; }
/* The hero animates on load (CSS only), so it never waits on the observer. */
.js .hero .reveal { opacity: 1; translate: none; transition: none; animation: rise .9s var(--ease) backwards; }
/* Movement only, no fade: the headline and photo are the LCP and must paint immediately. */
.js .hero .reveal:nth-child(2) { animation-delay: .06s; }
.js .hero .reveal:nth-child(3) { animation-delay: .12s; }
.js .hero .reveal:nth-child(4) { animation-delay: .18s; }
.js .hero .portrait.reveal { animation-delay: .1s; }
@keyframes rise { from { translate: 0 14px; } }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .hero .reveal { opacity: 1; translate: none; transition: none; animation: none; }
  .badge, .pulse::after { animation: none; }
  .portrait img { rotate: 0deg; }
  .btn:hover, .app:hover, .work-item:hover .work-icon { transform: none; }
}

/* 404 */
.lost { margin: 0 auto; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; max-width: 760px; }
