/* romeoonisim.com
 *
 * One page, one stylesheet. Warm paper and ink in daylight, the same page dimmed at night,
 * following the system setting. One accent, a deep green, used for the things you can press.
 * The print rules at the bottom turn the page into a CV.
 */

:root {
  --bg: #F5F3EE;
  --surface: #FBFAF7;
  --ink: #161614;
  --ink-2: #3D3A35;
  --muted: #6A665E;
  --line: #E1DDD3;
  --accent: #1F5C4A;
  --accent-ink: #FFFFFF;
  --accent-soft: #DCE9E3;
  --live: #2E9D6E;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius: 14px;
  --gutter: clamp(16px, 4vw, 32px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Not near-black: bright text on #111 glows at the edges over long paragraphs. */
    --bg: #171816;
    --surface: #1E201D;
    --ink: #E8E5DE;
    --ink-2: #CBC7BE;
    --muted: #9C988F;
    --line: #2E312D;
    --accent: #84C7AC;
    --accent-ink: #0D1813;
    --accent-soft: #1C2B25;
    --live: #5BD19C;
  }
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }

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

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.print-only { display: none; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  padding: 10px 14px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
}
.skip:focus { top: 12px; }

/* Mono only for the small section labels and the stack line above the name. Everything else
   that is secondary is Inter: small monospace is slow to read, and it was everywhere. */
.label,
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.label { text-transform: uppercase; letter-spacing: 0.08em; }
.meta { font-size: 0.875rem; color: var(--muted); }

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

.bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.bar-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.bar-mark {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; letter-spacing: -0.02em;
  text-decoration: none;
  transition: background-color .15s ease;
}
.bar-mark:hover { background: var(--accent); color: var(--accent-ink); }
.bar-links { display: flex; gap: 22px; margin-left: auto; font-size: 0.92rem; }
.bar-links a { color: var(--ink-2); text-decoration: none; }
.bar-links a:hover { color: var(--ink); }
.bar-lang {
  display: inline-grid; place-items: center;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.88rem; font-weight: 500;
  text-decoration: none; color: var(--ink-2);
}
.bar-lang:hover { color: var(--ink); border-color: var(--ink-2); }

@media (max-width: 720px) {
  .bar-links { display: none; }
  .bar-lang { margin-left: auto; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border-radius: 10px; border: 1px solid transparent;
  font: 500 0.98rem/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn[hidden] { display: none; }

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

.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(44px, 6vw, 72px); }
.hero-grid.has-photo { display: grid; }
.hero-photo { aspect-ratio: 1; object-fit: cover; }
/* On a phone the photo goes above the name, small, like a profile; beside the text it would
   land under the buttons. */
@media (max-width: 899px) {
  .hero-photo { order: -1; width: 96px; height: 96px; border-radius: 20px; margin-bottom: 24px; }
}
@media (min-width: 900px) {
  .hero-grid.has-photo { grid-template-columns: 1fr 280px; gap: 56px; align-items: center; }
  .hero-photo { width: 100%; border-radius: var(--radius); }
}

.eyebrow { margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(3rem, 10vw, 6.75rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.hero-role {
  margin-top: 14px;
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink-2);
}
.lede { margin-top: 26px; max-width: 60ch; font-size: clamp(1.06rem, 1.6vw, 1.2rem); color: var(--ink); }

.facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; font-size: 0.92rem; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 500; }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--live); opacity: 0;
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.55; }
  80%, 100% { transform: scale(1.5); opacity: 0; }
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.social { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; font-size: 0.95rem; }
.social a { color: var(--ink-2); }
.social a:hover { color: var(--ink); }

/* ---------- sections ---------- */

.section { padding: clamp(48px, 6.5vw, 80px) 0; border-top: 1px solid var(--line); }

.section-head { margin-bottom: clamp(24px, 3.5vw, 40px); max-width: 720px; }
.section-head h2 { margin-top: 10px; font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.08; }
.section-head p:not(.label) { margin-top: 14px; color: var(--ink-2); }

/* ---------- now ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3.5vw, 36px);
}
.card p + p { margin-top: 12px; }
.card > p:not(.meta), .card > div > p:not(.meta) { max-width: 62ch; }
.card-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
.card h3 { font-size: 1.5rem; }

.card-lead { position: relative; overflow: hidden; }
.card-lead h3 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.035em; }
.card-lead p:not(.meta) { font-size: 1.06rem; }
.card-lead::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent);
}

.more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 20px;
  font-weight: 500; color: var(--accent); text-decoration: none;
}
.more svg { width: 16px; height: 16px; transition: transform .15s ease; }
.more:hover svg { transform: translate(2px, -2px); }

.pair { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 880px) { .pair { grid-template-columns: 1fr 1fr; } }

.card-app { display: grid; grid-template-columns: 1fr 112px; gap: 22px; align-items: start; }
.phone {
  height: 236px; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--line);
  background: var(--bg);
}
.phone img { width: 100%; }
@media (max-width: 480px) {
  .card-app { grid-template-columns: 1fr; }
  .phone { display: none; }
}

.note { margin-top: 22px; font-size: 0.95rem; color: var(--ink-2); }

/* ---------- experience ---------- */

/* No rule between jobs: the dates in their own column already separate them. */
.timeline li { display: grid; gap: 4px 32px; padding: 18px 0; }
@media (min-width: 720px) {
  .timeline li { grid-template-columns: 140px 1fr; }
}
.when { font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-2); padding-top: 3px; font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
/* The company is what somebody scanning a CV looks for, so it is not greyed out. */
.timeline .at { color: var(--ink); }
.timeline .at::before { content: '· '; color: var(--muted); }
.timeline .at a { color: var(--accent); }
.timeline p:not(.when) { margin-top: 4px; max-width: 62ch; }

/* ---------- work ---------- */

.work { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

.shot {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.shot-img { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg); }
.shot-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  filter: grayscale(0.35);
  transition: filter .3s ease, transform .5s ease;
}
.shot:hover .shot-img img { filter: none; transform: scale(1.02); }
.shot-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.shot h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
.shot h3 a { color: var(--accent); }
.shot-body > p:not(.meta):not(.gone) { font-size: 0.97rem; }
.gone { margin-top: auto; padding-top: 10px; font-size: 0.82rem; color: var(--muted); }

/* ---------- stack ---------- */

.stack > div { display: grid; gap: 10px 32px; padding: 12px 0; }
@media (min-width: 720px) { .stack > div { grid-template-columns: 140px 1fr; align-items: baseline; } }
.stack dt { font-size: 0.95rem; font-weight: 600; }
.stack dd { margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 5px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--ink);
  font-size: 0.88rem; line-height: 1.3;
}

.extras { display: grid; gap: 32px; margin-top: 56px; }
@media (min-width: 820px) { .extras { grid-template-columns: 1.3fr 0.8fr 1fr; } }
.extras .label { margin-bottom: 14px; font-family: var(--font-mono); font-weight: 500; }
.plain li { padding: 6px 0; font-size: 0.97rem; }
.plain strong { display: block; font-weight: 600; color: var(--ink); }
.plain span { display: block; font-size: 0.88rem; color: var(--muted); }

/* ---------- contact ---------- */

.contact h2 { margin-top: 12px; max-width: 18ch; font-size: clamp(2.1rem, 5.5vw, 4rem); line-height: 1.02; letter-spacing: -0.035em; }
.contact .lede { margin-top: 20px; }
.mail {
  display: inline-block; margin-top: 32px;
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.3rem, 4vw, 2.25rem); letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration-thickness: 2px;
  word-break: break-word;
}

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

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 0.88rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- print: the page as a CV ---------- */

@media print {
  @page { margin: 14mm 16mm; }

  :root {
    --bg: #fff; --surface: #fff; --ink: #000; --ink-2: #222; --muted: #555;
    --line: #ccc; --accent: #000; --accent-soft: #eee;
  }
  /* Everything is sized in rem, so this one line scales the page down to paper. */
  html { font-size: 9.5pt; }
  body { line-height: 1.45; }

  /* What a CV does not need: the bar, buttons, screenshots, the clickable social row (written
     out as plain text in .print-contact instead), and "Now", which repeats the first two rows
     of the experience. */
  .bar, .skip, .cta-row, .social, .phone, .shot-img, .site-footer, .hero-photo,
  .dot::after, .more, .gone, .contact, #now, .section-head .label,
  .section-head p:not(.label) { display: none !important; }

  a { color: inherit; text-decoration: none; }
  h2, h3 { break-after: avoid; }

  .hero { padding: 0 0 12pt; }
  .eyebrow { margin-bottom: 4pt; }
  .hero h1 { font-size: 24pt; letter-spacing: -0.02em; }
  .hero-role { font-size: 12pt; margin-top: 2pt; }
  .lede { margin-top: 8pt; font-size: 1rem; max-width: none; color: var(--ink); }
  .facts { margin-top: 6pt; }
  .print-only { display: block; }
  .print-contact { margin-top: 3pt; font-size: 0.95rem; color: var(--ink-2); }

  .section { padding: 10pt 0 6pt; border-top: 1.5pt solid #000; }
  .section-head { margin-bottom: 4pt; }
  .section-head h2 { margin: 0; font-size: 12pt; letter-spacing: 0; text-transform: uppercase; }

  .timeline li { grid-template-columns: 78pt 1fr; gap: 0 12pt; padding: 5pt 0; border-top: 0; break-inside: avoid; }
  .timeline li:last-child { border-bottom: 0; }
  .when { padding-top: 1pt; font-size: 0.9rem; }
  .timeline h3 { font-size: 1.05rem; }
  .timeline .at { color: var(--ink); }
  .timeline p:not(.when) { margin-top: 1pt; max-width: none; }

  .work { grid-template-columns: 1fr 1fr; gap: 6pt 18pt; }
  .shot { border: 0; border-radius: 0; break-inside: avoid; overflow: visible; }
  .shot-body { padding: 0; gap: 0; }
  .shot h3 { order: -1; font-size: 1rem; }
  .shot .meta { font-size: 0.8rem; }
  .shot-body > p:not(.meta) { font-size: 0.95rem; }

  .stack > div { grid-template-columns: 78pt 1fr; gap: 0 12pt; padding: 2pt 0; border-top: 0; }
  .stack dt { font-size: 0.9rem; }
  .tags { gap: 0 4pt; }
  .tags li { padding: 0; background: none; font-size: 1rem; }
  .tags li:not(:last-child)::after { content: ','; }

  .extras { grid-template-columns: 1.3fr 0.8fr 1fr; margin-top: 10pt; gap: 16pt; break-inside: avoid; }
  .extras .label { margin-bottom: 3pt; color: var(--ink); }
  .plain li { padding: 1.5pt 0; border-top: 0; font-size: 0.95rem; }
  .plain span { display: inline; font-size: 0.95rem; }
  .plain span::before { content: ' · '; }
  .plain strong + span::before { content: none; }
  .plain strong { display: block; }
  .plain strong + span { display: block; }
}
