/* ===========================================================
   ilja — portfolio (corporate edition)
   Palette: white + cool light surfaces · blue accent · structured grid
   Type: Manrope
   =========================================================== */

:root {
  --ink:       #0F1B2D;
  --ink-soft:  #4A5868;
  --ink-faint: #8A97A6;
  --paper:     #FFFFFF;
  --paper-2:   #F6F8FC;
  --surface:   #FFFFFF;
  --line:      #E4EAF1;
  --line-2:    #D4DCE6;

  --blue:      #2563EB;
  --blue-d:    #1D4ED8;
  --navy:      #1E3A8A;
  --blue-soft: #EAF1FE;

  /* professional accent set */
  --c1: #2563EB;   /* blue   — web       */
  --c2: #0D9488;   /* teal   — servers   */
  --c3: #0284C7;   /* sky    — networks  */
  --c4: #4F46E5;   /* indigo — sysadmin  */
  --c5: #1E3A8A;   /* navy   — computers */

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body:    "Manrope", system-ui, sans-serif;

  --wrap: 1140px;
  --r: 14px;
  --r-sm: 10px;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--blue); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--r-sm) 0; z-index: 100; font-weight: 700; font-size: .85rem;
}
.skip-link:focus { left: 0; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-block; font-weight: 700; font-size: .76rem;
  text-transform: uppercase; letter-spacing: .09em; color: var(--blue);
  margin-bottom: 14px;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; position: relative; }
.section-alt { background: var(--paper-2); }
.section-head { margin-bottom: 48px; max-width: 660px; }
.section-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.14; letter-spacing: -0.02em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.32rem; color: var(--ink); letter-spacing: -0.02em; }
.brand-dot { color: var(--blue); }

.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-weight: 600; font-size: .94rem; color: var(--ink-soft); position: relative; padding: 4px 0; transition: color .18s ease; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--blue); transition: width .2s ease; }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

.header-right { display: flex; align-items: center; gap: 16px; }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.lang-btn { font-weight: 700; font-size: .76rem; padding: 7px 11px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; transition: background .15s ease, color .15s ease; }
.lang-btn[aria-pressed="true"] { background: var(--blue); color: #fff; }
.lang-btn:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: .94rem;
  padding: 12px 22px; border-radius: var(--r-sm); cursor: pointer;
  transition: transform .14s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); transform: translateY(-2px); box-shadow: 0 12px 22px -12px rgba(37,99,235,.7); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-d); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: .88rem; }
.btn-lg { padding: 15px 30px; font-size: 1rem; margin-top: 8px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(60px, 9vw, 104px) 0 80px; position: relative; }
.hero::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 100%; z-index: -1;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(37,99,235,.06), transparent 70%),
    radial-gradient(40% 40% at 10% 10%, rgba(13,148,136,.05), transparent 70%);
}
.hero-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.hero-top .eyebrow { margin-bottom: 0; }
.status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: .8rem; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px;
}
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: live 1.8s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.08; letter-spacing: -0.03em;
  max-width: 18ch; margin: 14px 0 20px;
}
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-soft); max-width: 58ch; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }

.hero-facts { display: flex; gap: 36px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.fact-item { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; font-size: .96rem; color: var(--ink); }
.fact-ic { display: inline-flex; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--blue-soft); color: var(--blue); align-items: center; justify-content: center; }
.fact-ic svg { width: 19px; height: 19px; }

.hero-anim { opacity: 0; transform: translateY(20px); animation: heroUp .65s cubic-bezier(.22,.9,.32,1) forwards; }
.hero-anim:nth-child(1) { animation-delay: .04s; }
.hero-anim:nth-child(2) { animation-delay: .12s; }
.hero-anim:nth-child(3) { animation-delay: .2s; }
.hero-anim:nth-child(4) { animation-delay: .28s; }
.hero-anim:nth-child(5) { animation-delay: .36s; }
@keyframes heroUp { to { opacity: 1; transform: none; } }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 30px 28px; position: relative;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 18px 34px -24px rgba(15,27,45,.4); }
.card-ic {
  display: inline-flex; width: 48px; height: 48px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c);
  align-items: center; justify-content: center; margin-bottom: 18px;
}
.card-ic svg { width: 25px; height: 25px; }
.card-ic-lg { width: 56px; height: 56px; }
.card-ic-lg svg { width: 29px; height: 29px; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.24rem; margin-bottom: 10px; letter-spacing: -0.01em; }
.card-text { color: var(--ink-soft); margin-bottom: 18px; font-size: .97rem; }
.card-list { list-style: none; display: grid; gap: 9px; }
.card-list li { font-size: .92rem; color: var(--ink-soft); padding-left: 26px; position: relative; }
.card-list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 17px; height: 17px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--c) 14%, #fff);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* featured (computers) card */
.card-feature {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center;
  background: var(--paper-2); border-color: var(--line);
}
.feature-badge {
  display: inline-block; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--navy); background: var(--blue-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.card-feature .card-title { font-size: 1.42rem; }
.card-feature .card-list { grid-template-columns: 1fr 1fr; gap: 9px 22px; }

/* ---------- Work ---------- */
.work-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.work-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.work-thumb {
  display: block; aspect-ratio: 16 / 10; position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--ph) 22%, #fff), color-mix(in srgb, var(--ph) 8%, #fff));
}
.work-thumb::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(circle, rgba(255,255,255,.55) 1px, transparent 1px); background-size: 18px 18px;
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.work-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.work-add { background: var(--paper-2); border-style: dashed; }
.work-add:hover { border-color: var(--blue); }
.work-add-inner { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 7px; height: 100%; padding: 30px 26px; transition: color .2s ease; }
.work-add-ic { display: inline-flex; width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--blue-soft); color: var(--blue); align-items: center; justify-content: center; margin-bottom: 6px; }
.work-add-ic svg { width: 22px; height: 22px; }
.work-add-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.01em; }
.work-add-text { font-weight: 600; font-size: .9rem; color: var(--blue); }
.work-item:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -24px rgba(15,27,45,.4); }
.work-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.work-tag { font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); background: var(--blue-soft); padding: 4px 11px; border-radius: var(--r-sm); }
.work-year { font-weight: 700; font-size: .82rem; color: var(--ink-faint); }
.work-name { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; margin-bottom: 10px; letter-spacing: -0.02em; }
.work-text { color: var(--ink-soft); font-size: .96rem; margin-bottom: 16px; }
.work-stack { font-weight: 600; font-size: .82rem; color: var(--ink-faint); margin-top: auto; }
.work-link { font-weight: 700; font-size: .9rem; color: var(--blue); margin-top: 12px; align-self: flex-start; transition: transform .15s ease; }
.work-link:hover { transform: translateX(4px); }
.work-note { margin-top: 30px; color: var(--ink-soft); font-size: .98rem; max-width: 56ch; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 52px; align-items: start; }
.about-text p { color: var(--ink-soft); margin-top: 16px; max-width: 60ch; }
.about-text .section-title { margin-bottom: 8px; }
.about-side { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.fact { display: flex; flex-direction: column; gap: 3px; padding: 18px 22px; border-bottom: 1px solid var(--line); transition: background .18s ease; }
.fact:hover { background: var(--paper-2); }
.fact:last-child { border-bottom: 0; }
.fact-k { font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--blue); }
.fact-v { font-size: 1rem; color: var(--ink); font-weight: 500; }

/* ---------- Tech strip ---------- */
.tech-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tech-tags li {
  font-weight: 600; font-size: .88rem;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; color: var(--ink-soft);
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease; cursor: default;
}
.tech-tags li:hover { transform: translateY(-3px); background: var(--blue); color: #fff; border-color: var(--blue); }
.tech-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tech-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 26px; }
.tech-group-title { font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--blue); margin-bottom: 14px; }

/* ---------- Contact ---------- */
.section-contact { text-align: center; }
.contact-inner { max-width: 720px; margin: 0 auto; }
.contact-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin-bottom: 12px; }
.contact-sub { color: var(--ink-soft); margin-bottom: 34px; font-size: 1.05rem; }
.contact-methods { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.contact-method {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 22px; min-width: 230px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.contact-method:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 16px 28px -22px rgba(37,99,235,.5); }
.cm-ic { display: inline-flex; width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--blue-soft); color: var(--blue); align-items: center; justify-content: center; flex-shrink: 0; }
.cm-ic svg { width: 22px; height: 22px; }
.cm-text { display: flex; flex-direction: column; gap: 2px; }
.cm-k { font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.cm-v { font-weight: 600; font-size: 1rem; color: var(--ink); }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 24px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -24px rgba(15,27,45,.4); }
.step-no { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-d); align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; margin-bottom: 16px; }
.step-title { font-family: var(--font-display); font-weight: 700; font-size: 1.14rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.step-text { color: var(--ink-soft); font-size: .94rem; }

/* ---------- Contact form ---------- */
.contact-head { text-align: center; max-width: 660px; margin: 0 auto 44px; }
.contact-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; max-width: 940px; margin: 0 auto; }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; text-align: left; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: .97rem; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.field textarea { resize: vertical; min-height: 120px; }
.contact-form .btn { width: 100%; margin-top: 4px; }
.form-status { margin-top: 14px; font-weight: 600; font-size: .92rem; min-height: 1.2em; }
.form-status.ok { color: #16A34A; }
.form-status.err { color: #DC2626; }
.contact-side { display: flex; flex-direction: column; gap: 12px; }
.contact-side .contact-method { min-width: 0; width: 100%; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer-copy { font-weight: 600; font-size: .85rem; color: var(--ink-faint); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .55s ease, transform .55s cubic-bezier(.22,.9,.32,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .5s ease, transform .5s cubic-bezier(.22,.9,.32,1); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: .04s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .1s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .22s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .28s; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .header-right .btn-sm { display: none; }
  .cards, .work-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; max-width: 560px; }
  .tech-groups { grid-template-columns: 1fr; }
  .card-feature { grid-template-columns: 1fr; gap: 22px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-facts { gap: 18px 28px; }
  .section { padding: 70px 0; }
}
@media (max-width: 480px) {
  .header-inner { gap: 14px; }
  .hero-cta .btn { flex: 1; }
  .card-feature .card-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .contact-method { min-width: 100%; }
}

/* ---------- Motion / a11y ---------- */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .hero-anim { opacity: 1; transform: none; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}
