:root {
  --purple-600: #6b21a8; /* deep purple */
  --purple-400: #8b5cf6;
  --white-smoke: #f5f5f5;
  --muted: #6b7280;
  --link-blue: #2563eb; /* blue for links */
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial;
  color: #111827;
  background: linear-gradient(180deg, var(--white-smoke) 0%, #ffffff 100%);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  margin-inline: 20px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.logo {
  font-weight: 700;
  color: var(--purple-600);
  text-decoration: none;
  font-size: 1.125rem;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.25rem;
}
.site-nav a {
  margin-left: 1rem;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--link-blue);
}

.hero {
  position: relative;
  padding: 4rem 0;
  background-color: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(99, 102, 241, 0.06);
}

.hero video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.8;
}

.hero-inner {
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  text-align: center;
  padding: 2rem 1rem;
}

.hero-inner .controls {
  position: absolute;
  top: 20px;
  right: 10px;
}

.hero-inner .controls button {
  cursor: pointer;
}

.hero-inner .controls #playBtn {
  display: none;
}
.hero-title {
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  margin: 0;
  color: var(--white-smoke);
  line-height: 1.05;
}
.hero-sub {
  color: var(--white-smoke);
  margin: 1rem 0 1.5rem;
  font-size: 1.75rem;
}
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: transparent;
  border: 2px solid var(--white-smoke);
  color: var(--white-smoke);
  text-decoration: none;
  font-weight: 600;
}
.btn:hover {
  background-color: var(--white-smoke);
  color: var(--purple-600);
}

.section {
  padding: 3rem 0;
}
.projects .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.card {
  background: linear-gradient(180deg, #fff 0%, rgba(245, 245, 245, 0.6) 100%);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(107, 33, 168, 0.06);
}

.card:hover {
  box-shadow: 0 6px 20px rgba(107, 33, 168, 0.12);
  border: 1px solid rgba(107, 33, 168, 0.12);
  cursor: pointer;
  transform: scale(1.05);
}

.card h3 {
  margin: 0.5rem 0;
}
.card p {
  color: var(--muted);
  margin: 0;
}
.card .card-media {
  height: 140px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  margin-bottom: 0.75rem;
}

.card .card-media img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  /* lazy-loading blur-up transition */
  transition:
    filter 400ms ease,
    opacity 400ms ease;
  filter: blur(10px);
  opacity: 0.7;
}

/* When an image finishes loading (native loading or added class), remove blur */
.card .card-media img.lazyloaded,
.card .card-media img[data-loaded="true"] {
  filter: blur(0);
  opacity: 1;
}

/* Background-image lazy-loading support:
   - mark elements with .lazy-bg and a data-bg attribute with the image URL
   - add .bg-loaded when the background has been applied */
.lazy-bg {
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  transition:
    filter 400ms ease,
    opacity 400ms ease;
  filter: blur(10px);
  opacity: 0.7;
}

/* Applied once JS swaps data-bg -> background-image */
.lazy-bg.bg-loaded {
  filter: blur(0);
  opacity: 1;
}

/* Reduced motion: disable transitions & blur for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card .card-media img,
  .lazy-bg {
    transition: none;
    filter: none;
    opacity: 1;
  }
}

.about-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.avatar {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple-400), var(--purple-600));
  box-shadow: 0 6px 20px rgba(107, 33, 168, 0.12);
  padding-inline: 10px;
}
.bio p {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.web-solutions-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  border-radius: 16px;
}

.web-solutions-inner img {
  border-radius: 10px;
}

.accordion {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.06);
}

.accordion-btn {
  all: unset;
  cursor: pointer;
  width: 100%;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: solid 1px var(--muted);
}

.accordion-btn:hover {
  background: rgba(99, 102, 241, 0.04);
}

.accordion-btn:focus {
  outline: 2px solid var(--purple-600);
  outline-offset: 2px;
}

.accordion-panel {
  padding: 0 1rem;
}

.contact-form {
  max-width: 720px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
label {
  display: block;
  font-size: 0.95rem;
  color: #111827;
}
input,
textarea {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  margin-top: 0.35rem;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.btn-primary {
  background: var(--purple-600);
  color: white;
  border: 0;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
}
.btn-primary:hover {
  filter: brightness(1.03);
  cursor: pointer;
}
.form-status {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.04);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 800px) {
  .about-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .web-solutions-inner {
    flex-direction: column;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .projects .grid {
    grid-template-columns: 1fr;
  }
  .site-nav {
    position: fixed;
    right: 1rem;
    top: 64px;
    background: white;
    padding: 0.75rem;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    display: none;
  }
  .nav-toggle {
    display: block;
  }
}

@media (min-width: 801px) {
  .projects .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .site-nav {
    display: flex;
    align-items: center;
  }
}

/* Link color */
a {
  color: var(--link-blue);
}

/* Honeypot: visually hide but keep accessible to assistive tech */
.hp-label {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Project Pages */
.project-mockup,
.project-mockup img {
  width: 100%;
  border-radius: 12px;
  margin: 1rem 0;
}

.btn-secondary {
  background: var(--white-smoke);
  color: var(--muted);
  border: 0;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--purple-600);
  color: var(--white-smoke);
  cursor: pointer;
}
