/* ============================================================
   Egor Manchulyantsev — portfolio
   Warm paper light theme · vermillion accent · mono details
   Mobile-first. No framework, no build step.
   ============================================================ */

:root {
  --paper: #faf6f0;
  --paper-raise: #ffffff;
  --ink: #201b16;
  --ink-soft: #5c544b;
  --line: #e4dcd0;
  --accent: #d6491a;
  --accent-ink: #b23a12;
  --accent-soft: #fbe9e1;
  --ok: #1e8a4c;
  --ok-soft: #e2f3e9;
  --radius: 14px;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 1.0625rem; /* 17px — no tiny text */
  -webkit-font-smoothing: antialiased;
  /* subtle dotted engineering-grid texture */
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* ============ HERO ============ */

.hero {
  padding: 1.5rem 1.25rem 2.25rem;
  border-bottom: 2px solid var(--ink);
  background:
    radial-gradient(ellipse 90% 60% at 85% -10%, var(--accent-soft) 0%, transparent 60%),
    var(--paper);
}

.hero-inner {
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.status-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  animation: rise 0.5s ease both;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30, 138, 76, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(30, 138, 76, 0); }
}

.hero-id {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  animation: rise 0.5s 0.05s ease both;
}

.photo-frame {
  position: relative;
  width: 72px; height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--accent);
  overflow: hidden;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
}

.photo-fallback {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--accent-ink);
  letter-spacing: 0.02em;
}

.photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.hero-headline {
  font-size: clamp(2.1rem, 8.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  animation: rise 0.5s 0.1s ease both;
}

.hero-headline .accent { color: var(--accent); }

.hero-sub {
  display: block;
  margin-top: 0.6rem;
  font-size: clamp(1.15rem, 4.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.hero-open {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
  animation: rise 0.5s 0.15s ease both;
}

/* ============ BUTTONS ============ */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  animation: rise 0.5s 0.2s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;           /* big tap target */
  padding: 0.65rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-raise);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover, .btn:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent-ink);
  color: #fff;
  box-shadow: 3px 3px 0 var(--accent-ink);
}

.btn-primary:hover, .btn-primary:focus-visible { box-shadow: 5px 5px 0 var(--accent-ink); }
.btn-primary:active { box-shadow: 1px 1px 0 var(--accent-ink); }

/* ============ SECTIONS ============ */

main { max-width: 40rem; margin: 0 auto; padding: 0 1.25rem; }

.section { padding: 2.25rem 0 0.5rem; }

.intro p {
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--paper-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.h2-index {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

/* ============ PROJECT CARDS ============ */

.card {
  background: var(--paper-raise);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--line);
  padding: 1.25rem;
  margin-bottom: 1.1rem;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.card h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.badge-wip  { color: var(--accent-ink); background: var(--accent-soft); }
.badge-live { color: var(--ok);         background: var(--ok-soft); }

.tech-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.tech-tags li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.18rem 0.55rem;
}

.tags-learning li { border-style: dashed; }

.card-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.card-points li {
  font-size: 0.9375rem;
  padding-left: 1.1rem;
  position: relative;
}

.card-points li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.card-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-ink);
  text-decoration: none;
  padding: 0.3rem 0;   /* extra tap area */
}

.card-link:hover, .card-link:focus-visible { text-decoration: underline; }

.card-link.muted { color: var(--ink-soft); cursor: default; }

/* ============ EXPERIENCE ============ */

.xp {
  border-left: 2px solid var(--line);
  padding: 0 0 1.4rem 1.1rem;
  position: relative;
}

.xp::before {
  content: "";
  position: absolute;
  left: -6px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
}

.xp-when {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

.xp h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3rem; }

.xp p:last-child { font-size: 0.9375rem; color: var(--ink-soft); }

/* ============ SKILLS ============ */

.skill-group { margin-bottom: 1.1rem; }

.skill-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

/* ============ CONTACT + FOOTER ============ */

.contact { padding-bottom: 1rem; }

.contact .cta-row { animation: none; }

.footer {
  margin-top: 2.5rem;
  border-top: 2px solid var(--ink);
  padding: 1.75rem 1.25rem 2.5rem;
  text-align: center;
  background: var(--paper-raise);
}

.footer-note { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.4rem; }

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ============ MOTION ============ */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ============ DESKTOP (secondary) ============ */

@media (min-width: 720px) {
  .hero { padding: 3.5rem 2rem 3rem; }
  .photo-frame { width: 88px; height: 88px; }
  main { padding: 0 2rem; }
  .section { padding-top: 3rem; }
}
