/* Nothing-OS inspired landing — Andrey Radionov */
@import url('https://fonts.googleapis.com/css2?family=Doto:wght@400;500;700;900&family=JetBrains+Mono:wght@300;400;500;700&display=swap');

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

:root {
  --bg: #050505;
  --bg-1: #0c0c0c;
  --bg-2: #131313;
  --line: #1f1f1f;
  --line-2: #2a2a2a;
  --fg: #f1f1f1;
  --fg-dim: #8a8a8a;
  --fg-mute: #5a5a5a;
  --red: #ff3a2d;
  --red-dim: #b8201a;
  --grid-dot: #1a1a1a;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 0);
  background-size: 24px 24px;
  background-position: 0 0;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ===== Layout ===== */
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .shell { padding: 0 16px; }
}

/* ===== Status bar ===== */
.statusbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5,5,5,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.statusbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.statusbar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; box-shadow: 0 0 12px var(--red); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.statusbar-l, .statusbar-c, .statusbar-r { display: flex; gap: 14px; align-items: center; }
.statusbar-c { letter-spacing: 0.16em; }
.signal-bars { display: inline-flex; gap: 2px; align-items: end; height: 12px; }
.signal-bars span { width: 2px; background: var(--fg); }
.signal-bars span:nth-child(1) { height: 25%; }
.signal-bars span:nth-child(2) { height: 50%; }
.signal-bars span:nth-child(3) { height: 75%; }
.signal-bars span:nth-child(4) { height: 100%; }
@media (max-width: 720px) {
  .statusbar-c { display: none; }
}

/* ===== Display font ===== */
.display {
  font-family: 'Doto', 'JetBrains Mono', monospace;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.95;
  text-transform: uppercase;
  font-variation-settings: "ROND" 100;
}

/* ===== Section chrome ===== */
.section {
  position: relative;
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
.section:first-of-type { border-top: 0; }
@media (max-width: 720px) {
  .section { padding: 56px 0; }
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  margin-bottom: 28px;
}
.section-tag::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.section-title {
  font-size: clamp(40px, 6vw, 88px);
}
.section-sub {
  margin-top: 18px;
  color: var(--fg-dim);
  max-width: 640px;
  font-size: 14px;
}

/* ===== Hero ===== */
.hero { padding-top: 72px; padding-bottom: 100px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.hero-name {
  font-size: clamp(56px, 12vw, 180px);
  line-height: 0.85;
}
.hero-name .line {
  display: block;
  overflow: hidden;
}
.hero-name .line span {
  display: inline-block;
  transform: translateY(110%);
  animation: rollUp 0.9s cubic-bezier(.22,1,.36,1) forwards;
}
.hero-name .line:nth-child(2) span { animation-delay: 0.12s; }
.hero-name .line:nth-child(3) span { animation-delay: 0.24s; }
@keyframes rollUp {
  to { transform: translateY(0); }
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 56px;
  background: var(--line);
  border: 1px solid var(--line);
}
.hero-meta .cell {
  background: var(--bg);
  padding: 20px 18px;
  min-height: 100px;
}
.hero-meta .k {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 10px;
}
.hero-meta .v {
  font-family: 'Doto', monospace;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.hero-meta .v.red { color: var(--red); }
@media (max-width: 720px) {
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
}

.hero-tagline {
  margin-top: 28px;
  max-width: 700px;
  font-size: 16px;
  color: var(--fg-dim);
}
.hero-tagline strong { color: var(--fg); font-weight: 500; }

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg);
  padding: 14px 22px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: 0.2s ease;
}
.btn:hover { border-color: var(--fg); transform: translateY(-1px); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: #ff5246; border-color: #ff5246; }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* Glyph dot matrix circle visual */
.glyph {
  position: relative;
  width: 100%;
  aspect-ratio: 1.6;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 50%, rgba(255,58,45,0.12), transparent 40%),
    var(--bg-1);
}
.glyph-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, #2a2a2a 1px, transparent 0);
  background-size: 12px 12px;
  mask-image: radial-gradient(circle at 30% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 30% 50%, black 30%, transparent 70%);
}
.glyph-rings {
  position: absolute;
  left: 14%;
  top: 50%;
  transform: translateY(-50%);
  width: 220px; height: 220px;
}
.glyph-rings i {
  position: absolute; inset: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
}
.glyph-rings i:nth-child(2) { inset: 18%; border-color: rgba(255,58,45,0.25); }
.glyph-rings i:nth-child(3) { inset: 36%; border-color: var(--line-2); }
.glyph-rings i:nth-child(4) { inset: 50%; background: var(--red); border-color: var(--red); box-shadow: 0 0 40px var(--red); animation: pulse 2s ease-in-out infinite; }

.glyph-readout {
  position: absolute;
  right: 24px;
  top: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.glyph-readout .big {
  font-family: 'Doto', monospace;
  font-size: 28px;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: 0.02em;
}
@media (max-width: 720px) {
  .glyph { aspect-ratio: 1.2; border-radius: 16px; }
  .glyph-rings { width: 140px; height: 140px; left: 18%; }
}

/* ===== Stats / rolling numbers ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stats .stat {
  background: var(--bg);
  padding: 28px 24px;
}
.stats .num {
  font-family: 'Doto', monospace;
  font-weight: 900;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1;
  color: var(--fg);
  letter-spacing: 0.02em;
}
.stats .num .unit { color: var(--red); margin-left: 4px; }
.stats .lbl {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Rolling number digit */
.roll {
  display: inline-flex;
  vertical-align: baseline;
}
.roll-digit {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  position: relative;
  width: 0.6em;
  text-align: center;
}
.roll-digit-stack {
  display: flex;
  flex-direction: column;
  transition: transform 1.4s cubic-bezier(.22,1,.36,1);
}
.roll-digit-stack span {
  height: 1em;
  display: block;
}
.roll-static {
  display: inline-block;
}

/* ===== Helper cards ===== */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards-3 { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: 18px;
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
  transition: 0.3s ease;
}
.card:hover {
  border-color: var(--line-2);
  background: var(--bg-2);
  transform: translateY(-2px);
}
.card-num {
  font-family: 'Doto', monospace;
  font-weight: 800;
  font-size: 14px;
  color: var(--fg-mute);
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.card-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--fg);
}
.card-body {
  color: var(--fg-dim);
  font-size: 13.5px;
  line-height: 1.65;
}
.card-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  background: var(--bg);
  position: relative;
}
.card-icon i {
  width: 8px; height: 8px; background: var(--red); border-radius: 50%;
  box-shadow: 0 0 12px var(--red);
}

/* ===== Experience timeline ===== */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.exp {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-1);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.exp.open { border-color: var(--line-2); }
.exp-head {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px 28px;
  cursor: pointer;
  user-select: none;
}
.exp-period {
  font-family: 'Doto', monospace;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
}
.exp-period .y { display: block; color: var(--fg); font-size: 22px; }
.exp-role .company {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 6px;
}
.exp-role .title {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.exp-toggle {
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg);
  transition: 0.25s ease;
  flex-shrink: 0;
}
.exp.open .exp-toggle { background: var(--red); border-color: var(--red); transform: rotate(45deg); }
.exp-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(.22,1,.36,1);
}
.exp.open .exp-body { grid-template-rows: 1fr; }
.exp-body > div { overflow: hidden; }
.exp-body-inner {
  padding: 0 28px 28px 28px;
  border-top: 1px dashed var(--line-2);
  margin-top: 4px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
}
.exp-body-inner .label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  padding-top: 4px;
}
.exp-body-inner ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.exp-body-inner li {
  position: relative;
  padding-left: 18px;
  color: var(--fg-dim);
  font-size: 13.5px;
  line-height: 1.6;
}
.exp-body-inner li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 1px;
}
.exp-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 18px;
}
.exp-metrics .m {
  background: var(--bg);
  padding: 16px 14px;
}
.exp-metrics .m .v {
  font-family: 'Doto', monospace;
  font-weight: 800;
  font-size: 22px;
  color: var(--fg);
}
.exp-metrics .m .v .accent { color: var(--red); }
.exp-metrics .m .l {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-top: 6px;
}
@media (max-width: 720px) {
  .exp-head { grid-template-columns: 1fr auto; gap: 14px; padding: 20px; }
  .exp-period { display: flex; align-items: baseline; gap: 8px; grid-column: 1 / -1; }
  .exp-period .y { font-size: 18px; }
  .exp-body-inner { grid-template-columns: 1fr; gap: 12px; padding: 0 20px 22px 20px; }
  .exp-metrics { grid-template-columns: 1fr 1fr; }
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 720px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-block {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-1);
  padding: 28px;
}
.skill-block h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.skill-block h3 .led {
  width: 8px; height: 8px; background: var(--red); border-radius: 50%;
  box-shadow: 0 0 10px var(--red);
}
.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip {
  font-size: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-dim);
  letter-spacing: 0.02em;
  transition: 0.2s ease;
}
.chip:hover { color: var(--fg); border-color: var(--fg); }
.chip.hot { color: var(--red); border-color: rgba(255,58,45,0.4); }

/* ===== Projects ===== */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .projects { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .projects { grid-template-columns: 1fr; } }

.proj {
  border: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  transition: 0.25s ease;
}
.proj:hover { border-color: var(--line-2); transform: translateY(-2px); }
.proj-id {
  font-family: 'Doto', monospace;
  font-weight: 800;
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
}
.proj-cat {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 6px;
}
.proj-name {
  margin-top: 14px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.proj-desc {
  margin-top: 10px;
  color: var(--fg-dim);
  font-size: 13px;
  line-height: 1.55;
}
.proj-tags {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.proj-tags .t {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.proj-art {
  position: absolute;
  right: -20px; top: -20px;
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  opacity: 0.6;
}
.proj-art::after {
  content: '';
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.5;
  filter: blur(8px);
}

/* ===== Contact ===== */
.contact {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 60px 48px;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,58,45,0.08), transparent 50%),
    var(--bg-1);
  position: relative;
  overflow: hidden;
}
.contact-title {
  font-size: clamp(40px, 7vw, 96px);
  margin-bottom: 32px;
}
.contact-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 32px;
}
.contact-rows .r {
  background: var(--bg);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: 0.2s ease;
}
.contact-rows .r:hover { background: var(--bg-2); }
.contact-rows .k {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.contact-rows .v {
  font-family: 'Doto', monospace;
  font-weight: 700;
  font-size: clamp(20px, 3vw, 32px);
  color: var(--fg);
  letter-spacing: 0.02em;
}
.contact-rows .v.red { color: var(--red); }
@media (max-width: 720px) {
  .contact { padding: 40px 24px; border-radius: 20px; }
  .contact-rows { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 80px 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.footer button {
  background: transparent;
  border: 0;
  color: var(--fg-dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
}
.footer button:hover { color: var(--fg); }

/* ===== Modal ===== */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 24px;
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
}
.modal h2 {
  font-family: 'Doto', monospace;
  font-weight: 800;
  font-size: 32px;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.modal h3 { font-size: 14px; margin: 24px 0 10px 0; color: var(--fg); }
.modal p, .modal li { color: var(--fg-dim); font-size: 13px; line-height: 1.7; margin-bottom: 8px; }
.modal ul { padding-left: 20px; }
.modal-close {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg);
  border-radius: 50%;
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { border-color: var(--fg); }
@media (max-width: 720px) { .modal { padding: 28px 22px; border-radius: 18px; } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(.22,1,.36,1); }
.reveal.on { opacity: 1; transform: translateY(0); }

/* Marquee row */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 22px 0;
  white-space: nowrap;
  background: var(--bg-1);
}
.marquee-track {
  display: inline-flex;
  gap: 56px;
  animation: marq 40s linear infinite;
  font-family: 'Doto', monospace;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}
.marquee-track span.dot { color: var(--red); }
@keyframes marq {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
