:root {
  --paper: #eeeeee;
  --ink: #1b1b1f;
  --blue: #041562;
  --blue-soft: #11468f;
  --red: #da1212;
  --red-soft: #da1212;
  font-size: 17px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, "SF Pro Rounded", "Segoe UI Rounded", "Segoe UI", ui-rounded, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

/* ---------- marquee ---------- */

.marquee {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  white-space: nowrap;
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .08em;
  padding: 8px 0;
}

.marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 18s linear infinite;
}

@keyframes scroll {
  to { transform: translateX(-100%); }
}

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

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

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  border-bottom: 4px solid var(--ink);
  min-height: 70vh;
}

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

.hero-panel {
  background: var(--blue);
  color: var(--paper);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 4px solid var(--ink);
}

.hero-mobile-avatar { display: none; }

@media (max-width: 760px) {
  .hero-panel { border-right: none; border-bottom: 4px solid var(--ink); }
  .hero-mobile-avatar {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    align-self: flex-end;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  font-size: .85rem;
  margin: 0 0 12px;
  color: var(--red-soft);
}

.hero-panel h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: .98;
  margin: 0 0 40px;
}

.navlinks {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.navlinks a {
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.navlinks a:hover { border-color: var(--red-soft); }

.hero-face {
  position: relative;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.emoji-field {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4rem, 1fr));
  align-content: flex-start;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
}

.emoji-field span {
  height: 4rem;
  font-size: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-field .ef-kac {
  height: 2.8rem;
  width: 2.8rem;
  object-fit: contain;
  margin: auto;
  pointer-events: auto;
  cursor: pointer;
}

.emoji-field .ef-fluent {
  height: 2.6rem;
  width: 2.6rem;
  object-fit: contain;
  margin: auto;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: var(--red);
  font-size: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 8px 8px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}

.avatar:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--ink); }
.avatar:active { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }

.avatar-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.sticker {
  position: absolute;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: .8rem;
}

.sticker-1 { top: 14%; left: 8%; transform: rotate(-8deg); }
.sticker-2 { bottom: 18%; left: 12%; transform: rotate(5deg); }
.sticker-3 { top: 20%; right: 8%; transform: rotate(7deg); }

@media (max-width: 500px) {
  .sticker { display: none; }
}

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

.section {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px;
  border-bottom: 4px solid var(--ink);
}

.section:last-of-type { border-bottom: none; }

.section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.9rem;
  font-weight: 900;
  margin: 0 0 24px;
}

.num {
  font-size: 1rem;
  font-weight: 800;
  color: var(--paper);
  background: var(--red);
  border-radius: 999px;
  padding: 3px 10px;
}

.section-body p { max-width: 62ch; margin: 0 0 1em; }
.section-lead { max-width: 62ch; font-weight: 600; margin: 0 0 28px; }

.rows-label {
  font-weight: 900;
  font-size: 1.4rem;
  text-transform: uppercase;
  color: var(--red);
  margin: 36px 0 0;
}

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

.rows {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--ink);
}

.row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  border-bottom: 2px solid var(--ink);
  text-decoration: none;
  color: var(--ink);
  transition: background .15s ease;
}

.row:hover { background: rgba(10, 29, 122, .06); }
.row-static:hover { background: none; }
.row-static { cursor: default; }

.row-index {
  font-weight: 900;
  color: var(--red-soft);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}


.row-title {
  font-weight: 800;
  font-size: 1.05rem;
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-icon {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
}

.row-desc {
  grid-column: 1 / -1;
  font-size: .92rem;
  color: #444;
  max-width: 60ch;
}

.row-link {
  grid-column: 3;
  grid-row: 1;
  font-weight: 700;
  font-size: .85rem;
  color: var(--blue);
  white-space: nowrap;
}

.row-link-muted { color: #888; }

.row-tech {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.row-tech span {
  font-size: .75rem;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", monospace;
  background: var(--paper);
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  padding: 2px 10px;
  color: var(--blue);
}

@media (max-width: 560px) {
  .row { grid-template-columns: 32px 1fr; }
  .row-link { grid-column: 2; grid-row: 2; justify-self: start; }
}

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

.contact-intro {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}

.contact-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
}

.contact-intro .section-lead { margin: 0; }

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-big {
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 900;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 3px solid var(--red);
  width: fit-content;
  transition: color .15s ease;
}

.contact-big:hover { color: var(--red-soft); }

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

.site-footer {
  text-align: center;
  padding: 30px 24px;
  font-size: .8rem;
  color: #888;
}

/* ---------- confetti (shared with script.js) ---------- */

#confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  border-radius: 3px;
  animation: burst cubic-bezier(.2,.8,.4,1) forwards;
}

@keyframes burst {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(540deg); opacity: 0; }
}

.preview-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,.6);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  padding: 0 16px;
  line-height: 1;
  opacity: .7;
}
.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

.lightbox-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.lightbox-caption {
  color: rgba(255,255,255,.6);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
}
