/* Base */
:root {
  --bg: #fafafa;
  --text: #1f2937;
  --muted: #6b7280;
  --brand1: #7C3AED;
  /* purple */
  --brand2: #06B6D4;
  /* cyan */
  --brand3: #3B82F6;
  /* blue */
  --brand-gradient: linear-gradient(135deg, var(--brand3), var(--brand2), var(--brand1));
  --ring: conic-gradient(from 180deg at 50% 50%, var(--brand3), var(--brand2), var(--brand1), var(--brand3));
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

/* Dark theme overrides */
[data-theme="dark"] {
  --bg: #0f1115;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --card-bg: rgba(30, 35, 45, 0.6);
  --card-border: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

html {
  scroll-behavior: smooth
}

img {
  display: block;
  max-width: 100%;
  height: auto
}

a {
  color: inherit;
  text-decoration: none
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto
}

/* Global accessibility focus state */
:focus-visible {
  outline: 3px solid var(--brand3);
  outline-offset: 4px;
  border-radius: 2px;
}

.hidden {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden
}

/* Anchor offset for fixed header */
main[id],
section[id] {
  scroll-margin-top: calc(var(--header-h, 80px) + 12px)
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .65);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 50;
  transition: background 0.3s;
}

[data-theme="dark"] .site-header {
  background: rgba(15, 17, 21, .65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0
}

.brand {
  display: flex;
  gap: 6px;
  font-weight: 800;
  letter-spacing: .2px
}

.brand .logo-left {
  color: #6b6ee8
}

.brand .logo-right {
  color: #27a6ff
}

.main-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0
}

.main-nav a {
  font-weight: 500;
  color: #4b5563;
  position: relative;
  transition: color 0.3s;
}

.main-nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--brand-gradient);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.main-nav a.active,
.main-nav a:hover {
  color: #111827
}

.main-nav a.active::after,
.main-nav a:hover::after {
  width: 100%
}

[data-theme="dark"] .main-nav a {
  color: #cbd5e1
}

[data-theme="dark"] .main-nav a.active,
[data-theme="dark"] .main-nav a:hover {
  color: #fff
}

.socials {
  display: flex;
  gap: 12px
}

.icon {
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px
}

.icon:hover {
  color: #111827;
  background: #f3f4f6
}

[data-theme="dark"] .icon {
  color: #cbd5e1
}

[data-theme="dark"] .icon:hover {
  color: #fff;
  background: #111827
}

.icon:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px
}

.svg-icon {
  width: 22px;
  height: 22px
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 24px;
  line-height: 1
}

/* Language select */
#lang-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 36px 8px 12px;
  /* space for arrow */
  font: 600 14px/1.3 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  transition: border-color .2s, box-shadow .2s, background-color .2s, color .2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5.23 7.21a1 1 0 0 1 1.41 0L10 10.57l3.36-3.36a1 1 0 1 1 1.41 1.41l-4.07 4.07a1 1 0 0 1-1.41 0L5.23 8.62a1 1 0 0 1 0-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px 18px;
  min-height: 34px;
  /* align with switch */
}

#lang-select:hover {
  border-color: #d1d5db;
}

#lang-select:active {
  transform: translateY(0.5px);
}

#lang-select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, .45)
}

[data-theme="dark"] #lang-select {
  background-color: #0f131a;
  color: #e5e7eb;
  border-color: #1f2937;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23cbd5e1' d='M5.23 7.21a1 1 0 0 1 1.41 0L10 10.57l3.36-3.36a1 1 0 1 1 1.41 1.41l-4.07 4.07a1 1 0 0 1-1.41 0L5.23 8.62a1 1 0 0 1 0-1.41z'/%3E%3C/svg%3E");
}

[data-theme="dark"] #lang-select:hover {
  border-color: #273244
}

[data-theme="dark"] #lang-select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .35)
}

/* Responsive tweaks for header select */
@media (max-width: 760px) {
  #lang-select {
    font-size: 13px;
    padding: 6px 32px 6px 10px;
    min-height: 32px;
    border-radius: 10px;
    background-position: right 8px center;
    background-size: 16px 16px;
  }
}


/* Hero */
.hero {
  padding: clamp(64px, 12vw, 140px) 0 clamp(48px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
  top: -20%;
  left: -15%;
  z-index: -1;
  border-radius: 50%;
  min-width: 600px;
  filter: blur(40px);
}

.hero::after {
  content: '';
  position: absolute;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
  bottom: -15%;
  right: -10%;
  z-index: -1;
  border-radius: 50%;
  min-width: 500px;
  filter: blur(40px);
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.45) 0%, rgba(15, 17, 21, 0) 65%);
}

[data-theme="dark"] .hero::after {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.45) 0%, rgba(15, 17, 21, 0) 65%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 32px;
  z-index: 2;
  position: relative;
}

.lead {
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
  font-size: clamp(14px, 2.2vw, 18px)
}

.title {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.12;
  margin: 0;
  font-weight: 800;
  letter-spacing: .2px
}

.title .line {
  display: block
}

.highlight {
  background: linear-gradient(90deg, var(--brand3), var(--brand2), var(--brand1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shine 5s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.cta {
  margin-top: 32px
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  border-radius: 999px;
  padding: 16px 32px;
  font-size: 18px;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  user-select: none;
  cursor: pointer
}

.btn-primary {
  background: linear-gradient(90deg, var(--brand3), var(--brand2), var(--brand1));
  background-size: 200% auto;
  color: #fff;
  box-shadow: 0 8px 20px rgba(59, 130, 246, .35);
}

.btn-primary:hover {
  background-position: 100% 0;
  box-shadow: 0 12px 32px rgba(59, 130, 246, .5), 0 4px 12px rgba(6, 182, 212, .4);
  transform: translateY(-4px) scale(1.03);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px
}

.hero-photo {
  display: flex;
  justify-content: center
}

.ring {
  --size: clamp(220px, 38vw, 380px);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  padding: 6px;
  background: var(--ring);
}

.ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(100%);
  background: #fff
}

[data-theme="dark"] .ring {
  background: var(--ring)
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px
  }

  .hero {
    padding-top: 48px
  }

  .ring {
    --size: clamp(220px, 60vw, 340px)
  }
}

@media (min-width: 981px) {

  /* Fullpage hero on desktop */
  .hero {
    min-height: calc(100vh - var(--header-h, 80px));
    display: flex;
    align-items: center
  }
}

@media (max-width: 760px) {
  .title {
    font-size: clamp(28px, 8.5vw, 40px)
  }

  .main-nav {
    position: fixed;
    inset: 64px 16px auto 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: .2s
  }

  [data-theme="dark"] .main-nav {
    background: #0f131a;
    border-color: #1f2937
  }

  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto
  }

  .main-nav ul {
    flex-direction: column;
    gap: 14px
  }

  .nav-toggle {
    display: block
  }

  /* Hide brand right text (andrelaurentino) on mobile */
  .brand .logo-right {
    display: none
  }

  /* Shrink {ALR} on mobile */
  .brand .logo-left {
    font-size: 18px;
    line-height: 1
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 14px 0
  }

  .socials {
    gap: 8px
  }

  .svg-icon {
    width: 20px;
    height: 20px
  }

  .icon {
    width: 32px;
    height: 32px
  }
}

/* Sections */
.section {
  padding: 96px 0
}

.section-title {
  font-size: clamp(28px, 4.5vw, 40px);
  margin: 0 0 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-text {
  color: #4b5563;
  margin: 0 0 32px;
  max-width: 70ch;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
}

[data-theme="dark"] .section-text {
  color: #9aa0aa
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}

[data-reveal].in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    transition: none;
    opacity: 1;
    transform: none
  }
}

/* About specifics */
.section-about {
  padding-top: 72px
}

.about-copy .section-text {
  max-width: 78ch;
  margin-bottom: 20px;
}

.about-copy .section-text:last-child {
  margin-bottom: 0;
}

.section-title.jumbo {
  font-size: clamp(28px, 5.2vw, 44px);
  letter-spacing: .2px
}

.resume-group {
  margin-top: 28px
}

.resume-heading {
  font-size: clamp(22px, 3.6vw, 32px);
  font-weight: 800;
  margin: 28px 0 10px
}

.resume-list {
  list-style: none;
  padding: 0;
  margin: 0
}

.resume-list .item {
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb
}

.resume-list .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

.resume-list .row.sub {
  margin-top: 6px;
  color: #6b7280;
  font-size: 14px
}

.resume-list .role {
  font-weight: 700
}

.resume-list .meta {
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px
}

.resume-list .dot {
  color: #d1d5db
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #e5e7eb;
  color: #374151
}

.badge.success {
  background: #d1fae5;
  color: #065f46
}

.badge.info {
  background: #dbeafe;
  color: #1e3a8a
}

@media (max-width:640px) {
  .resume-list .row {
    flex-direction: column;
    align-items: flex-start
  }
}

/* Badges (tech stack) */
.badges {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px
}

.badges li,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 16px;
  border: 2px solid rgba(128, 128, 128, 0.1);
  border-radius: 12px;
  background: var(--card-bg);
  font-weight: 700;
  color: #374151;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.badges li:hover,
.badge:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  background: #fff;
  border-color: var(--brand3);
  color: var(--brand1);
}

[data-theme="dark"] .badges li,
[data-theme="dark"] .badge {
  background: var(--card-bg);
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .badges li:hover,
[data-theme="dark"] .badge:hover {
  background: rgba(40, 45, 55, 0.9);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  border-color: var(--brand2);
  color: var(--brand2);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px
}

.card {
  border-radius: 24px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  border: 1px solid var(--card-border);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.card p {
  margin: 0 0 10px;
  color: #4b5563;
  line-height: 1.5;
}

[data-theme="dark"] .card p {
  color: #9aa0aa
}

.card .thumb {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover
}

.card .body {
  padding: 18px
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px
}

.card .meta {
  font-size: 12px;
  color: #6b7280
}

.card .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(128, 128, 128, 0.1);
}

.card .links {
  display: flex;
  gap: 18px
}

.card .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  background: rgba(128, 128, 128, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .card .link {
  color: #cbd5e1;
}

.card .link:hover {
  color: #fff;
  background: var(--brand3);
}

.card .svg-icon {
  width: 18px;
  height: 18px
}

.card:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, .12);
  transform: translateY(-8px);
}

[data-theme="dark"] .card:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Stack (icon grid) */
.section-stack {
  padding-top: 96px
}

.stack-grid {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 48px 64px;
  align-items: center
}

.stack-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px
}

.stack-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none
}

.stack-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 96px;
  transition: transform .15s ease
}

.stack-icon img {
  width: 76px;
  height: 76px;
  object-fit: contain
}

.stack-item:hover .stack-icon {
  transform: translateY(-4px) scale(1.06)
}

.stack-name {
  display: block;
  font-weight: 600;
  color: #374151;
  font-size: 15px;
  text-align: center
}

/* Stack groups */
.stack-groups {
  margin-top: 12px
}

.stack-group {
  margin-top: 40px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6
}

.stack-group-title {
  font-size: clamp(18px, 2.8vw, 22px);
  font-weight: 800;
  color: #111827;
  margin: 18px 0 8px
}

@media (max-width:640px) {
  .stack-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 28px 24px
  }

  .stack-icon {
    height: 80px
  }

  .stack-icon img {
    width: 60px;
    height: 60px
  }
}

@media (min-width: 1024px) {
  .stack-grid {
    grid-template-columns: repeat(6, 1fr)
  }
}

@media (max-width: 980px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr
  }
}

/* Footer */
.site-footer {
  margin-top: 56px;
  padding: 0 0 36px;
}

.footer-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.92));
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
  padding: clamp(24px, 3.5vw, 42px);
}

.footer-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--brand-gradient);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) repeat(3, minmax(140px, 1fr));
  gap: clamp(20px, 2.4vw, 34px);
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand-link {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  width: fit-content;
  text-decoration: none;
}

.footer-brand .logo-left {
  font-weight: 800;
  font-size: clamp(21px, 2vw, 24px);
  color: #374151;
}

.footer-brand .logo-right {
  font-weight: 700;
  font-size: clamp(17px, 1.8vw, 20px);
  color: #4b5563;
}

.footer-description {
  margin: 0;
  max-width: 38ch;
  color: #4b5563;
  line-height: 1.65;
  font-size: 14px;
}

.footer-column {
  min-width: 0;
}

.footer-title {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: .11em;
  text-transform: uppercase;
  font-weight: 700;
  color: #6b7280;
}

.footer-nav {
  display: grid;
  gap: 10px;
}

.footer-nav a {
  color: #374151;
  font-weight: 500;
  width: fit-content;
  transition: color .2s ease, transform .2s ease;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-nav a:hover {
  color: #111827;
  transform: translateX(2px);
}

.footer-contact {
  display: grid;
  gap: 10px;
}

.footer-contact-link {
  color: #374151;
  font-weight: 500;
  width: fit-content;
  transition: color .2s ease, text-decoration-color .2s ease;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-contact-link:hover {
  color: #111827;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(59, 130, 246, .45);
}

.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-socials .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #475569;
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
}

.footer-socials .icon:hover {
  color: #111827;
  border-color: rgba(59, 130, 246, 0.35);
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.footer-divider {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 30px 0 18px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  overflow-wrap: anywhere;
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #6b7280;
  row-gap: 6px;
}

.footer-credit-separator {
  color: #9ca3af;
}

.credit-link {
  color: #374151;
  font-weight: 700;
}

.credit-link:hover {
  color: #111827;
}

.credit-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.credit-badge.love {
  background: rgba(236, 72, 153, 0.14);
  color: #be185d;
}

.credit-badge.coffee {
  background: rgba(6, 182, 212, 0.15);
  color: #0e7490;
}

[data-theme="dark"] .footer-card {
  border-color: #1f2937;
  background: linear-gradient(150deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.9));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .footer-brand .logo-left,
[data-theme="dark"] .footer-brand .logo-right,
[data-theme="dark"] .footer-nav a,
[data-theme="dark"] .footer-contact-link,
[data-theme="dark"] .credit-link {
  color: #e5e7eb;
}

[data-theme="dark"] .footer-description,
[data-theme="dark"] .footer-title,
[data-theme="dark"] .footer-copy,
[data-theme="dark"] .footer-credit {
  color: #9ca3af;
}

[data-theme="dark"] .footer-divider {
  border-top-color: #1f2937;
}

[data-theme="dark"] .footer-nav a:hover,
[data-theme="dark"] .footer-contact-link:hover,
[data-theme="dark"] .credit-link:hover {
  color: #fff;
}

[data-theme="dark"] .footer-socials .icon {
  border-color: #273244;
  background: #0f131a;
  color: #cbd5e1;
}

[data-theme="dark"] .footer-socials .icon:hover {
  border-color: rgba(96, 165, 250, .45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}

[data-theme="dark"] .credit-badge.love {
  background: rgba(236, 72, 153, 0.2);
  color: #f9a8d4;
}

[data-theme="dark"] .credit-badge.coffee {
  background: rgba(6, 182, 212, 0.2);
  color: #67e8f9;
}

@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .site-footer {
    margin-top: 40px;
    padding-bottom: 28px;
  }

  .footer-card {
    border-radius: 20px;
    padding: 22px 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-divider {
    margin: 22px 0 14px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-copy,
  .footer-credit {
    font-size: 13px;
  }
}

/*switch*/
/* From Uiverse.io by andrew-demchenk0 */
.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 64px;
  height: 34px;
  line-height: 0;
  /* avoid inline-block whitespace affecting layout */
  vertical-align: middle;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #73C0FC;
  transition: .4s;
  border-radius: 30px;
  display: block;
  z-index: 0;
  /* keep below icons */
}

.slider:before {
  position: absolute;
  content: "";
  height: 30px;
  width: 30px;
  border-radius: 20px;
  left: 2px;
  bottom: 2px;
  z-index: 2;
  background-color: #e8e8e8;
  transition: .4s;
}

.sun svg {
  position: absolute;
  top: 6px;
  left: 36px;
  z-index: 1;
  width: 24px;
  height: 24px;
  animation: rotate 15s linear infinite;
  pointer-events: none;
}

.moon svg {
  fill: #73C0FC;
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 1;
  width: 24px;
  height: 24px;
  animation: tilt 5s linear infinite;
  pointer-events: none;
}



@keyframes rotate {

  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}



@keyframes tilt {

  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-10deg);
  }

  75% {
    transform: rotate(10deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

.input:checked+.slider {
  background-color: #183153;
}

.input:focus+.slider {
  box-shadow: 0 0 1px #183153;
}

.input:checked+.slider:before {
  transform: translateX(30px);
}

/* Contact page */
.contact-form {
  display: grid;
  gap: 20px;
  margin-top: 24px
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%
}

.form-row label {
  font-weight: 700;
  font-size: 15px;
  color: #374151
}

[data-theme="dark"] .form-row label {
  color: #cbd5e1
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  outline: none;
  min-height: 50px;
  font: 500 14px/1.45 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  transition: border-color .2s, box-shadow .2s, background-color .2s, color .2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

[data-theme="dark"] .contact-form input[type="text"],
[data-theme="dark"] .contact-form input[type="email"],
[data-theme="dark"] .contact-form textarea {
  background: #0f131a;
  color: #e5e7eb;
  border-color: #1f2937;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-color: #d1d5db
}

[data-theme="dark"] .contact-form input:hover,
[data-theme="dark"] .contact-form textarea:hover {
  border-color: #273244
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .45)
}

[data-theme="dark"] .contact-form input:focus,
[data-theme="dark"] .contact-form textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .35)
}

.contact-form textarea {
  resize: vertical;
  min-height: 180px
}

::placeholder {
  color: #9ca3af
}

[data-theme="dark"] ::placeholder {
  color: #6b7280
}

/* moved into main .contact-form .btn rule below */

/* Make the submit button visually prominent on the contact form */
.contact-form .btn {
  background: linear-gradient(90deg, var(--brand3), var(--brand2), var(--brand1));
  background-size: 200% 100%;
  color: #fff;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.2;
  width: fit-content;
  max-width: 100%;
  justify-self: center;
  border-radius: 10px;
  margin-top: 8px;
  font-weight: 600;
}

.contact-form .btn:hover {
  background-position: 100% 0;
  box-shadow: 0 8px 24px rgba(59, 130, 246, .35), 0 2px 8px rgba(6, 182, 212, .25)
}

.contact-form .btn:active {
  transform: translateY(1px)
}

.contact-form .btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px
}

/* Alerts */
.alert {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600
}

.alert.success {
  background: #d1fae5;
  border-color: #10b981;
  color: #065f46
}

.alert.error {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b
}

.alert ul {
  margin: 8px 0 0;
  padding-left: 18px
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px
}

.alert .icon {
  flex: 0 0 auto;
  margin-top: 2px
}

.alert.success .icon {
  color: #059669
}

.alert.error .icon {
  color: #b91c1c
}

.alert-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px
}

[data-theme="dark"] .alert.success {
  background: rgba(16, 185, 129, .15);
  border-color: #10b981;
  color: #d1fae5
}

[data-theme="dark"] .alert.error {
  background: rgba(239, 68, 68, .15);
  border-color: #ef4444;
  color: #fee2e2
}

@media (max-width:640px) {

  /* Larger text to avoid iOS zoom, bigger touch targets */
  .contact-form {
    gap: 22px
  }

  .contact-form input[type="text"],
  .contact-form input[type="email"],
  .contact-form textarea {
    font-size: 16px;
    padding: 14px 16px;
    min-height: 48px;
  }

  .contact-form textarea {
    resize: none
  }

  /* Center the submit button and make it comfy for tapping */
  .contact-form .btn {
    justify-self: center;
    padding: 12px 18px;
    width: fit-content;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Loading spinner for contact submit */
.contact-form .spinner {
  display: none;
  margin-right: 8px;
  animation: spin 1s linear infinite
}

.contact-form .btn.is-loading .spinner {
  display: inline-block
}

.contact-form .btn.is-loading {
  cursor: wait
}

.contact-form .btn.is-loading .btn-label {
  opacity: .9
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

/* Blog detail page */
.blog-detail .container {
  width: min(980px, 92%);
}

.post-detail {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  padding: clamp(20px, 4vw, 36px);
}

.post-header {
  margin-bottom: 18px;
}

.post-title {
  margin-bottom: 10px;
}

.post-meta {
  font-size: 14px;
  color: #6b7280;
}

.post-share {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.post-share-label {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
}

.post-share-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(128, 128, 128, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.post-share-btn.whatsapp:hover {
  border-color: #22c55e;
}

.post-share-btn.linkedin:hover {
  border-color: #0a66c2;
}

.post-share-btn.x:hover {
  border-color: #111827;
}

.post-share-btn.facebook:hover {
  border-color: #1877f2;
}

.post-cover {
  margin: 0 0 20px;
}

.post-cover img {
  width: 100%;
  border-radius: 16px;
}

.post-excerpt {
  margin: 0 0 18px;
  max-width: none;
  font-size: clamp(17px, 2.1vw, 21px);
}

.post-content {
  max-width: none;
  line-height: 1.8;
  font-size: clamp(16px, 2vw, 19px);
  color: #1f2937;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin: 1.4em 0 0.6em;
  line-height: 1.25;
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote,
.post-content pre {
  margin: 0 0 1em;
}

.post-content ul,
.post-content ol {
  padding-left: 1.2em;
}

.post-content a {
  color: var(--brand3);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.post-content img {
  border-radius: 14px;
  margin: 12px 0;
}

.post-content pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  overflow: auto;
}

.post-comments {
  margin-top: 22px;
}

.post-comments-title {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 14px;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 12px;
}

.comment-item {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
}

.comment-head {
  font-weight: 700;
  margin-bottom: 6px;
  color: #111827;
}

.comment-date {
  color: #6b7280;
  font-weight: 400;
  margin-left: 6px;
  font-size: 12px;
}

.comment-body {
  color: #111827;
  line-height: 1.65;
}

.post-comment-form {
  display: grid;
  gap: 10px;
}

.post-comment-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-input,
.post-textarea {
  display: block;
  width: 100%;
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font: 500 14px/1.45 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.post-input {
  flex: 1;
  min-width: 220px;
}

.post-textarea {
  resize: vertical;
  min-height: 120px;
}

.post-input:focus,
.post-textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .35);
}

.post-comment-submit {
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--brand3), var(--brand2), var(--brand1));
  color: #fff;
  border: 0;
}

[data-theme="dark"] .post-meta,
[data-theme="dark"] .post-share-label {
  color: #9ca3af;
}

[data-theme="dark"] .post-content {
  color: #e5e7eb;
}

[data-theme="dark"] .post-share-btn {
  background: rgba(20, 25, 35, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
}

[data-theme="dark"] .comment-item {
  background: rgba(20, 25, 35, 0.88);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .comment-head,
[data-theme="dark"] .comment-body {
  color: #e5e7eb;
}

[data-theme="dark"] .post-input,
[data-theme="dark"] .post-textarea {
  background: #0f131a;
  color: #e5e7eb;
  border-color: #1f2937;
}

@media (max-width: 760px) {
  .post-detail {
    border-radius: 18px;
    padding: 16px;
  }

  .post-share {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .post-share-actions {
    width: 100%;
  }
}
