:root {
  --bg: #100f0c;
  --fg: #eceae2;
  --accent: #ff6a3d;
  --muted: rgba(255, 255, 255, .55);
  --dim: rgba(255, 255, 255, .4);
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .18);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --pad-x: 6vw;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:hover { opacity: .75; }

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

@keyframes riseIn { from { opacity: 0; transform: translateY(24px) } to { opacity: 1; transform: translateY(0) } }
@keyframes blink  { 0%, 50% { opacity: 1 } 51%, 100% { opacity: 0 } }
@keyframes pulse  { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

.rise { animation: riseIn .8s var(--d, 0s) both; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease-out, transform .7s ease-out; }
.reveal.is-in { opacity: 1; transform: none; }

.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px;
  padding: 20px var(--pad-x);
  background: rgba(16, 15, 12, .72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav__brand { font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: .05em; text-decoration: none; }
.nav__right { display: flex; align-items: center; gap: 30px; }
.nav__links { display: flex; gap: 32px; font-size: 14px; color: var(--muted); }
.nav__links a { text-decoration: none; }
.nav__links .is-accent { color: var(--accent); }

.lang { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }
.lang__btn {
  background: none; border: 0; padding: 2px; cursor: pointer; font: inherit;
  color: rgba(255, 255, 255, .45); transition: color .2s ease-out;
  
  text-decoration: none;
}
.lang__btn:hover { color: var(--fg); }
.lang__btn.is-active { color: var(--accent); }
.lang__sep { color: rgba(255, 255, 255, .22); }

.hero {
  position: relative;
  height: calc(100vh - 62px);
  min-height: 620px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .04), transparent 62%);
}
.hero__spot { position: absolute; inset: 0; pointer-events: none; transition: background .1s ease-out; }
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 58px 58px;
}

.hero__tags { position: absolute; inset: 0; pointer-events: none; container-type: size; }

.atom { position: absolute; transition: transform .2s ease-out; }
.atom__core,
.atom__part {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  font-family: var(--mono); border-radius: 100px;
}

.atom__core {
  transform: translate(-50%, -50%);
  padding: 7px 14px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid rgba(255, 106, 61, .5); color: #ffb59b;
  transition: opacity .35s ease-out, border-color .35s ease-out;
}
.atom.is-open .atom__core { opacity: .4; border-color: rgba(255, 255, 255, .12); }

.atom__part {
  transform: translate(-50%, -50%) scale(.6);
  opacity: 0;
  padding: 7px 14px; font-size: 12.5px;
  border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .72);
  transition: transform .5s cubic-bezier(.2, .8, .3, 1), opacity .32s ease-out;
}

.atom.is-open .atom__part {
  transform: translate(calc(-50% + var(--dx) * 1cqw), calc(-50% + var(--dy) * 1cqh)) scale(1);
  opacity: 1;
  transition-delay: calc(var(--i) * 45ms);
}

.hero__clock {
  position: absolute; top: 30px; right: var(--pad-x); z-index: 5;
  font-family: var(--mono); font-size: 11.5px; color: rgba(255, 255, 255, .45); text-align: right;
}
.hero__clock span { font-size: 15px; color: var(--fg); }

.hero__inner {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 var(--pad-x);
}

.kicker {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .24em;
  color: rgba(255, 255, 255, .45); margin-bottom: 26px;
}
.kicker__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2.2s infinite; }

.hero__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 8.4vw, 100px); line-height: .98; letter-spacing: -.015em;
}
.hero__morph { color: var(--accent); font-style: italic; }
.caret {
  display: inline-block; width: 5px; height: .8em; background: var(--accent);
  margin-left: 8px; vertical-align: -6px; animation: blink 1s step-end infinite;
}
.hero__lead {
  margin-top: 32px; max-width: 560px;
  font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; color: rgba(255, 255, 255, .6);
}
.hero__cta { margin-top: 42px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hero__hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: rgba(255, 255, 255, .35);
}

.btn {
  display: inline-block; padding: 15px 32px; font-size: 14.5px; font-family: var(--sans);
  border-radius: 2px; text-decoration: none; cursor: pointer;
  transition: transform .2s ease-out;
}
.btn--solid { background: var(--accent); color: var(--bg); font-weight: 500; border: 1px solid var(--accent); }
.btn--ghost { background: none; border: 1px solid rgba(255, 255, 255, .28); color: var(--fg); }

.cvpick { position: relative; display: inline-block; }

.cvpick__chev {
  display: inline-block; margin-left: 10px; vertical-align: middle;
  border-style: solid; border-width: 5px 4px 0;
  border-color: currentColor transparent transparent;
  transition: transform .18s ease-out;
}
.cvpick__btn[aria-expanded="true"] .cvpick__chev { transform: rotate(180deg); }

.cvpick__menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 20;
  min-width: 240px; text-align: left;
  --shift: 0px;
  transform: translateX(var(--shift));
  background: var(--bg); border: 1px solid var(--line); border-radius: 2px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.cvpick--center .cvpick__menu { left: 50%; transform: translateX(calc(-50% + var(--shift))); }

.cvpick__item {
  display: flex; align-items: baseline; gap: 10px;
  width: 100%; padding: 13px 18px; text-align: left; cursor: pointer;
  background: none; border: 0; font: inherit; color: var(--fg);
}
.cvpick__item + .cvpick__item { border-top: 1px solid var(--line); }
.cvpick__item:hover,
.cvpick__item:focus-visible { background: rgba(255, 255, 255, .05); }

.cvpick__num {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  color: var(--accent);
}
.cvpick__name { font-size: 14px; }

.section { padding: 100px var(--pad-x); border-top: 1px solid var(--line); }

.section--split { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 48px; }
.section--stack { border-top: 0; padding-top: 0; display: flex; flex-direction: column; gap: 28px; }
.section--list { display: flex; flex-direction: column; gap: 38px; }
.section--contact { text-align: center; padding: 120px var(--pad-x); }

.section__aside { display: flex; flex-direction: column; gap: 14px; }

.label {
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  letter-spacing: .16em; color: var(--accent);
}
.label--muted { letter-spacing: 0; color: var(--dim); }

.lede { max-width: 900px; font-family: var(--serif); font-size: clamp(24px, 3vw, 36px); line-height: 1.35; }

.about__pillars {
  margin-top: 26px; max-width: 820px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px 30px;
}

.pillar__title {
  margin-bottom: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
}
.pillar__text { font-size: 15px; line-height: 1.7; color: var(--muted); }

.about__note {
  margin-top: 26px; max-width: 820px;
  font-size: 15px; line-height: 1.7; color: var(--muted);
}

.about { display: flex; align-items: flex-start; gap: 34px; }
.about__text { min-width: 0; }

.portrait { flex: 0 0 210px; margin: 7px 0 0; }
.portrait img {
  display: block; width: 100%; height: auto;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .45);
  filter: grayscale(.3);
  transition: filter .55s ease-out, transform .55s ease-out, box-shadow .55s ease-out;
}
.portrait:hover img {
  filter: grayscale(0);
  transform: translateY(-4px);
  box-shadow: 0 26px 50px rgba(0, 0, 0, .55);
}

.stack { min-width: 0; }
.stack__row {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px;
  align-items: start; padding: 22px 0;
}
.stack__row + .stack__row { border-top: 1px solid rgba(255, 255, 255, .1); }
.stack__row:first-child { padding-top: 6px; }
.stack__row:last-child { padding-bottom: 0; }
.stack__group {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); padding-top: 9px;
}

.pills { display: flex; flex-wrap: wrap; gap: 9px; }
.pill {
  padding: 7px 15px; border: 1px solid var(--line-strong); border-radius: 100px; font-size: 13.5px;
  transition: border-color .2s ease-out, color .2s ease-out, transform .2s ease-out;
}
.pill:hover { border-color: var(--accent); transform: translateY(-2px); }
.pill--core { border-color: rgba(255, 106, 61, .55); color: #ffb59b; }
.pill--core:hover { background: rgba(255, 106, 61, .12); }

.entry {
  display: grid; grid-template-columns: 170px 1fr; gap: 40px;
  padding-bottom: 30px; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.entry + .entry { padding-top: 38px; }
.entry:last-child { border-bottom: 0; padding-bottom: 0; }
.entry__period { font-family: var(--mono); font-size: 14px; color: rgba(255, 255, 255, .5); }

.entry__title { font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1.15; }
.entry__meta { margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, .5); }
.entry__desc { margin-top: 14px; max-width: 660px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.entry__tech { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.entry__tech span {
  font-family: var(--mono); font-size: 11.5px; padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 100px; color: rgba(255, 255, 255, .45);
}

.contact__title {
  margin-top: 24px; font-family: var(--serif); font-weight: 300;
  font-size: clamp(40px, 6.5vw, 78px); letter-spacing: -.02em; line-height: 1.02;
}
.accent-italic { font-style: italic; color: var(--accent); }
.contact__mail {
  display: inline-block; margin-top: 38px; font-family: var(--mono);
  font-size: clamp(16px, 2vw, 23px); text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .35); padding-bottom: 6px;
}
.contact__row {
  margin-top: 56px; display: flex; justify-content: center; align-items: center;
  gap: 34px; flex-wrap: wrap; font-size: 14px; color: var(--muted);
}
.contact__row a { text-decoration: none; }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--accent); text-decoration: none;
}
.linkish:hover { opacity: .75; }
.contact__foot { margin-top: 60px; font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, .3); }

@media (max-width: 820px) {
  :root { --pad-x: 7vw; }
  .nav__right { gap: 18px; }
  .nav__links { gap: 18px; font-size: 13px; }
  .hero__clock { display: none; }
  .hero__tags { display: none; }
  .section { padding: 72px var(--pad-x); }
  
  .section--split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  
  .about { flex-direction: column; align-items: stretch; gap: 24px; }
  .portrait { flex-basis: auto; width: 190px; margin-top: 0; }
  .entry { grid-template-columns: 1fr; gap: 12px; }
  .entry + .entry { padding-top: 30px; }
  
  .stack__row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px 0; }
  .stack__group { padding-top: 0; }
  .contact__row { gap: 20px; }
}

@media (max-width: 620px) {
  .nav__links a:not(.is-accent) { display: none; }
  .btn { width: 100%; text-align: center; }
  
  .hero__cta .cvpick { width: 100%; }
  .cvpick__menu { min-width: 0; width: max(100%, 240px); }
}

@media (max-width: 400px) {
  .contact__title { font-size: clamp(30px, 10vw, 40px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  
  @media (min-width: 1200px) {
    .atom__part {
      transform: translate(calc(-50% + var(--dx) * 1cqw), calc(-50% + var(--dy) * 1cqh)) scale(1);
      opacity: 1;
    }
    .atom__core { opacity: .4; }
  }
}
