:root {
  --paper: #ffffff;
  --paper-soft: #f7f5f5;
  --ink: #121014;
  --ink-900: #0a0a0d;
  --ink-800: #17141a;
  --muted: #6b6670;
  --muted-light: #b9a9ae;
  --line: #ece7e8;
  --red-500: #ef233c;
  --red-600: #d90429;
  --red-700: #a30021;
  --red-glow: rgba(217, 4, 41, 0.45);
  --font-head: "Unbounded", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1140px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- HEADER ---------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 13, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 1.05rem;
  color: #fff;
}

.logo span { color: var(--red-500); }

nav.main-nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  font-size: 0.92rem;
  color: #c9c4c8;
  position: relative;
  padding-bottom: 4px;
}

nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red-500), var(--red-700));
  transition: width 0.25s ease;
}

nav.main-nav a:hover { color: #fff; }
nav.main-nav a:hover::after { width: 100%; }

/* ---------- BUTTONS ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff;
  box-shadow: 0 10px 24px -8px var(--red-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -8px var(--red-glow);
}

.btn-ghost-dark {
  border-color: rgba(255, 255, 255, 0.25);
  color: #f1eef0;
}

.btn-ghost-dark:hover {
  border-color: var(--red-500);
  color: #fff;
  background: rgba(217, 4, 41, 0.08);
}

.link-arrow {
  color: var(--muted-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.link-arrow:hover {
  color: #fff;
  border-color: var(--red-500);
}

.link-arrow.on-light {
  color: var(--muted);
  border-color: var(--line);
}

.link-arrow.on-light:hover {
  color: var(--ink);
  border-color: var(--red-600);
}

/* ---------- SECTION HELPERS ---------- */

section { position: relative; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.section-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-600);
  box-shadow: 0 0 10px 2px var(--red-glow);
}

.section-label.on-dark { color: var(--muted-light); }

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.18;
  margin: 0 0 18px;
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 10px;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 32px;
}

.lead.on-dark { color: var(--muted-light); }

/* ---------- HERO ---------- */

.hero {
  background: radial-gradient(circle at 18% -10%, rgba(217, 4, 41, 0.45), transparent 55%),
              radial-gradient(circle at 100% 10%, rgba(239, 35, 60, 0.18), transparent 50%),
              var(--ink-900);
  color: #fff;
  padding: 130px 0 110px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 70%);
  pointer-events: none;
}

.hero .wrap { position: relative; }

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-500);
  border: 1px solid rgba(239, 35, 60, 0.35);
  background: rgba(239, 35, 60, 0.08);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 26px;
}

h1 {
  font-size: clamp(2.2rem, 5.6vw, 3.8rem);
  line-height: 1.08;
  margin: 0 0 22px;
  max-width: 760px;
  color: #fff;
}

h1 .accent {
  background: linear-gradient(100deg, var(--red-500), #ff8a7a 60%, var(--red-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- SERVICES ---------- */

#services { background: var(--paper); padding: 96px 0; }

.services-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 40px;
}

.card {
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 20px 40px -20px rgba(169, 0, 33, 0.35);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.card p { color: var(--muted); margin: 0; }

/* ---------- ABOUT ---------- */

#about {
  background: radial-gradient(circle at 85% 20%, rgba(217, 4, 41, 0.28), transparent 55%), var(--ink-900);
  color: #fff;
  padding: 96px 0;
}

.skills-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.skills-list li {
  padding: 9px 18px;
  border: 1px solid rgba(239, 35, 60, 0.4);
  background: rgba(239, 35, 60, 0.08);
  border-radius: 999px;
  font-size: 0.88rem;
  color: #f1eef0;
  transition: background 0.2s, border-color 0.2s;
}

.skills-list li:hover {
  background: rgba(239, 35, 60, 0.18);
  border-color: var(--red-500);
}

/* ---------- PORTFOLIO ---------- */

#portfolio { background: var(--paper); padding: 96px 0; }

.portfolio-list {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 40px;
}

.portfolio-item {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(17, 16, 20, 0.25);
}

.portfolio-visual {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.6rem;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
}

.portfolio-visual.optimizator {
  background: linear-gradient(135deg, #2a2a2e, var(--ink-900) 70%);
}

.portfolio-visual.sitemanager {
  background: linear-gradient(135deg, var(--red-700), var(--red-500) 80%);
}

.portfolio-visit {
  display: inline-flex;
  margin-top: 16px;
}

.portfolio-body { padding: 24px 26px 28px; }

.portfolio-index {
  color: var(--red-600);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.portfolio-body p { color: var(--muted); margin: 0; }

.portfolio-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 0;
  list-style: none;
  padding: 0;
}

.portfolio-tags li {
  font-size: 0.78rem;
  color: var(--red-700);
  background: rgba(217, 4, 41, 0.07);
  border: 1px solid rgba(217, 4, 41, 0.18);
  border-radius: 999px;
  padding: 4px 11px;
}

/* ---------- PROCESS ---------- */

#process { background: var(--paper-soft); padding: 96px 0; }

.process-grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 48px;
  position: relative;
}

.process-step {
  position: relative;
  padding: 0 20px 0 0;
}

.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 44px;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(217, 4, 41, 0.4), var(--line));
  display: none;
}

@media (min-width: 860px) {
  .process-step:not(:last-child)::after { display: block; }
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 18px;
  box-shadow: 0 8px 18px -6px var(--red-glow);
  position: relative;
  z-index: 1;
}

.process-step p { color: var(--muted); margin: 0; max-width: 220px; }

/* ---------- CONTACT ---------- */

#contact {
  background: var(--ink-900);
  color: #fff;
  padding: 100px 0;
}

.contact-section {
  display: grid;
  gap: 56px;
  grid-template-columns: 1fr 1fr;
}

address {
  font-style: normal;
  color: var(--muted-light);
}

address a {
  color: #fff;
  font-size: 1.3rem;
  font-family: var(--font-head);
  font-weight: 600;
  display: inline-block;
  margin: 6px 0 14px;
  border-bottom: 2px solid var(--red-600);
  padding-bottom: 2px;
}

address a:hover { color: var(--red-500); }

form {
  display: grid;
  gap: 18px;
  background: var(--ink-800);
  padding: 28px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted-light);
  margin-bottom: 7px;
}

input, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.96rem;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  transition: border-color 0.2s, background 0.2s;
}

input::placeholder, textarea::placeholder { color: #716d74; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--red-500);
  background: rgba(255, 255, 255, 0.06);
}

textarea { resize: vertical; min-height: 100px; }

button.btn-primary {
  cursor: pointer;
  border: none;
  width: fit-content;
  font-family: inherit;
}

/* ---------- FOOTER ---------- */

footer.site-footer {
  background: var(--ink-900);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

footer .logo { color: #fff; }

.footer-tagline {
  color: var(--muted-light);
  font-size: 0.88rem;
  margin: 0;
}

@media (max-width: 720px) {
  nav.main-nav { display: none; }
  .contact-section { grid-template-columns: 1fr; }
}
