/* ============================================================
   SAP Fiori inspired Portfolio
   Color tokens follow SAP Quartz Light palette
   ============================================================ */

:root {
  /* Brand / surfaces */
  --fiori-shell-bg: #354a5f;        /* shell bar */
  --fiori-shell-fg: #ffffff;
  --fiori-shell-fg-muted: rgba(255, 255, 255, 0.72);
  --fiori-page-bg: #f7f7f7;          /* page background */
  --fiori-page-bg-alt: #eff1f4;
  --fiori-card-bg: #ffffff;
  --fiori-border: #d9d9d9;
  --fiori-border-soft: #e5e5e5;
  --fiori-divider: #ebebeb;

  /* Brand accents */
  --fiori-blue: #0a6ed1;             /* primary action / link */
  --fiori-blue-hover: #085caf;
  --fiori-blue-soft: #e8f1fa;
  --fiori-orange: #df6e0c;
  --fiori-green: #107e3e;
  --fiori-red: #bb0000;

  /* Text */
  --fiori-text-primary: #32363a;
  --fiori-text-secondary: #6a6d70;
  --fiori-text-muted: #89919a;

  /* Shape & motion */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --shadow-1: 0 0 1px rgba(0,0,0,.30), 0 1px 2px rgba(0,0,0,.08);
  --shadow-2: 0 0 1px rgba(0,0,0,.30), 0 2px 6px rgba(0,0,0,.10);
  --shadow-3: 0 0 1px rgba(0,0,0,.30), 0 8px 24px rgba(0,0,0,.10);
  --shadow-hover: 0 0 1px rgba(0,0,0,.30), 0 4px 12px rgba(0,0,0,.16);

  --shell-h: 56px;
  --content-max: 1280px;
  --gutter: 24px;
}

/* ============================================================
   Base
   ============================================================ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans 3", "72", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fiori-text-primary);
  background: var(--fiori-page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,h2,h3,h4 { margin: 0; font-weight: 600; color: var(--fiori-text-primary); letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
p  { margin: 0; }
a  { color: var(--fiori-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--fiori-text-secondary); font-weight: 400; }

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

/* ============================================================
   Shell Bar (Fiori Launchpad header)
   ============================================================ */

.shell-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--shell-h);
  background: var(--fiori-shell-bg);
  color: var(--fiori-shell-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  gap: 16px;
  box-shadow: var(--shadow-2);
}

.shell-bar__left,
.shell-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shell-bar__left { flex: 0 0 auto; }
.shell-bar__right { margin-left: auto; }

.shell-bar__menu,
.shell-bar__icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--fiori-shell-fg);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.shell-bar__menu:hover,
.shell-bar__icon-btn:hover {
  background: rgba(255,255,255,0.10);
}

.shell-bar__avatar-btn { padding: 0; overflow: hidden; }
.shell-bar__avatar-btn img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}

.shell-bar__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 4px;
}

.shell-bar__logo-mark {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0a6ed1 0%, #5dadff 100%);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 14px;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}

.shell-bar__logo-text {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.shell-bar__logo-text strong { font-weight: 700; }

.shell-bar__nav {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}

.shell-bar__nav-link {
  color: var(--fiori-shell-fg-muted);
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.shell-bar__nav-link:hover {
  color: white;
  background: rgba(255,255,255,0.10);
  text-decoration: none;
}

@media (max-width: 820px) {
  .shell-bar__nav { display: none; }
  .shell-bar__logo-text { display: none; }
}

/* ============================================================
   Object Header (Fiori Object Page)
   ============================================================ */

.object-header {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  border-bottom: 1px solid var(--fiori-border-soft);
}

.object-header__wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 32px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: start;
}

@media (max-width: 980px) {
  .object-header__wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Profile */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.profile__avatar-frame {
  position: relative;
  width: 152px;
  height: 152px;
  border-radius: 50%;
  background: white;
  padding: 4px;
  box-shadow: var(--shadow-3);
  overflow: hidden;
  isolation: isolate;
}

.profile__avatar-frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #0a6ed1, #5dadff, #0a6ed1);
  z-index: -1;
}

.profile__avatar-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile__edit-btn {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(53, 74, 95, 0.92);
  color: white;
  border: none;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  cursor: pointer;
}

.profile__avatar-frame:hover .profile__edit-btn,
.profile__edit-btn:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.profile__actions {
  display: flex;
  gap: 8px;
}

/* Identity */
.identity {
  min-width: 0;
}

.identity__crumbs {
  font-size: 12px;
  color: var(--fiori-text-secondary);
  margin-bottom: 8px;
}
.identity__crumbs .crumb-sep {
  margin: 0 6px;
  color: var(--fiori-text-muted);
}

.identity__name {
  font-size: 32px;
  line-height: 1.15;
  margin-bottom: 4px;
  outline: none;
  border-radius: 4px;
  padding: 2px 4px;
  margin-left: -4px;
  transition: background 0.15s ease;
}
.identity__name:hover,
.identity__name:focus {
  background: var(--fiori-blue-soft);
}

.identity__title {
  font-size: 16px;
  color: var(--fiori-text-primary);
  margin-bottom: 16px;
  font-weight: 400;
}

.identity__lead {
  font-size: 15px;
  color: var(--fiori-text-secondary);
  max-width: 56ch;
  margin-bottom: 18px;
}

.identity__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--fiori-border);
  color: var(--fiori-text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.chip--primary {
  background: var(--fiori-blue-soft);
  border-color: #b3d4f0;
  color: #054c8c;
}
.chip--accent {
  background: #fff4e5;
  border-color: #f4cc94;
  color: #8c4f00;
}

/* KPI tiles */
.kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 280px;
}

@media (max-width: 980px) {
  .kpis { width: 100%; max-width: 480px; }
}

.kpi {
  background: var(--fiori-card-bg);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-1);
  border-left: 3px solid var(--fiori-blue);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.kpi:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.kpi:nth-child(2) { border-left-color: var(--fiori-orange); }
.kpi:nth-child(3) { border-left-color: var(--fiori-green); }
.kpi:nth-child(4) { border-left-color: #5dadff; }

.kpi__label {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fiori-text-secondary);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.kpi__value {
  font-size: 28px;
  font-weight: 300;
  color: var(--fiori-text-primary);
  line-height: 1;
}
.kpi__unit {
  font-size: 13px;
  color: var(--fiori-text-secondary);
  margin-left: 4px;
  font-weight: 400;
}
.kpi__trend {
  margin-top: 6px;
  font-size: 11px;
  color: var(--fiori-text-secondary);
}
.kpi__trend--up { color: var(--fiori-green); font-weight: 600; }

/* ============================================================
   Tab Bar (IconTabBar)
   ============================================================ */

.tabbar {
  background: white;
  border-bottom: 1px solid var(--fiori-border-soft);
  display: flex;
  gap: 32px;
  padding: 0 var(--gutter);
  max-width: var(--content-max);
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }

.tabbar__item {
  padding: 16px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--fiori-text-secondary);
  border-bottom: 3px solid transparent;
  font-size: 13px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tabbar__item:hover { color: var(--fiori-blue); text-decoration: none; }
.tabbar__item.is-active {
  color: var(--fiori-blue);
  border-bottom-color: var(--fiori-blue);
}
.tabbar__count {
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}
.tabbar__label {
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* ============================================================
   Page sections
   ============================================================ */

.page-section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px var(--gutter);
}
.page-section--alt {
  background: var(--fiori-page-bg-alt);
  max-width: none;
}
.page-section--alt > * { max-width: var(--content-max); margin-left: auto; margin-right: auto; }

.section-head { margin-bottom: 24px; }
.section-head__title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}
.section-head__sub {
  color: var(--fiori-text-secondary);
  font-size: 14px;
}

/* ============================================================
   Expertise grid
   ============================================================ */

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.ex-card {
  background: var(--fiori-card-bg);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-1);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  border: 1px solid transparent;
}

.ex-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--fiori-blue-soft);
}

.ex-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--fiori-blue-soft);
  color: var(--fiori-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ex-card__title { font-size: 16px; font-weight: 600; }
.ex-card__desc {
  color: var(--fiori-text-secondary);
  font-size: 13px;
  line-height: 1.55;
  flex: 1;
}
.ex-card__count {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fiori-blue);
  background: var(--fiori-blue-soft);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ============================================================
   Brand grids
   ============================================================ */

.brand-block { margin-bottom: 32px; }
.brand-block:last-child { margin-bottom: 0; }

.brand-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fiori-divider);
}
.brand-block__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fiori-text-primary);
}
.brand-block__count {
  font-size: 12px;
  color: var(--fiori-text-secondary);
  background: white;
  border: 1px solid var(--fiori-border);
  border-radius: 999px;
  padding: 2px 10px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.brand-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px 16px 16px;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.brand-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--fiori-blue-soft);
}

.brand-card__logo {
  width: 100%;
  max-width: 120px;
  height: 48px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: grayscale(30%);
  opacity: 0.88;
  transition: filter 0.18s ease, opacity 0.18s ease;
}
.brand-card:hover .brand-card__logo {
  filter: grayscale(0%);
  opacity: 1;
}

.brand-card__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--fiori-text-secondary);
  letter-spacing: 0.01em;
}

/* Logo-fallback when image not loaded yet */
.brand-card__logo.brand-card__logo--text {
  width: auto;
  height: auto;
  font-weight: 700;
  font-size: 18px;
  color: var(--fiori-shell-bg);
  letter-spacing: -0.02em;
  background: none !important;
}

/* Product image area */
.brand-card__product {
  height: 88px;
  flex-shrink: 0;
  background-color: #f0f3f7;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-origin: content-box;
  padding: 10px;
  border-bottom: 1px solid var(--fiori-divider);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s ease;
}
.brand-card:hover .brand-card__product {
  background-color: #e3ecf7;
}
.brand-card__product-ph {
  color: var(--fiori-text-muted);
  opacity: 0.28;
  pointer-events: none;
}
.brand-card__product.has-img .brand-card__product-ph {
  display: none;
}

/* Logo + name wrapper */
.brand-card__info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

/* ============================================================
   Certifications
   ============================================================ */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.cert-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-1);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-left: 4px solid var(--fiori-blue);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.cert-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.cert-card:nth-child(2) { border-left-color: var(--fiori-orange); }
.cert-card:nth-child(3) { border-left-color: var(--fiori-green); }
.cert-card:nth-child(4) { border-left-color: var(--fiori-red); }

.cert-card__badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7f7f7 0%, #e5e5e5 100%);
  color: var(--fiori-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}
.cert-card:nth-child(1) .cert-card__badge { color: #5dadff; }
.cert-card:nth-child(2) .cert-card__badge { color: var(--fiori-orange); }
.cert-card:nth-child(3) .cert-card__badge { color: var(--fiori-green); }
.cert-card:nth-child(4) .cert-card__badge { color: var(--fiori-red); }

.cert-card__body { min-width: 0; flex: 1; }
.cert-card__issuer {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fiori-text-secondary);
  font-weight: 600;
}
.cert-card__title {
  font-size: 15px;
  font-weight: 600;
  margin: 4px 0;
  color: var(--fiori-text-primary);
}
.cert-card__abbr {
  font-size: 13px;
  color: var(--fiori-text-secondary);
  margin-bottom: 6px;
}
.cert-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fiori-green);
  background: #e6f4ea;
  padding: 2px 8px;
  border-radius: 999px;
}
.cert-card__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fiori-green);
}

/* ============================================================
   Frameworks
   ============================================================ */

.framework-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.framework-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-1);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.framework-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.framework-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.framework-card__pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fiori-blue);
  background: var(--fiori-blue-soft);
  padding: 3px 10px;
  border-radius: 999px;
}
.framework-card__title {
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 8px;
  color: var(--fiori-text-primary);
}
.framework-card__desc {
  color: var(--fiori-text-secondary);
  margin-bottom: 12px;
  font-size: 14px;
}
.framework-card__points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.framework-card__points li {
  font-size: 13px;
  color: var(--fiori-text-primary);
  padding-left: 18px;
  position: relative;
}
.framework-card__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fiori-blue);
  opacity: 0.6;
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fiori-text-muted);
}
.status-dot--ok { background: var(--fiori-green); box-shadow: 0 0 0 3px rgba(16,126,62,0.15); }

/* ============================================================
   Contact / footer / buttons
   ============================================================ */

.contact-card {
  background: linear-gradient(135deg, #354a5f 0%, #0a6ed1 100%);
  color: white;
  border-radius: var(--radius-md);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-2);
}
@media (max-width: 700px) {
  .contact-card { grid-template-columns: 1fr; }
}

.contact-card__title {
  color: white;
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 6px;
}
.contact-card__sub {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  max-width: 60ch;
}
.contact-card__right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  background: white;
  color: var(--fiori-blue);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn--sm { padding: 6px 12px; font-size: 12px; }

.btn--primary {
  background: white;
  color: var(--fiori-blue);
}
.btn--primary:hover {
  background: #f0f4f8;
  color: var(--fiori-blue-hover);
}

.btn--ghost {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.5);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.10);
  border-color: white;
  color: white;
}
.contact-card .btn--ghost { color: white; }
.profile .btn--ghost { color: var(--fiori-blue); border-color: var(--fiori-border); }
.profile .btn--ghost:hover { background: var(--fiori-blue-soft); border-color: var(--fiori-blue); }

/* Footer */
.footer {
  background: var(--fiori-shell-bg);
  color: var(--fiori-shell-fg-muted);
  padding: 24px var(--gutter);
}
.footer__wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
}
.footer__tag { font-size: 12px; }

/* ============================================================
   Toast
   ============================================================ */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #32363a;
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: var(--shadow-3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   Reduced motion
   ============================================================ */

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