/* ==========================================================================
   LAYOUT & GRID SYSTEM
   MD. YEASIR ARAFAT — ELECTRICAL & ELECTRONIC PORTFOLIO
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
  position: relative;
  z-index: var(--z-base);
}

.container-narrow {
  max-width: 900px;
}

/* --------------------------------------------------------------------------
   SECTION STRUCTURE
   -------------------------------------------------------------------------- */
.section {
  padding-top: clamp(4.5rem, 8vw, 7.5rem);
  padding-bottom: clamp(4.5rem, 8vw, 7.5rem);
  position: relative;
  z-index: var(--z-base);
}

.section-alt {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  position: relative;
}

.section-header.text-center {
  text-align: center;
}

.section-header.text-center p {
  margin-left: auto;
  margin-right: auto;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: var(--radius-full);
}

.section-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: clamp(1.05rem, 1.2vw + 0.5rem, 1.2rem);
  color: var(--text-secondary);
}

/* Technical schematic rule beneath section headers */
.technical-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  max-width: 180px;
}

.section-header.text-center .technical-divider {
  margin-left: auto;
  margin-right: auto;
}

.technical-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

.technical-divider.text-center .line:first-child {
  background: linear-gradient(90deg, transparent, var(--accent-cyan));
}

.technical-divider .node {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   HERO SECTION LAYOUT
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: clamp(2.5rem, 4vw, 4rem);
  position: relative;
  overflow: hidden;
}

@media (min-height: 1000px) {
  .hero-section {
    min-height: 800px;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  width: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  z-index: var(--z-card);
}

.hero-heading {
  font-size: clamp(2.35rem, 4.8vw + 0.5rem, 4.1rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.hero-heading .gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-description {
  font-size: clamp(1.05rem, 1.15vw + 0.45rem, 1.2rem);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 58ch;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.hero-badges-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-subtle);
}

/* Hero Portrait Column */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-card);
}

.portrait-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* Portrait backdrop engineering glow & circuit reticle */
.portrait-aura {
  position: absolute;
  inset: -15% -15%;
  background: radial-gradient(circle at center, rgba(var(--accent-cyan-rgb), 0.18) 0%, rgba(var(--accent-blue-rgb), 0.08) 45%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  filter: blur(28px);
}

.circuit-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 112%;
  height: 112%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed var(--border-accent);
  pointer-events: none;
  z-index: 2;
  animation: reticleRotate 40s linear infinite;
}

.circuit-reticle-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90%;
  height: 90%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  pointer-events: none;
  z-index: 2;
}

.portrait-img-box {
  position: relative;
  width: 100%;
  z-index: 3;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.45));
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
}

.portrait-img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  object-position: bottom center;
  display: block;
}

/* Floating Technical Spec Pills in Hero */
.tech-spec-pill {
  position: absolute !important;
  z-index: 4;
  white-space: nowrap;
  background: var(--bg-glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: floatSubtle 6s ease-in-out infinite alternate;
}

.tech-spec-pill.pill-top-right {
  top: 10%;
  right: -6%;
  left: auto;
  bottom: auto;
}

.tech-spec-pill.pill-bottom-left {
  bottom: 10%;
  left: -6%;
  top: auto;
  right: auto;
  animation-delay: -3s;
}

.tech-spec-pill .pill-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--badge-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.tech-spec-pill .pill-text {
  display: flex;
  flex-direction: column;
}

.tech-spec-pill .pill-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.tech-spec-pill .pill-subtitle {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   RESPONSIVE LAYOUT BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
    width: 100%;
  }

  .hero-badges-strip {
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-visual {
    order: -1;
    margin-bottom: 0.5rem;
  }

  .portrait-wrapper {
    max-width: 290px;
  }

  .portrait-img {
    max-height: 340px;
  }

  .tech-spec-pill.pill-top-right {
    top: 4%;
    right: -4%;
    left: auto;
    bottom: auto;
  }

  .tech-spec-pill.pill-bottom-left {
    bottom: 6%;
    left: -4%;
    top: auto;
    right: auto;
  }
}

@media (max-width: 640px) {
  .hero-section {
    padding-top: calc(var(--header-height) + 1.25rem);
    padding-bottom: 2.5rem;
    min-height: auto;
  }

  .hero-heading {
    font-size: clamp(1.75rem, 7.5vw, 2.45rem);
    line-height: 1.18;
  }

  .hero-description {
    font-size: 0.96rem;
  }

  .portrait-wrapper {
    max-width: 220px;
  }

  .portrait-img {
    max-height: 270px;
  }

  .tech-spec-pill {
    padding: 0.4rem 0.65rem;
    font-size: 0.72rem;
  }

  .tech-spec-pill .pill-icon {
    width: 24px;
    height: 24px;
  }

  .tech-spec-pill.pill-top-right {
    top: -5px;
    right: -10px;
    left: auto;
    bottom: auto;
  }

  .tech-spec-pill.pill-bottom-left {
    bottom: 5px;
    left: -10px;
    top: auto;
    right: auto;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .hero-cta-group .btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    white-space: normal;
    text-align: center;
  }

  .hero-badges-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding-top: 1rem;
    margin-top: 1rem;
  }

  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .section-title {
    font-size: 1.65rem;
  }
}
