:root {
  --bg: #f4efe6;
  --surface: transparent;
  --surface-strong: #fdf9f2;
  --ink: #31191f;
  --muted: #6a5458;
  --line: rgba(102, 47, 58, 0.12);
  --accent: #7c2635;
  --accent-deep: #5f1725;
  --accent-soft: #efe1e0;
  --shadow: none;
  --radius-lg: 0;
  --radius-md: 0;
  --radius-sm: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background:
    linear-gradient(180deg, rgba(124, 38, 53, 0.05) 0, rgba(124, 38, 53, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #f7f1e9 0%, #f2ebe1 100%);
  background-size: 100% 160px, 100% 100%;
  color: var(--ink);
}

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

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - clamp(20px, 4vw, 56px)));
  margin: 0 auto;
  padding-bottom: 80px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 0;
  padding: 22px 0 18px;
  background: linear-gradient(180deg, rgba(247, 241, 233, 0.95), rgba(247, 241, 233, 0.82));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: auto;
  height: 58px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(102, 47, 58, 0.16);
  border-radius: 999px;
  background: rgba(255, 251, 247, 0.92);
}

.lang-button {
  min-width: 42px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.lang-button.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
}

section {
  margin-top: 0;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.hero,
.about,
.services,
.portfolio,
.process,
.contact {
  background: var(--surface);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(360px, 1.04fr);
  gap: clamp(32px, 5vw, 72px);
  min-height: 76vh;
  align-items: start;
  border-top: 0;
  padding-top: 48px;
}

.hero-copy {
  max-width: 38rem;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-deep);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

.hero h1,
.section-heading h2,
.contact-panel h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.8rem, 5.8vw, 5rem);
  max-width: 12ch;
  text-wrap: balance;
}

.hero-text,
.section-heading p,
.about-card p,
.service-card p,
.portfolio-card p,
.process-list p,
.contact-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-text {
  max-width: 62ch;
  margin: 20px 0 0;
  font-size: clamp(1rem, 1.5vw, 1.08rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
}

.button.secondary {
  border-color: var(--line);
  background: transparent;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 14px;
  padding: 0;
  margin: 30px 0 0;
  list-style: none;
}

.metrics li,
.profile-grid article,
.about-card,
.service-card,
.portfolio-card,
.process-list article {
  border: 0;
  background: transparent;
  border-radius: 0;
}

.metrics li {
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.metrics strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
}

.metrics span {
  color: var(--muted);
}

.hero-card {
  position: relative;
  overflow: hidden;
  align-self: start;
  padding: 12px 0 0 clamp(20px, 3vw, 36px);
  border-left: 1px solid var(--line);
  color: var(--ink);
  min-height: auto;
}

.card-glow {
  display: none;
}

.hero-logo-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-start;
  min-height: auto;
  margin-bottom: 24px;
}

.hero-logo {
  width: min(100%, 220px);
  height: auto;
  opacity: 0.96;
  filter: none;
}

.profile-panel,
.profile-grid article {
  position: relative;
  z-index: 1;
}

.profile-panel {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.profile-panel p,
.profile-grid span {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--muted);
}

.profile-panel h2 {
  margin: 10px 0 6px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.35rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.profile-grid article {
  padding: 0;
}

.profile-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 1.1rem;
}

.trusted {
  padding: 26px 0;
  text-align: left;
  color: var(--muted);
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.section-heading h2,
.contact-panel h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  max-width: 14ch;
  text-wrap: balance;
}

.about-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 36px;
}

.about-card,
.service-card,
.portfolio-card,
.process-list article {
  padding: 0;
}

.about-card h3,
.service-card h3,
.portfolio-card h3,
.process-list h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.about-card.accent {
  background: transparent;
}

.service-grid,
.portfolio-grid,
.process-list,
.cert-icon-grid {
  display: grid;
  gap: 28px;
}

.service-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portfolio-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.portfolio-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.portfolio-card.tall {
  grid-row: span 2;
  min-height: 100%;
}

.portfolio-card.wide {
  grid-column: span 2;
}

.cert-page {
  border-top: 0;
  min-height: calc(100vh - 110px);
}

.cert-page-heading {
  max-width: 760px;
  margin-bottom: 36px;
}

.cert-page-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.cert-page-text {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.7;
}

.cert-icon-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cert-image-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.cert-image-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  max-width: 24ch;
}

.cert-badge {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.cert-badge--linux {
  width: 110px;
  height: 110px;
}

.tag {
  display: inline-flex;
  width: fit-content;
  padding: 0 0 8px;
  margin-bottom: 14px;
  border-radius: 0;
  background: transparent;
  border: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.process-list {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.process-list strong {
  color: var(--accent-deep);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
  gap: clamp(22px, 3vw, 40px);
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  font-size: 0.95rem;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid rgba(102, 47, 58, 0.2);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.contact-form textarea {
  resize: vertical;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .topbar {
    gap: 18px;
  }

  .hero,
  .contact-panel,
  .process-list,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 36px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-card {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 26px;
  }

  .portfolio-card.tall,
  .portfolio-card.wide {
    grid-column: auto;
    grid-row: auto;
    min-height: 260px;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 18px, 100%);
  }

  .topbar {
    position: static;
    flex-wrap: wrap;
    padding-top: 18px;
  }

  .brand-logo {
    height: 48px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 6px;
  }

  .lang-switch {
    margin-top: 4px;
  }

  .nav.is-open {
    display: flex;
  }

  .hero,
  .about,
  .services,
  .portfolio,
  .process,
  .contact {
    padding: 40px 0;
  }

  .hero h1 {
    max-width: 100%;
  }

  .metrics,
  .profile-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .section-heading h2,
  .contact-panel h2 {
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .brand-logo {
    height: 42px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }

  .metrics strong,
  .profile-panel h2 {
    font-size: 1.9rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
  }
}
