/* Global reset and variables */
:root {
  --bg: #0b1220;
  --panel: #0e172a;
  --text: #e6edf3;
  --muted: #9fb0c3;
  --brand: #4f8cff;
  --brand-2: #6ee7b7;
  --card: #111827;
  --shadow: rgba(0,0,0,.2);
  --focus-ring: 0 0 0 2px #0b1220, 0 0 0 4px var(--brand);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1000px 600px at 10% -10%, #172554, transparent),
              radial-gradient(800px 400px at 110% 10%, #0ea5e9, transparent),
              var(--bg);
}

.container { width: min(1100px, 92%); margin: 0 auto; }

.site-header { position: sticky; top: 0; backdrop-filter: blur(8px); background: rgba(11,18,32,.6); border-bottom: 1px solid #1f2937; z-index: 10; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; }
.brand { color: white; font-weight: 800; text-decoration: none; letter-spacing: .5px; }
.nav a { color: var(--muted); margin-right: 1rem; text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; position: relative; }
.nav a[aria-current="page"]::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px; background: linear-gradient(90deg,var(--brand),var(--brand-2)); border-radius: 2px; }
.nav button { background: transparent; border: 1px solid #334155; color: var(--muted); border-radius: 6px; padding: .35rem .6rem; cursor: pointer; }

.hero { padding: 3.5rem 0 2rem; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; }
.hero-copy h1 { font-size: clamp(1.8rem, 3.4vw, 3rem); line-height: 1.15; margin: 0 0 .7rem; }
.hero-copy h1.hero-minimal { font-size: clamp(1.4rem, 2.6vw, 2.25rem); line-height: 1.18; }
.hero-copy p { color: var(--muted); margin: 0 0 1.2rem; font-size: 1.05rem; }
.hero-copy.centered { text-align: center; }
.hero-copy.centered .hero-cta { justify-content: center; }
.tagline-secondary { font-size: .95rem; max-width: 620px; margin: 0 auto 1.2rem; }
@media (max-width: 600px) { .tagline-secondary { font-size: .9rem; } }
.hero-cta { display: flex; gap: .8rem; }
.btn { display: inline-block; padding: .7rem 1rem; border-radius: 8px; border: 1px solid #334155; color: var(--text); text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: none; color: #0b1220; font-weight: 700; }
.hero-figure { background: var(--card); border: 1px solid #1f2937; border-radius: 12px; padding: .6rem; box-shadow: 0 10px 30px var(--shadow); }
.hero-figure .hero-img { width: 100%; height: auto; max-width: clamp(190px, 46vw, 280px); aspect-ratio: 4/5; object-fit: cover; object-position: 55% 35%; border-radius: 8px; }
.hero-figure img { width: 100%; height: auto; border-radius: 8px; display: block; }
.hero-figure figcaption { color: var(--muted); font-size: .9rem; padding: .4rem .4rem 0; }

.services { padding: 2.5rem 0; }
.services h2 { margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card { background: var(--card); border: 1px solid #1f2937; border-radius: 12px; padding: 1rem; box-shadow: 0 4px 12px var(--shadow); }
.card h3 { margin: .2rem 0 .6rem; }
.card p { color: var(--muted); }

.about { padding: 2.5rem 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.about-figure { background: var(--card); border: 1px solid #1f2937; border-radius: 12px; padding: .6rem; box-shadow: 0 8px 24px var(--shadow); }
.about-figure .about-img { width: 100%; height: auto; max-width: clamp(260px, 70vw, 420px); object-fit: contain; display: block; margin: 0 auto; border-radius: 8px; }
.about-figure .about-img { max-width: clamp(220px, 60vw, 340px); }
.about-figure img { width: 100%; height: auto; border-radius: 8px; display: block; }
.about-figure figcaption { color: var(--muted); font-size: .9rem; padding: .4rem .4rem 0; }
.badges { list-style: none; padding: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.badges li { background: #0b2e40; color: #a5f3fc; border: 1px solid #0ea5e9; padding: .25rem .5rem; border-radius: 999px; font-size: .85rem; }
.badges.linked li a { color: inherit; text-decoration: none; display: inline-block; padding: .1rem .2rem; }
.badges.linked li a:hover { text-decoration: underline; }

.consulting { padding: 2.5rem 0 3rem; }
.consulting .cta { margin-top: 1rem; }

/* Portfolio */
.portfolio { padding: 2.5rem 0; }
.project-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .9rem; }
.project-item { background: var(--card); border: 1px solid #1f2937; border-radius: 12px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .45rem; box-shadow: 0 4px 12px var(--shadow); }
.project-head { display: flex; align-items: center; gap: .6rem; }
.project-head a.repo { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--text); text-decoration: none; }
.project-head a.repo:hover { color: var(--brand); }
.gh-icon { width: 22px; height: 22px; display: inline-block; }
.icon-medium { width: 22px; height: 22px; display: inline-block; }
.project-desc { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.35; }
.project-item.clickable { cursor: pointer; transition: transform .2s, box-shadow .25s, border-color .25s; }
.project-item.clickable:hover { transform: translateY(-3px); box-shadow: 0 8px 22px var(--shadow); border-color: var(--brand); }
.project-item.clickable:focus { outline: none; box-shadow: 0 0 0 3px #0b1220, 0 0 0 5px var(--brand); }

/* Modern learn more link */
.learn-more { --lm-color: var(--brand); position: relative; display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .78rem; letter-spacing: .4px; text-decoration: none; color: var(--brand); padding: .25rem .6rem .28rem .55rem; background: rgba(79,140,255,.12); border: 1px solid rgba(79,140,255,.35); border-radius: 999px; line-height: 1; transition: background .35s, border-color .35s, color .35s, transform .35s; backdrop-filter: blur(2px); }
.learn-more::after { content: '\2197'; font-size: .8rem; translate: 0 0; transition: transform .35s; }
.learn-more:hover { background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #0b1220; border-color: transparent; transform: translateY(-2px); }
.learn-more:hover::after { transform: translate(.15rem,-.15rem); }
.learn-more:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.project-desc .learn-more { margin-left: .35rem; }

/* Project bullets (services replacement) */
.project-bullets { list-style: disc; margin: 1rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .75rem; font-size: .95rem; line-height: 1.4; }
.project-bullets li { color: var(--muted); }
.project-bullets strong { color: var(--text); }

/* Social links */
.social-links { margin-top: 1.6rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.hero-social { margin-top: 0; margin-bottom: 1rem; justify-content: center; }
.social-links a { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid #1f2937; border-radius: 10px; color: var(--muted); text-decoration: none; transition: background .25s, color .25s, border-color .25s, transform .25s; }
.social-links a:hover { color: var(--text); border-color: var(--brand); transform: translateY(-2px); }
.social-links a .icon { width: 22px; height: 22px; }

/* Floating meeting button */
.floating-meeting { position: fixed; right: 1.1rem; bottom: 4.5rem; background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #0b1220; font-weight: 700; text-decoration: none; padding: .75rem 1.1rem; border-radius: 999px; box-shadow: 0 8px 28px rgba(0,0,0,.4); z-index: 45; font-size: .85rem; letter-spacing: .5px; border: none; }
.floating-meeting:hover { filter: brightness(1.05); }
@media (max-width: 600px) { .floating-meeting { bottom: 6.2rem; right: .8rem; padding: .65rem .9rem; } }

/* Call to Action section */
.call-to-action { padding: 2.5rem 0 2rem; background: radial-gradient(600px 300px at 90% 10%, rgba(79,140,255,.15), transparent); }
.call-to-action h2 { margin-top: 0; }
.call-to-action .cta-lead { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.call-to-action .inline-cta { font-size: .7rem; padding: .45rem .7rem; border-radius: 999px; background: #1e293b; border: 1px solid #334155; font-weight: 600; position: relative; top: -2px; }
.call-to-action .inline-cta:hover { background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #0b1220; border-color: transparent; }
.about-intro { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.about-intro + .about-intro { margin-top: 1rem; }
.about-intro.secondary { font-size: .95rem; line-height: 1.5; }
.about-intro.tertiary { font-size: .92rem; color: var(--muted); line-height: 1.5; }
.org-link { font-weight: 600; text-decoration: none; background: linear-gradient(90deg,var(--brand),var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; position: relative; }
.org-link::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px; background: linear-gradient(90deg,var(--brand),var(--brand-2)); opacity: .4; transition: opacity .25s, transform .25s; transform: scaleX(.85); transform-origin: left; }
.org-link:hover::after { opacity: 1; transform: scaleX(1); }
.badges.expertise { margin-top: 1.2rem; }
.badges.expertise li { letter-spacing: .3px; }
.org-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .55rem .28rem; border: 1px solid #1f2937; background: #111d33; border-radius: 999px; font-size: .7rem; line-height: 1; text-decoration: none; font-weight: 600; letter-spacing: .5px; position: relative; top: -1px; }
.org-pill .org-icon { background: #1e2b42; padding: .25rem .4rem; border-radius: 6px; font-size: .6rem; letter-spacing: .5px; display: inline-block; font-weight: 700; }
.org-pill .org-name { font-size: .65rem; }
.org-pill:hover { border-color: var(--brand); background: linear-gradient(135deg,#132743,#1e3253); }
.org-pill.wf .org-icon { background: #b91c1c; color: #fff; }
.org-pill.ubs .org-icon { background: #111827; color: #f87171; }

/* AI Agents */
.ai-agents { padding: 2.5rem 0 3rem; }
.ai-agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1rem; }
.agent-card { background: var(--card); border: 1px solid #1f2937; border-radius: 12px; padding: .85rem .9rem 1rem; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .4rem; }
.agent-card h3 { margin: 0; font-size: 1rem; }
.agent-card p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.3; }
.agent-card a { color: var(--brand); text-decoration: none; font-size: .8rem; font-weight: 600; letter-spacing: .3px; }
.agent-card a:hover { text-decoration: underline; }
.section-intro { color: var(--muted); max-width: 640px; font-size: .95rem; line-height: 1.45; }

/* Minimal header adjustments */
.site-header.minimal .nav a { font-size: .85rem; letter-spacing: .5px; }
.nav.small { display: flex; gap: 1rem; }

/* Utility */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.site-footer { border-top: 1px solid #1f2937; background: #0a0f1c; color: var(--muted); }
.site-footer .container { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 0; }
.site-footer .ai-note { font-size: .95rem; }
.site-footer .tiny { font-size: .6rem; letter-spacing: .4px; opacity: .8; }
.former-link { font-size: .55rem; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: .25rem .45rem; border: 1px solid #1f2937; border-radius: 6px; background: #0f1828; display: inline-block; line-height: 1; position: relative; top: -1px; opacity: .75; transition: color .25s, border-color .25s, background .25s, opacity .25s; }
.former-link:hover, .former-link:focus { color: var(--text); border-color: var(--brand); background: linear-gradient(135deg,#132238,#182d48); opacity: 1; outline: none; }
.light .former-link { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.light .former-link:hover, .light .former-link:focus { color: #0b1220; }

/* Slight tweak for very small screens */
@media (max-width: 500px) { .site-footer .container { flex-direction: column; align-items: flex-start; gap: .4rem; } }

/* Legal / Language */
.legal-nav { display: flex; align-items: center; gap: .9rem; }
.legal-link { background: none; border: none; color: var(--muted); font: inherit; cursor: pointer; text-decoration: none; padding: .2rem .4rem; border-radius: 6px; transition: color .25s, background .25s; }
.legal-link:hover, .legal-link:focus { color: var(--text); background: #1e293b; outline: none; }
.light .legal-link:hover, .light .legal-link:focus { background: #e2e8f0; }
.privacy-link { font-size: .75rem; letter-spacing: .5px; }
.lang-switch { display: inline-flex; gap: .3rem; background: #101a2b; padding: .25rem; border-radius: 8px; border: 1px solid #1f2937; }
.light .lang-switch { background: #f1f5f9; border-color: #cbd5e1; }
.lang-option { font-size: .65rem; font-weight: 600; letter-spacing: .6px; line-height: 1; padding: .35rem .55rem; border: none; color: var(--muted); background: transparent; border-radius: 5px; position: relative; }
.lang-option[aria-pressed="true"], .lang-option.active { background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #0b1220; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.lang-option:focus-visible { box-shadow: var(--focus-ring); }

/* Enhanced cookie consent minor tweaks */
.cookie-consent { font-size: .8rem; }
.cookie-consent .cc-inner { max-width: 960px; margin: 0 auto; }
.cc-btn { font-weight: 500; }
.cc-btn.cc-decline { background: #24324a; }
.cc-text button.cc-link { font-weight: 600; }

/* Light theme */
.light {
  --bg: #f7fafc;
  --panel: #ffffff;
  --text: #0b1220;
  --muted: #4b5563;
  --card: #ffffff;
}
.light body { background: var(--bg); }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-figure .hero-img { max-width: 65vw; }
  .about-figure .about-img { max-width: 80vw; }
}

/* Cookie Consent */
.cookie-consent { position: fixed; inset: auto 0 0 0; display: flex; flex-direction: column; gap: .6rem; padding: .9rem clamp(.9rem,2vw,1.4rem); background: rgba(11,18,32,.92); backdrop-filter: blur(6px); border-top: 1px solid #1f2937; font-size: .85rem; z-index: 50; }
.light .cookie-consent { background: rgba(255,255,255,.92); border-color: #e2e8f0; }
.cookie-consent .cc-inner { display: flex; flex-direction: column; gap: .6rem; }
.cc-text { margin: 0; line-height: 1.4; }
.cc-link { background: none; border: none; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.cc-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cc-btn { background: #1e293b; color: #fff; border: 1px solid #334155; border-radius: 6px; padding: .45rem .8rem; cursor: pointer; font-size: .75rem; letter-spacing: .4px; }
.light .cc-btn { background: #f1f5f9; color: #0b1220; border-color: #cbd5e1; }
.cc-btn.cc-accept { background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #0b1220; border: none; font-weight: 600; }
.cc-btn.cc-decline { background: #334155; }
.cc-panel { position: fixed; bottom: 5.5rem; right: 1rem; width: min(320px, 92%); background: var(--card); border: 1px solid #1f2937; border-radius: 12px; padding: 1rem .95rem 1.1rem; box-shadow: 0 6px 24px var(--shadow); display: flex; flex-direction: column; gap: .75rem; z-index: 60; font-size: .8rem; }
.light .cc-panel { border-color: #e2e8f0; }
.cc-panel fieldset { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.cc-panel legend { font-weight: 600; margin-bottom: .3rem; }
.cc-opt { display: flex; gap: .4rem; align-items: center; font-size: .75rem; }
.cc-panel-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.cookie-consent[hidden], .cc-panel[hidden] { display: none !important; }

