/*
 * 1707 ehf — Pimped UI layer
 * Overrides style.css for a modern, polished look & feel.
 * Drop after style.css; remove the <link> to revert.
 */

/* ---------- Design tokens ---------- */
:root {
  --c-bg:          #0b1020;
  --c-bg-2:        #0f172a;
  --c-surface:     #ffffff;
  --c-surface-2:   #f6f8ff;
  --c-text:        #0f172a;
  --c-muted:       #5b6478;
  --c-line:        rgba(15, 23, 42, 0.08);
  --c-primary:     #4f46e5;       /* indigo */
  --c-primary-2:   #7c3aed;       /* violet */
  --c-accent:      #06b6d4;       /* cyan */
  --c-pink:        #ec4899;
  --grad-hero:     linear-gradient(135deg, #4f46e5 0%, #7c3aed 45%, #06b6d4 100%);
  --grad-text:     linear-gradient(90deg, #4f46e5, #7c3aed 50%, #06b6d4);
  --shadow-sm:     0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --shadow-md:     0 10px 25px -10px rgba(15, 23, 42, .18), 0 4px 10px -6px rgba(15, 23, 42, .10);
  --shadow-lg:     0 30px 60px -20px rgba(79, 70, 229, .35), 0 12px 24px -12px rgba(15, 23, 42, .25);
  --radius-sm:     10px;
  --radius-md:     16px;
  --radius-lg:     22px;
  --ease:          cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
body {
  font-family: "Poppins", "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--c-text);
  background: #fafbff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Poppins", "Raleway", sans-serif;
  letter-spacing: -0.01em;
}

a { color: var(--c-primary); transition: color .2s var(--ease); }
a:hover { color: var(--c-primary-2); }

::selection { background: rgba(79, 70, 229, .25); }

/* Subtle scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--c-primary), var(--c-primary-2)); border-radius: 999px; }
::-webkit-scrollbar-track { background: #eef0f8; }

/* ---------- Header ----------
 * IMPORTANT: backdrop-filter is applied to ::before, not #header itself.
 * Putting it on #header creates a containing block that traps the
 * position:fixed mobile menu inside the header bar.
 */
#header {
  background: transparent;
  box-shadow: 0 1px 0 var(--c-line);
  height: 76px;
  transition: all .35s var(--ease);
  position: fixed;
}
#header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  z-index: -1;
  pointer-events: none;
  transition: background .35s var(--ease);
}
#header.header-scrolled,
#header.header-inner-pages {
  height: 68px;
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, .25);
}
#header.header-scrolled::before,
#header.header-inner-pages::before {
  background: rgba(255, 255, 255, 0.88);
}
#header .logo img { max-height: 44px; filter: drop-shadow(0 2px 6px rgba(79, 70, 229, .15)); }

.navbar a, .navbar a:focus {
  color: #1f2937;
  font-weight: 500;
  font-size: 14.5px;
  padding: 10px 16px;
  border-radius: 999px;
  transition: all .25s var(--ease);
}
.navbar a:hover,
.navbar .active,
.navbar .active:focus,
.navbar li:hover > a {
  color: #fff;
  background: var(--grad-hero);
  background-size: 200% 200%;
  animation: gradShift 6s var(--ease) infinite;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .55);
}

@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ---------- Hero ---------- */
#hero {
  position: relative;
  width: 100%;
  min-height: 92vh;
  background: var(--c-bg);
  overflow: hidden;
  isolation: isolate;
}
#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 10% 10%, rgba(79, 70, 229, .55), transparent 60%),
    radial-gradient(800px 600px at 90% 20%, rgba(6, 182, 212, .35), transparent 60%),
    radial-gradient(700px 500px at 50% 100%, rgba(236, 72, 153, .28), transparent 60%),
    linear-gradient(180deg, #0b1020 0%, #0f172a 100%);
  z-index: -2;
  animation: heroDrift 14s ease-in-out infinite alternate;
}
#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  z-index: -1;
  opacity: .35;
}
@keyframes heroDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, -1%, 0) scale(1.05); }
}

#hero .container { padding-top: 60px; }

#hero h1 {
  margin: 0 0 18px 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  background: linear-gradient(90deg, #ffffff 0%, #e0e7ff 50%, #a5f3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 30px rgba(0,0,0,.25);
}
#hero h2 {
  color: rgba(226, 232, 240, .82);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 400;
  margin-bottom: 36px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero feature cards — glassmorphism */
#hero .icon-boxes { margin-top: 50px; }
#hero .icon-box {
  position: relative;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-md);
  text-align: left;
  transition: transform .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  overflow: hidden;
}
#hero .icon-box::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,.35), rgba(255,255,255,0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
  opacity: .6;
}
#hero .icon-box:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 50px -25px rgba(0,0,0,.6);
}
#hero .icon-box .icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--grad-hero);
  background-size: 200% 200%;
  animation: gradShift 8s ease infinite;
  box-shadow: 0 10px 24px -8px rgba(79, 70, 229, .65);
  margin-bottom: 18px;
}
#hero .icon-box .icon i { font-size: 26px; color: #fff; line-height: 1; }
#hero .icon-box .title { margin: 0 0 8px 0; }
#hero .icon-box .title a,
#hero .icon-box .title a:hover {
  color: #f8fafc;
  font-size: 17px;
  font-weight: 600;
}
#hero .icon-box .description {
  color: rgba(226, 232, 240, .72);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Sections ---------- */
section { padding: 90px 0; }
.section-bg { background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 100%); }

.section-title { margin-bottom: 56px; }
.section-title h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.section-title h2::before { display: none; }
.section-title h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: var(--grad-text);
}
.section-title p {
  color: var(--c-muted);
  max-width: 720px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- About ---------- */
.about .content {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}
.about .content p { color: #334155; line-height: 1.8; font-size: 15.5px; }
.about .content ul li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0 8px 0 !important;
  font-size: 15px;
  color: #334155;
  position: static !important;
}
.about .content ul i {
  position: static !important;
  color: transparent;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 22px;
  line-height: 1.4;
  flex: 0 0 auto;
}

/* ---------- Services ---------- */
.services .icon-box {
  position: relative;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 36px 28px !important;
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  overflow: hidden;
  height: 100%;
}
.services .icon-box::after {
  content: "";
  position: absolute;
  inset: auto -40% -60% auto;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(79,70,229,.18), transparent 70%);
  filter: blur(10px);
  transition: transform .6s var(--ease), opacity .4s var(--ease);
  opacity: 0;
  pointer-events: none;
}
.services .icon-box:hover {
  transform: translateY(-8px);
  border-color: rgba(79, 70, 229, .25);
  box-shadow: var(--shadow-lg);
}
.services .icon-box:hover::after { opacity: 1; transform: translate(-20px, -20px); }

.services .icon-box .icon { background: transparent !important; position: relative; }
.services .icon-box .icon svg path { fill: rgba(79, 70, 229, .1) !important; transition: fill .35s var(--ease); }
.services .icon-box:hover .icon svg path { fill: rgba(124, 58, 237, .18) !important; }
.services .icon-box .icon i {
  color: transparent;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 38px;
}
.services .icon-box h4 a {
  color: #0f172a;
  font-size: 19px;
  font-weight: 600;
  transition: color .25s var(--ease);
}
.services .icon-box:hover h4 a { color: var(--c-primary); }
.services .icon-box p { color: var(--c-muted); font-size: 14.5px; line-height: 1.7; }

/* ---------- Projects ---------- */
.projects { background: #fafbff; }
.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(79, 70, 229, .25);
  box-shadow: var(--shadow-lg);
  color: inherit;
}
.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdff 100%);
}
.project-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 23, 42, .35));
  opacity: 0;
  transition: opacity .35s var(--ease);
  z-index: 1;
  pointer-events: none;
}
.project-card:hover .project-thumb::before { opacity: 1; }
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .8s var(--ease);
}
.project-card:hover .project-thumb img { transform: scale(1.06); }
.project-thumb::after {
  content: "\2197";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: var(--c-primary);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, .25);
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
  z-index: 2;
}
.project-card:hover .project-thumb::after {
  transform: translate(2px, -2px) scale(1.08);
  background: var(--grad-hero);
  color: #fff;
}
.project-body { padding: 22px 24px 24px; }
.project-body h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: #0f172a;
  transition: color .25s var(--ease);
}
.project-card:hover .project-body h4 { color: var(--c-primary); }
.project-body span {
  font-size: 13.5px;
  color: var(--c-muted);
  letter-spacing: 0.01em;
}

/* ---------- Team ---------- */
.team .member {
  position: relative;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  width: 100%;
}
.team .member:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.team .member .member-img { position: relative; background: linear-gradient(135deg, #eef2ff, #f0fdff); }
.team .member .member-img img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.team .member .social {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, .65));
  padding: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.team .member:hover .social { opacity: 1; }
.team .member .social a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  color: #fff;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.team .member .social a:hover {
  background: var(--c-primary);
  transform: translateY(-2px);
}
.team .member-info { padding: 22px; text-align: center; }
.team .member-info h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: #0f172a;
}
.team .member-info span {
  font-size: 13.5px;
  color: var(--c-muted);
  font-style: normal;
  letter-spacing: 0.01em;
}

/* Fallback if team images are missing — show gradient avatar with initials */
.team .member .member-img img[src=""],
.team .member .member-img img:not([src]) { display: none; }

/* ---------- Contact ---------- */
.contact .info {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  height: 100%;
}
.contact .info > div { padding-left: 56px; position: relative; margin-bottom: 28px; }
.contact .info > div:last-child { margin-bottom: 0; }
.contact .info i {
  position: absolute;
  left: 0; top: 4px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--grad-hero);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .55);
}
.contact .info h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  font-weight: 600;
  margin: 0 0 4px 0;
}
.contact .info p { color: #0f172a; font-weight: 500; font-size: 15px; margin: 0; }

.contact iframe {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md);
  filter: saturate(1.05);
}

.contact .php-email-form {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  height: 100%;
}
.contact .php-email-form .form-control {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 14px 16px;
  font-size: 14.5px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.contact .php-email-form .form-control:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .15);
}
.contact .php-email-form button[type="submit"] {
  background: var(--grad-hero);
  background-size: 200% 200%;
  color: #fff;
  border: 0;
  padding: 14px 40px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background-position .6s var(--ease);
  box-shadow: 0 14px 30px -12px rgba(79, 70, 229, .55);
}
.contact .php-email-form button[type="submit"]:hover {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow: 0 18px 36px -12px rgba(124, 58, 237, .6);
}

/* ---------- Footer ---------- */
#footer {
  background: #0b1020;
  color: rgba(226, 232, 240, .8);
  position: relative;
  overflow: hidden;
}
#footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 200px at 10% 0%, rgba(79, 70, 229, .25), transparent 70%),
    radial-gradient(500px 200px at 90% 100%, rgba(6, 182, 212, .18), transparent 70%);
  pointer-events: none;
}
#footer .container { position: relative; z-index: 1; }
#footer .copyright, #footer .credits { color: rgba(226, 232, 240, .7); font-size: 14px; }
#footer .copyright strong span { color: #fff; }
#footer .credits a { color: #a5b4fc; }
#footer .social-links a {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #e2e8f0;
  margin: 0 4px;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
#footer .social-links a:hover {
  background: var(--grad-hero);
  border-color: transparent;
  transform: translateY(-2px);
  color: #fff;
}

/* ---------- Back to top ---------- */
.back-to-top {
  background: var(--grad-hero) !important;
  background-size: 200% 200% !important;
  border-radius: 14px !important;
  box-shadow: 0 14px 30px -10px rgba(79, 70, 229, .55) !important;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease) !important;
}
.back-to-top:hover { transform: translateY(-3px); }

/* ---------- Preloader ---------- */
#preloader {
  background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0b1020 70%);
}
#preloader:before {
  border-color: rgba(255,255,255,.1);
  border-top-color: #a5b4fc;
  border-bottom-color: #67e8f9;
}

/* ---------- Mobile nav refinement ---------- */
.mobile-nav-toggle { color: #1f2937; font-size: 28px; z-index: 1001; }
.mobile-nav-toggle.bi-x { color: #fff !important; }

.navbar-mobile {
  background: rgba(11, 16, 32, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.navbar-mobile ul {
  background-color: transparent !important;
  padding: 70px 16px 24px !important;
  box-shadow: none !important;
}
.navbar-mobile a,
.navbar-mobile a:focus {
  color: #e2e8f0 !important;
  background: transparent !important;
  padding: 14px 20px !important;
  font-size: 16px !important;
  border-radius: 12px;
  margin: 2px 0;
  display: block;
  font-weight: 500;
}
.navbar-mobile .active,
.navbar-mobile a:hover,
.navbar-mobile li:hover > a {
  color: #fff !important;
  background: var(--grad-hero) !important;
  background-size: 200% 200% !important;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 992px) {
  section { padding: 70px 0; }
  #hero { min-height: auto; padding: 120px 0 80px; }
  .about .content, .contact .info, .contact .php-email-form { padding: 28px; }
}
@media (max-width: 576px) {
  #hero h1 { font-size: 2rem; }
  .section-title { margin-bottom: 36px; }
}
