:root {
  --bg: #f8fafc;
  --text: #172033;
  --card: #ffffff;
  --muted: #667085;
  --soft: #f1f5f9;
  --soft-2: rgba(241, 245, 249, .55);
  --border: #e2e8f0;
  --primary: #315ea8;
  --primary-dark: #244b8b;
  --primary-soft: rgba(49, 94, 168, .1);
  --danger: #c62828;
  --radius: 12px;
  --shadow: 0 14px 35px rgba(15, 23, 42, .08);
}

html.dark {
  --bg: #111827;
  --text: #edf2f7;
  --card: #182235;
  --muted: #a1adbd;
  --soft: #202c40;
  --soft-2: rgba(32, 44, 64, .55);
  --border: #2c3a51;
  --primary: #72a1eb;
  --primary-dark: #9bbcf0;
  --primary-soft: rgba(114, 161, 235, .12);
  --danger: #ff8b8b;
  --shadow: 0 18px 45px rgba(0, 0, 0, .23);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; transition: background .25s ease, color .25s ease; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.container { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.section { padding: 92px 0; }
.alt-section { background: var(--soft-2); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }

.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .25s ease, box-shadow .25s ease, border-color .25s ease; }
.site-header.scrolled, .site-header.menu-open { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--border); box-shadow: 0 4px 20px rgba(15, 23, 42, .05); backdrop-filter: blur(14px); }
.nav { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.brand span, .eyebrow, .timeline-item small, .roadmap small { color: var(--primary); }
.desktop-nav { display: flex; align-items: center; gap: 4px; }
.desktop-nav > a { padding: 9px 12px; border-radius: 7px; color: var(--muted); font-size: .875rem; font-weight: 600; }
.desktop-nav > a:hover, .desktop-nav > a.active { color: var(--text); background: var(--soft); }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; display: inline-grid; place-items: center; font-size: 1.2rem; }
.icon-btn:hover { background: var(--soft); }
.mobile-actions { display: none; align-items: center; gap: 4px; }
.mobile-menu { overflow: hidden; background: color-mix(in srgb, var(--bg) 96%, transparent); border-top: 1px solid var(--border); }
.mobile-menu .container { display: flex; flex-direction: column; padding-block: 10px; }
.mobile-menu a { padding: 11px 12px; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.mobile-menu a:hover { background: var(--soft); color: var(--text); }

.hero { min-height: 100vh; position: relative; overflow: hidden; display: flex; align-items: center; padding-top: 64px; background: linear-gradient(180deg, var(--primary-soft), transparent 43%); }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(65px); background: var(--primary-soft); pointer-events: none; }
.orb-one { width: 290px; height: 290px; top: 100px; left: 18%; }
.orb-two { width: 380px; height: 380px; right: 15%; bottom: 80px; }
.hero-inner { text-align: center; padding-block: 86px 100px; position: relative; z-index: 1; }
.avatar { width: 136px; height: 136px; margin: 0 auto 30px; border-radius: 50%; display: grid; place-items: center; font-size: 2.35rem; font-weight: 800; color: var(--primary); background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 18%, transparent), color-mix(in srgb, var(--primary) 4%, transparent)); border: 2px solid color-mix(in srgb, var(--primary) 22%, transparent); }
.badge-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.badge { display: inline-flex; border-radius: 999px; padding: 5px 12px; background: var(--soft); color: var(--muted); font-size: .76rem; font-weight: 600; }
.hero h1 { margin: 0 0 14px; font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: 1.06; letter-spacing: -.055em; }
.hero-subtitle { max-width: 820px; margin: 0 auto 18px; font-size: clamp(1.1rem, 2.4vw, 1.45rem); color: var(--muted); }
.hero-description { max-width: 690px; margin: 0 auto 36px; color: var(--muted); font-size: .96rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 10px 18px; font-weight: 650; font-size: .9rem; cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.dark .btn-primary { color: #0c1728; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-outline:hover, .btn-secondary:hover { background: var(--soft); }
.btn-secondary { background: var(--soft); color: var(--text); }
.scroll-down { position: absolute; left: 50%; bottom: 24px; font-size: 1.45rem; color: var(--muted); animation: bounce 1.5s infinite; }
@keyframes bounce { 50% { transform: translateY(7px); } }

.section-heading { max-width: 700px; margin: 0 auto 50px; text-align: center; }
.section-heading.left-align { max-width: none; margin-left: 0; text-align: left; }
.eyebrow { margin: 0 0 5px; text-transform: uppercase; letter-spacing: .11em; font-size: .77rem; font-weight: 700; }
.section h2 { margin: 0 0 14px; font-size: clamp(2rem, 4vw, 2.55rem); line-height: 1.15; letter-spacing: -.035em; }
.section-heading p:last-child, .about-copy p, .service-card p, .timeline p, .roadmap p, .why-grid > div > p, .contact-info > p { color: var(--muted); }

.about-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 48px; }
.about-copy p { margin-top: 0; }
.facts { padding: 21px; display: grid; gap: 18px; }
.fact { display: flex; gap: 13px; align-items: flex-start; }
.fact > span { color: var(--primary); width: 23px; text-align: center; font-weight: 700; }
.fact strong { font-size: .88rem; }
.fact p { margin: 1px 0 0; color: var(--muted); font-size: .86rem; }

.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.skill-card, .service-card { padding: 25px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.skill-card:hover, .service-card:hover, .capability:hover, .project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 28%, var(--border)); }
.skill-card h3, .service-card h3 { margin: 12px 0; font-size: 1rem; }
.card-icon { width: 44px; height: 44px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.tag-list, .tech-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-list span, .tech-list span { padding: 4px 9px; border-radius: 6px; background: var(--soft); color: var(--muted); font-size: .75rem; }

.project-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter-btn { padding: 9px 15px; border-radius: 999px; border: 0; background: var(--soft); color: var(--muted); font-size: .82rem; font-weight: 650; cursor: pointer; }
.filter-btn.active { background: var(--primary); color: #fff; box-shadow: 0 7px 20px var(--primary-soft); }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.project-card { overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.project-image { aspect-ratio: 16/9; position: relative; display: grid; place-items: center; background: linear-gradient(145deg, var(--primary-soft), transparent); }
.project-letter { font-size: 2.6rem; color: color-mix(in srgb, var(--primary) 25%, transparent); font-weight: 800; }
.status { position: absolute; top: 12px; right: 12px; max-width: calc(100% - 24px); padding: 5px 9px; border-radius: 7px; background: color-mix(in srgb, var(--card) 84%, transparent); backdrop-filter: blur(8px); font-size: .7rem; color: var(--muted); }
.project-body { padding: 20px; }
.project-category { margin: 0 0 4px; color: var(--primary); font-size: .74rem; font-weight: 650; }
.project-body h3 { margin: 0 0 8px; font-size: 1.08rem; }
.project-body > p:not(.project-category) { margin: 0 0 15px; color: var(--muted); font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.project-actions .btn { min-height: 36px; padding: 7px 11px; font-size: .78rem; }

.capability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.capability { min-height: 135px; padding: 20px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; text-align: center; font-size: .84rem; transition: .2s ease; }

.timeline { position: relative; max-width: 760px; margin: auto; display: grid; gap: 34px; }
.timeline::before { content: ""; position: absolute; left: 28px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.timeline-item { position: relative; padding-left: 72px; }
.timeline-dot { position: absolute; z-index: 1; left: 18px; top: 20px; width: 21px; height: 21px; border-radius: 50%; border: 2px solid var(--primary); background: var(--bg); }
.timeline-dot::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--primary); }
.timeline .card { padding: 20px; }
.timeline h3 { margin: 2px 0 5px; font-size: 1rem; }
.timeline p { margin: 0; font-size: .85rem; }

.goals-grid, .why-grid, .contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px; }
.goals-grid h3, .contact-info h3 { margin: 0 0 20px; }
.check-list { padding: 0; margin: 0; list-style: none; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 11px; color: var(--muted); font-size: .87rem; }
.check-list span, .reason span { color: var(--primary); font-weight: 800; }
.roadmap { display: grid; gap: 13px; }
.roadmap h3 { margin: 0; }
.roadmap .card { padding: 15px 17px; margin-left: 20px; position: relative; }
.roadmap .card::before { content: ""; position: absolute; left: -23px; top: 21px; width: 11px; height: 11px; border-radius: 50%; background: var(--primary); }
.roadmap h4 { margin: 2px 0 4px; font-size: .88rem; }
.roadmap p { margin: 0; font-size: .77rem; }

.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.service-card p { margin: 0; font-size: .84rem; }
.why-grid { align-items: center; }
.why-grid > div > p { margin-bottom: 0; }
.reasons-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.reason { padding: 13px; display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: .82rem; }

.contact-info > p { margin-bottom: 22px; }
.contact-links { display: grid; gap: 12px; }
.contact-link { display: flex; align-items: center; gap: 13px; padding: 13px; transition: background .2s ease, border-color .2s ease; }
.contact-link:hover { background: var(--soft); border-color: color-mix(in srgb, var(--primary) 26%, var(--border)); }
.contact-link > span { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.contact-link div { display: grid; }
.contact-link strong { font-size: .85rem; }
.contact-link small { color: var(--muted); }
.contact-form { padding: 24px; position: relative; display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .81rem; font-weight: 650; }
.field label span { color: var(--danger); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--border); color: var(--text); background: var(--bg); border-radius: 8px; padding: 10px 12px; outline: none; transition: border .2s ease, box-shadow .2s ease; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .error { min-height: 0; color: var(--danger); font-size: .72rem; }
.submit-btn { width: fit-content; }
.submit-btn:disabled { opacity: .65; cursor: wait; }
.form-alert { padding: 11px 13px; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); border-radius: 8px; font-size: .82rem; }
.form-success { display: none; min-height: 360px; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); padding: 40px 28px; text-align: center; place-content: center; }
.form-success.show { display: grid; }
.form-success p { color: var(--muted); }
.success-icon { margin: auto; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: rgba(25, 135, 84, .12); color: #198754; font-size: 1.6rem; font-weight: 800; }
.is-hidden { display: none; }
.honeypot { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.footer { border-top: 1px solid var(--border); background: var(--soft-2); padding-top: 46px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 38px; padding-bottom: 34px; }
.footer-grid p { color: var(--muted); font-size: .84rem; max-width: 330px; }
.footer-grid h4 { margin: 0 0 11px; font-size: .84rem; }
.footer-grid > div:nth-child(2) { display: grid; align-content: start; gap: 6px; }
.footer-grid > div:nth-child(2) a { color: var(--muted); font-size: .82rem; }
.social-row { display: flex; gap: 8px; }
.social-row a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); background: var(--card); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.footer-bottom a { font-size: .75rem; }
.back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 35; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--primary); color: #fff; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; cursor: pointer; }
.back-to-top.show { opacity: 1; pointer-events: auto; transform: none; }

.project-dialog { width: min(690px, calc(100% - 28px)); max-height: 86vh; padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.25); overflow: auto; }
.project-dialog::backdrop { background: rgba(7, 12, 24, .63); backdrop-filter: blur(4px); }
.dialog-close { position: sticky; z-index: 2; float: right; top: 12px; margin: 12px 12px 0 0; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); cursor: pointer; }
.dialog-inner { padding: 26px; }
.dialog-inner h2 { margin: 7px 0 10px; }
.dialog-hero { aspect-ratio: 16/7; margin: 18px 0; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, var(--primary-soft), transparent); color: color-mix(in srgb, var(--primary) 28%, transparent); font-size: 3.2rem; font-weight: 800; }
.dialog-inner h4 { margin: 20px 0 5px; }
.dialog-inner p, .dialog-inner li { color: var(--muted); font-size: .86rem; }
.dialog-inner ul { margin: 6px 0; padding-left: 20px; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .projects-grid, .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .goals-grid, .why-grid, .contact-grid { gap: 38px; }
}

@media (max-width: 760px) {
  .desktop-nav { display: none; }
  .mobile-actions { display: flex; }
  .section { padding: 74px 0; }
  .hero-inner { padding-top: 70px; }
  .avatar { width: 112px; height: 112px; font-size: 2rem; }
  .about-grid, .goals-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { gap: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 24px, 1120px); }
  .hero h1 { font-size: 2.7rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .projects-grid, .services-grid, .reasons-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .project-filters { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 7px; }
  .filter-btn { flex: 0 0 auto; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .timeline-item { padding-left: 56px; }
  .timeline::before { left: 20px; }
  .timeline-dot { left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
